mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-21 02:37:13 -04:00
Add issue closed time column to fix activity closed issues list (#3537)
Signed-off-by: Lauris Bukšis-Haberkorns <lauris@nix.lv>
This commit is contained in:
parent
fb2c176491
commit
58893384e8
6 changed files with 50 additions and 6 deletions
|
@ -49,6 +49,7 @@ type Issue struct {
|
|||
DeadlineUnix util.TimeStamp `xorm:"INDEX"`
|
||||
CreatedUnix util.TimeStamp `xorm:"INDEX created"`
|
||||
UpdatedUnix util.TimeStamp `xorm:"INDEX updated"`
|
||||
ClosedUnix util.TimeStamp `xorm:"INDEX"`
|
||||
|
||||
Attachments []*Attachment `xorm:"-"`
|
||||
Comments []*Comment `xorm:"-"`
|
||||
|
@ -612,8 +613,13 @@ func (issue *Issue) changeStatus(e *xorm.Session, doer *User, repo *Repository,
|
|||
return nil
|
||||
}
|
||||
issue.IsClosed = isClosed
|
||||
if isClosed {
|
||||
issue.ClosedUnix = util.TimeStampNow()
|
||||
} else {
|
||||
issue.ClosedUnix = 0
|
||||
}
|
||||
|
||||
if err = updateIssueCols(e, issue, "is_closed"); err != nil {
|
||||
if err = updateIssueCols(e, issue, "is_closed", "closed_unix"); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue