Browse Source

Prevent double-close of issues (#6233)

tags/v1.9.0-dev
zeripath techknowlogick 6 years ago
parent
commit
74d95ffe1f
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      models/issue.go

+ 7
- 1
models/issue.go View File

@@ -699,8 +699,14 @@ func UpdateIssueCols(issue *Issue, cols ...string) error {
}

func (issue *Issue) changeStatus(e *xorm.Session, doer *User, isClosed bool) (err error) {
// Reload the issue
currentIssue, err := getIssueByID(e, issue.ID)
if err != nil {
return err
}

// Nothing should be performed if current status is same as target status
if issue.IsClosed == isClosed {
if currentIssue.IsClosed == isClosed {
return nil
}



Loading…
Cancel
Save