Merge remote-tracking branch 'origin/release/7.2' into dev

pull/5860/head
Oliver Günther 7 years ago
commit fdb0215fc2
No known key found for this signature in database
GPG Key ID: 88872239EB414F99
  1. 17
      lib/api/v3/queries/query_representer.rb
  2. 2
      lib/api/v3/work_packages/watchers_api.rb

@ -139,10 +139,10 @@ module API
resources :sortBy,
getter: ->(*) {
return unless represented.sort_criteria
map_with_sort_by_as_decorated(represented.sort_criteria_columns) do |sort_by|
::API::V3::Queries::SortBys::QuerySortByRepresenter.new(sort_by)
if represented.sort_criteria
map_with_sort_by_as_decorated(represented.sort_criteria_columns) do |sort_by|
::API::V3::Queries::SortBys::QuerySortByRepresenter.new(sort_by)
end
end
},
setter: ->(fragment:, **) {
@ -163,11 +163,10 @@ module API
resource :groupBy,
getter: ->(*) {
return unless represented.grouped?
column = represented.group_by_column
::API::V3::Queries::GroupBys::QueryGroupByRepresenter.new(column)
if represented.grouped?
column = represented.group_by_column
::API::V3::Queries::GroupBys::QueryGroupByRepresenter.new(column)
end
},
setter: ->(fragment:, **) {
attr = id_from_href "queries/group_bys", fragment['href']

@ -26,6 +26,8 @@
# See doc/COPYRIGHT.rdoc for more details.
#++
require 'hashie'
module API
module V3
module WorkPackages

Loading…
Cancel
Save