mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-21 17:24:10 +00:00
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
This commit is contained in:
parent
2b101994a6
commit
0066bc5113
8 changed files with 93 additions and 38 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue