summaryrefslogtreecommitdiffstats
path: root/models/issue.go
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-04-30 06:15:39 +0200
committerGitHub <noreply@github.com>2020-04-30 01:15:39 -0300
commitbfda0f38646f66dbae2767eed3097489c456ebf5 (patch)
treeb3c915a6fb63215cd2c31c24bf4d7da332503565 /models/issue.go
parentcbf5dffaf29c1e871342c15478b33e9229a7f9d2 (diff)
downloadgitea-bfda0f38646f66dbae2767eed3097489c456ebf5.tar.gz
gitea-bfda0f38646f66dbae2767eed3097489c456ebf5.zip
[API] ListIssues add filter for milestones (#10148)
* Refactor Issue Filter Func * ListIssues add filter for milestones * as per @lafriks * documentation ...
Diffstat (limited to 'models/issue.go')
-rw-r--r--models/issue.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/models/issue.go b/models/issue.go
index 1a17f1b4a3..263655c089 100644
--- a/models/issue.go
+++ b/models/issue.go
@@ -1058,7 +1058,7 @@ type IssuesOptions struct {
AssigneeID int64
PosterID int64
MentionedID int64
- MilestoneID int64
+ MilestoneIDs []int64
IsClosed util.OptionalBool
IsPull util.OptionalBool
LabelIDs []int64
@@ -1143,8 +1143,8 @@ func (opts *IssuesOptions) setupSession(sess *xorm.Session) {
And("issue_user.uid = ?", opts.MentionedID)
}
- if opts.MilestoneID > 0 {
- sess.And("issue.milestone_id=?", opts.MilestoneID)
+ if len(opts.MilestoneIDs) > 0 {
+ sess.In("issue.milestone_id", opts.MilestoneIDs)
}
switch opts.IsPull {