aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/org
diff options
context:
space:
mode:
authoryp05327 <576951401@qq.com>2023-04-19 23:28:28 +0900
committerGitHub <noreply@github.com>2023-04-19 10:28:28 -0400
commitf30cc9faa93935f5afb7a38354e5381d5e8825bf (patch)
tree532618f0a068343473e321eb782dc8c36c02ae39 /routers/web/org
parente422342eebc18034ef586ec58f1e2fff0340091d (diff)
downloadgitea-f30cc9faa93935f5afb7a38354e5381d5e8825bf.tar.gz
gitea-f30cc9faa93935f5afb7a38354e5381d5e8825bf.zip
Add unset default project column (#23531)
Close: https://github.com/go-gitea/gitea/issues/23401
Diffstat (limited to 'routers/web/org')
-rw-r--r--routers/web/org/projects.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/routers/web/org/projects.go b/routers/web/org/projects.go
index ed6a2e645f..37212179c9 100644
--- a/routers/web/org/projects.go
+++ b/routers/web/org/projects.go
@@ -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 {