diff options
Diffstat (limited to 'app/controllers/groups/milestones_controller.rb')
-rw-r--r-- | app/controllers/groups/milestones_controller.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/groups/milestones_controller.rb b/app/controllers/groups/milestones_controller.rb index 1e9d51cf970..7eba73daa3c 100644 --- a/app/controllers/groups/milestones_controller.rb +++ b/app/controllers/groups/milestones_controller.rb @@ -119,7 +119,9 @@ class Groups::MilestonesController < Groups::ApplicationController end def search_params - params.permit(:state, :search_title).merge(group_ids: group.id) + groups = request.format.json? ? group.self_and_ancestors.select(:id) : group.id + + params.permit(:state, :search_title).merge(group_ids: groups) end end |