aboutsummaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorqwerty287 <80460567+qwerty287@users.noreply.github.com>2021-10-08 00:00:02 +0200
committerGitHub <noreply@github.com>2021-10-08 00:00:02 +0200
commitcd0928f0e8cdfada471507de4e2921f92d716cd6 (patch)
treea9c4e1d26da99d10f55d2d071a742a875012b350 /routers
parent25a200078724443afba3eca772d5c7e4db0a83cf (diff)
downloadgitea-cd0928f0e8cdfada471507de4e2921f92d716cd6.tar.gz
gitea-cd0928f0e8cdfada471507de4e2921f92d716cd6.zip
Allow adding multiple issues to a project (#17226)
Adds an option like for adding multiple issues to a milestone. Closes #17216
Diffstat (limited to 'routers')
-rw-r--r--routers/web/repo/issue.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/routers/web/repo/issue.go b/routers/web/repo/issue.go
index 64c4ae41f4..1aaa27c2b0 100644
--- a/routers/web/repo/issue.go
+++ b/routers/web/repo/issue.go
@@ -327,6 +327,20 @@ func issues(ctx *context.Context, milestoneID, projectID int64, isPullOption uti
}
return 0
}
+
+ if ctx.Repo.CanWriteIssuesOrPulls(ctx.Params(":type") == "pulls") {
+ projects, _, err := models.GetProjects(models.ProjectSearchOptions{
+ RepoID: repo.ID,
+ Type: models.ProjectTypeRepository,
+ IsClosed: util.OptionalBoolOf(isShowClosed),
+ })
+ if err != nil {
+ ctx.ServerError("GetProjects", err)
+ return
+ }
+ ctx.Data["Projects"] = projects
+ }
+
ctx.Data["IssueStats"] = issueStats
ctx.Data["SelLabelIDs"] = labelIDs
ctx.Data["SelectLabels"] = selectLabels