-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue due date #3794
Merged
Merged
Issue due date #3794
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
406cd5a
Started adding deadline to ui
kolaente 859cd47
Implemented basic issue due date managing
kolaente 02415f7
Improved UI for due date managing
kolaente bfef995
Merge branch 'master' of https://github.com/go-gitea/gitea into issue…
kolaente 74c9e07
Added at least write access to the repo in order to modify issue due …
kolaente aeb3db9
Ui improvements
kolaente 211b2ed
Added issue comments creation when adding/modifying/removing a due date
kolaente 82d7bf0
Show due date in issue list
kolaente 13a12c3
merge with master
kolaente c1ada01
Added api support for issue due dates
kolaente 6663012
Fixed lint suggestions
kolaente f4baf19
Added deadline to sdk
kolaente 06d9649
Updated css
kolaente 3bf2227
Added support for adding/modifiying deadlines for pull requests via api
kolaente 60bbb23
Fixed comments not created when updating or removing a deadline
kolaente 192f31e
update sdk (will do properly once go-gitea/go-sdk#103 is merged)
kolaente f766101
enhanced updateIssueDeadline
kolaente a1b79fe
Removed unnessecary Issue.DeadlineString
kolaente e659699
UI improvements
kolaente bdec65a
Small improvments to comment creation
kolaente 38e1180
merge with gitea-master
kolaente 51d3e4f
merge with gitea-master
kolaente 5c93fe0
Check if an issue is overdue is now a seperate function
kolaente 7292c30
Updated go-sdk with govendor as it was merged
kolaente 6fb31d6
fmt
kolaente 3ae5b7a
Merge branch 'master' of https://github.com/go-gitea/gitea into issue…
kolaente 0b18607
Simplified isOverdue method
kolaente 2efba88
removed unessecary deadline to 0 set
kolaente d8ba5ab
Merge with gitea-master
kolaente 674d2ed
Merge branch 'master' of https://github.com/go-gitea/gitea into issue…
kolaente b8760ba
Update swagger definitions
kolaente c88a59d
Added missing return
kolaente 7c0e537
Added an explanary comment
kolaente 30a2c70
Improved updateIssueDeadline method so it'll only update `deadline_unix`
kolaente bf2d849
Merge branch 'master' of https://github.com/go-gitea/gitea into issue…
kolaente 30dbda4
Small changes and improvements
kolaente b9f193a
Added check if a deadline was modified before updating it
kolaente 3c8216f
Moved comment creating logic into its own function
kolaente fb7463f
Code cleanup for creating deadline comment
kolaente 1c47d90
locale improvement
kolaente 81c93d6
When modifying a deadline, the old deadline is saved with the comment
kolaente d02d09c
fmt
kolaente 253d48f
Merge branch 'master' into issue-due-date
lunny c17c95b
Merge branch 'master' of https://github.com/go-gitea/gitea into issue…
kolaente d7f4798
small improvments to xorm session handling when updating an issue dea…
kolaente f35fec0
small improvments to xorm session handling when updating an issue dea…
kolaente 1412580
style nitpicks
kolaente fe68965
Moved checking for if the user has write acces to middleware
kolaente 65e841d
Merge branch 'master' of https://github.com/go-gitea/gitea into issue…
kolaente 311dc73
Merge with gitea-master
kolaente 8d3fff2
Merge with gitea-master
kolaente 3f570d4
renamed remove deadline url
kolaente a7a9529
Deleting a deadline is now possible via get
kolaente d49dd2f
Reverted deleting a deadline back to using a post request
kolaente File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
small improvments to xorm session handling when updating an issue dea…
…dline
- Loading branch information
commit d7f4798d22bb0ba80f892f917769f12ec95c0f14
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1541,10 +1541,13 @@ func UpdateIssueDeadline(issue *Issue, deadlineUnix util.TimeStamp, doer *User) | |
} | ||
|
||
sess := x.NewSession() | ||
if err := sess.Begin(); err != nil { | ||
return err | ||
} | ||
defer sess.Close() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, fixed. |
||
|
||
// Update the deadline | ||
if _, err = sess.ID(issue.ID).Cols("deadline_unix").Update(&Issue{DeadlineUnix: deadlineUnix}); err != nil { | ||
if err = updateIssueCols(sess, &Issue{ID: issue.ID, DeadlineUnix: deadlineUnix}, "deadline_unix"); err != nil { | ||
return err | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now, do we really need this session? What you want to achieve here?
From xorm readme:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need that session to create the comment.