diff options
author | 6543 <6543@obermui.de> | 2020-04-30 06:15:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-30 01:15:39 -0300 |
commit | bfda0f38646f66dbae2767eed3097489c456ebf5 (patch) | |
tree | b3c915a6fb63215cd2c31c24bf4d7da332503565 /models/issue.go | |
parent | cbf5dffaf29c1e871342c15478b33e9229a7f9d2 (diff) | |
download | gitea-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.go | 6 |
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 { |