diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-09-04 16:54:08 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-09-04 16:54:08 +0400 |
commit | 0bcc323928fa3a794aea5ce190319ebea89ca1ad (patch) | |
tree | 1c5c8fd06db82989469535d5d389788c292b4d8e /app | |
parent | 18e4e997644aa0772153938106e4fc798a12e10f (diff) | |
parent | 0ac4a933ffae00adc4b7ab58af9bef15ed8c412b (diff) |
Merge branch 'api/issues-filter-labels' into 'master'
API: Filter issues by labels
While working on [laboard](https://gitlab.com/jubianchi/laboard) I had some issues with the API : I was not able to filter issues by labels so I had to write some logic to do it on my side.
I think it will be useful to have this feature supported by the Gitlab API.
I added the filtering logic on `/issues` and `/projects/:id/issues`.
The commits are not squashed but I'll do it once everything seems ok to you.
See merge request !169
Diffstat (limited to 'app')
-rw-r--r-- | app/models/project.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index 5cc35f20cad..2bd6a57ee28 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -70,7 +70,7 @@ class Project < ActiveRecord::Base has_many :merge_requests, dependent: :destroy, foreign_key: "target_project_id" # Merge requests from source project should be kept when source project was removed has_many :fork_merge_requests, foreign_key: "source_project_id", class_name: MergeRequest - has_many :issues, -> { order "state DESC, created_at DESC" }, dependent: :destroy + has_many :issues, -> { order 'issues.state DESC, issues.created_at DESC' }, dependent: :destroy has_many :labels, dependent: :destroy has_many :services, dependent: :destroy has_many :events, dependent: :destroy |