Add unset default project column (#23531)

Close: https://github.com/go-gitea/gitea/issues/23401
This commit is contained in:
yp05327 2023-04-19 23:28:28 +09:00 committed by GitHub
parent e422342eeb
commit f30cc9faa9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 102 additions and 25 deletions

View file

@ -610,6 +610,23 @@ func SetDefaultProjectBoard(ctx *context.Context) {
})
}
// UnsetDefaultProjectBoard unset default board for uncategorized issues/pulls
func UnsetDefaultProjectBoard(ctx *context.Context) {
project, _ := CheckProjectBoardChangePermissions(ctx)
if ctx.Written() {
return
}
if err := project_model.SetDefaultBoard(project.ID, 0); err != nil {
ctx.ServerError("SetDefaultBoard", err)
return
}
ctx.JSON(http.StatusOK, map[string]interface{}{
"ok": true,
})
}
// MoveIssues moves or keeps issues in a column and sorts them inside that column
func MoveIssues(ctx *context.Context) {
if ctx.Doer == nil {