forked from forgejo/forgejo
Improve loadprojects for issue list (#25468)
This commit is contained in:
parent
5eeddfde10
commit
083818cb85
7 changed files with 41 additions and 30 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue