Issues: add Project filter to issues list and search (#22544)
Currently only a single project like milestone, not multiple like labels. Implements #14298 Code by @brechtvl --------- Co-authored-by: Brecht Van Lommel <brecht@blender.org>
This commit is contained in:
parent
2b1e47e2a2
commit
e88b529b31
6 changed files with 67 additions and 33 deletions
|
@ -1572,6 +1572,7 @@ type IssueStatsOptions struct {
|
|||
RepoID int64
|
||||
Labels string
|
||||
MilestoneID int64
|
||||
ProjectID int64
|
||||
AssigneeID int64
|
||||
MentionedID int64
|
||||
PosterID int64
|
||||
|
@ -1650,6 +1651,11 @@ func getIssueStatsChunk(opts *IssueStatsOptions, issueIDs []int64) (*IssueStats,
|
|||
sess.And("issue.milestone_id = ?", opts.MilestoneID)
|
||||
}
|
||||
|
||||
if opts.ProjectID > 0 {
|
||||
sess.Join("INNER", "project_issue", "issue.id = project_issue.issue_id").
|
||||
And("project_issue.project_id=?", opts.ProjectID)
|
||||
}
|
||||
|
||||
if opts.AssigneeID > 0 {
|
||||
applyAssigneeCondition(sess, opts.AssigneeID)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue