diff options
author | parnic <github@parnic.com> | 2022-08-08 15:03:58 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-08 22:03:58 +0200 |
commit | 0066bc511321d393065fb17a0c91f15b8e483fe5 (patch) | |
tree | 2b6d83ce6d86fc0f7dce1e1b01f92ac708cc4a66 /routers | |
parent | 2b101994a6f4724500908226f9a55816062f1da6 (diff) | |
download | gitea-0066bc511321d393065fb17a0c91f15b8e483fe5.tar.gz gitea-0066bc511321d393065fb17a0c91f15b8e483fe5.zip |
Add issue filter for Author (#20578)
This adds a new filter option on the issues and pulls pages to filter by the author/poster/creator of the issue or PR
Diffstat (limited to 'routers')
-rw-r--r-- | routers/web/repo/issue.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/routers/web/repo/issue.go b/routers/web/repo/issue.go index e6f9529e31..ad25a94e13 100644 --- a/routers/web/repo/issue.go +++ b/routers/web/repo/issue.go @@ -133,7 +133,7 @@ func issues(ctx *context.Context, milestoneID, projectID int64, isPullOption uti var ( assigneeID = ctx.FormInt64("assignee") - posterID int64 + posterID = ctx.FormInt64("poster") mentionedID int64 reviewRequestedID int64 forceEmpty bool @@ -291,6 +291,12 @@ func issues(ctx *context.Context, milestoneID, projectID int64, isPullOption uti return } + ctx.Data["Posters"], err = repo_model.GetIssuePosters(ctx, repo, isPullOption.IsTrue()) + if err != nil { + ctx.ServerError("GetIssuePosters", err) + return + } + handleTeamMentions(ctx) if ctx.Written() { return @@ -364,6 +370,7 @@ func issues(ctx *context.Context, milestoneID, projectID int64, isPullOption uti ctx.Data["SortType"] = sortType ctx.Data["MilestoneID"] = milestoneID ctx.Data["AssigneeID"] = assigneeID + ctx.Data["PosterID"] = posterID ctx.Data["IsShowClosed"] = isShowClosed ctx.Data["Keyword"] = keyword if isShowClosed { @@ -379,6 +386,7 @@ func issues(ctx *context.Context, milestoneID, projectID int64, isPullOption uti pager.AddParam(ctx, "labels", "SelectLabels") pager.AddParam(ctx, "milestone", "MilestoneID") pager.AddParam(ctx, "assignee", "AssigneeID") + pager.AddParam(ctx, "poster", "PosterID") ctx.Data["Page"] = pager } |