-
Notifications
You must be signed in to change notification settings - Fork 5k
issue: fix timestamp updating #6210
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6210 +/- ##
=========================================
- Coverage 8.91% 8.65% -0.27%
=========================================
Files 99 99
Lines 17811 17767 -44
=========================================
- Hits 1588 1537 -51
- Misses 16064 16073 +9
+ Partials 159 157 -2 |
I have not tested but I wonder if you can just solve this with: func updateIssueCols(e Engine, issue *Issue, cols ...string) error {
cols = append(cols, "deadline_unix", "updated_unix")
_, err := e.ID(issue.ID).Cols(cols...).Update(issue)
return err
} |
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.
Thanks for the PR!
Co-authored-by: ᴜɴᴋɴᴡᴏɴ <u@gogs.io>
Co-authored-by: ᴜɴᴋɴᴡᴏɴ <u@gogs.io>
This reverts commit 7133a2b.
I chosed @manfer decision. Obviosly it is better way. I have tested, it works |
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.
Thank you!
Co-authored-by: ᴜɴᴋɴᴡᴏɴ <u@gogs.io>
This patch has been cut with 0.12.1 release. |
Pull request with fix issue timestamp updating #6209.
As you are using xorm events like BeforeUpdate () together with Cols (cols ...) method, it changes only fields wich you pass to Cols () method and BeforeUpdate () doesn’t work.
I think you also should check pull, release and repo updating. It may contains the same problem.