summaryrefslogtreecommitdiffstats
path: root/routers/web/org
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2023-06-24 23:31:28 +0800
committerGitHub <noreply@github.com>2023-06-24 15:31:28 +0000
commit083818cb85f87e3adb0952f25d8fb2c2107364e2 (patch)
tree9fe820b4089dd3048f84062749da60caca8dce3f /routers/web/org
parent5eeddfde10302634bb7f90a81422becfdbc1e17e (diff)
downloadgitea-083818cb85f87e3adb0952f25d8fb2c2107364e2.tar.gz
gitea-083818cb85f87e3adb0952f25d8fb2c2107364e2.zip
Improve loadprojects for issue list (#25468)
Diffstat (limited to 'routers/web/org')
-rw-r--r--routers/web/org/projects.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/routers/web/org/projects.go b/routers/web/org/projects.go
index b3f6024b60..e525f2c43f 100644
--- a/routers/web/org/projects.go
+++ b/routers/web/org/projects.go
@@ -383,7 +383,7 @@ func ViewProject(ctx *context.Context) {
ctx.HTML(http.StatusOK, tplProjectsView)
}
-func getActionIssues(ctx *context.Context) []*issues_model.Issue {
+func getActionIssues(ctx *context.Context) issues_model.IssueList {
commaSeparatedIssueIDs := ctx.FormString("issue_ids")
if len(commaSeparatedIssueIDs) == 0 {
return nil
@@ -429,9 +429,14 @@ func UpdateIssueProject(ctx *context.Context) {
return
}
+ if err := issues.LoadProjects(ctx); err != nil {
+ ctx.ServerError("LoadProjects", err)
+ return
+ }
+
projectID := ctx.FormInt64("id")
for _, issue := range issues {
- oldProjectID := issue.ProjectID()
+ oldProjectID := issue.Project.ID
if oldProjectID == projectID {
continue
}