diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2023-02-04 22:35:08 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-04 22:35:08 +0800 |
commit | 8574a6433fab47b6f20997f024c176490dfad1c0 (patch) | |
tree | 7ea17ca9fc62897d9632881feb3caf918260b7c3 /routers | |
parent | 4d20a4a1baeb9ed1bb5b3ed7c44b6046f6387303 (diff) | |
download | gitea-8574a6433fab47b6f20997f024c176490dfad1c0.tar.gz gitea-8574a6433fab47b6f20997f024c176490dfad1c0.zip |
Show all projects, not just repo projects and open/closed projects (#22640)
This PR fixes two problems. One is when filter repository issues, only
repository level projects are listed. Another is if you list open
issues, only open projects will be displayed in filter options and if
you list closed issues, only closed projects will be displayed in filter
options.
In this PR, both repository level and org/user level projects will be
displayed in filter, and both open and closed projects will be listed as
filter items.
---------
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: delvh <dev.lh@web.de>
Diffstat (limited to 'routers')
-rw-r--r-- | routers/web/repo/issue.go | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/routers/web/repo/issue.go b/routers/web/repo/issue.go index 5bff9e67f3..2193da5110 100644 --- a/routers/web/repo/issue.go +++ b/routers/web/repo/issue.go @@ -363,16 +363,10 @@ func issues(ctx *context.Context, milestoneID, projectID int64, isPullOption uti return 0 } - projects, _, err := project_model.FindProjects(ctx, project_model.SearchOptions{ - RepoID: repo.ID, - Type: project_model.TypeRepository, - IsClosed: util.OptionalBoolOf(isShowClosed), - }) - if err != nil { - ctx.ServerError("FindProjects", err) + retrieveProjects(ctx, repo) + if ctx.Written() { return } - ctx.Data["Projects"] = projects ctx.Data["IssueStats"] = issueStats ctx.Data["SelLabelIDs"] = labelIDs |