1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

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:
sillyguodong
2023-04-27 00:54:17 +08:00
committed by GitHub
parent df9a62b5f9
commit 8f57aa014b
3 changed files with 4 additions and 1 deletions

View File

@@ -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
}