Alert error message if open dependencies are included in the issues that try to batch close (#24329)
fix #24185 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
parent
df9a62b5f9
commit
8f57aa014b
3 changed files with 4 additions and 1 deletions
|
@ -2689,7 +2689,7 @@ func UpdateIssueStatus(ctx *context.Context) {
|
|||
if err := issue_service.ChangeStatus(issue, ctx.Doer, "", isClosed); err != nil {
|
||||
if issues_model.IsErrDependenciesLeft(err) {
|
||||
ctx.JSON(http.StatusPreconditionFailed, map[string]interface{}{
|
||||
"error": "cannot close this issue because it still has open dependencies",
|
||||
"error": ctx.Tr("repo.issues.dependency.issue_batch_close_blocked", issue.Index),
|
||||
})
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue