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>
This commit is contained in:
parent
4d20a4a1ba
commit
8574a6433f
5 changed files with 65 additions and 20 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue