Commit a4a71697 authored by Alexandru Croitor's avatar Alexandru Croitor

Search for cadences within group hierarchy directly

Cadences finder is set behind FF so we cannot use that to
find first cadence in the hierarchy, instead look-up the
cadence directly.
parent 3c5a3c7e
...@@ -14,7 +14,6 @@ module Iterations ...@@ -14,7 +14,6 @@ module Iterations
def execute def execute
raise ArgumentError, 'group argument is missing' unless group.present? raise ArgumentError, 'group argument is missing' unless group.present?
return Iterations::Cadence.none unless group.iteration_cadences_feature_flag_enabled?
items = Iterations::Cadence.all items = Iterations::Cadence.all
items = by_id(items) items = by_id(items)
......
...@@ -31,7 +31,8 @@ module Resolvers ...@@ -31,7 +31,8 @@ module Resolvers
args[:id] = parse_id(id) if id.present? args[:id] = parse_id(id) if id.present?
cadences = ::Iterations::CadencesFinder.new(current_user, group, args).execute cadences = ::Iterations::Cadence.none
cadences = ::Iterations::CadencesFinder.new(current_user, group, args).execute if group.iteration_cadences_feature_flag_enabled?
offset_pagination(cadences) offset_pagination(cadences)
end end
......
...@@ -34,16 +34,6 @@ RSpec.describe Iterations::CadencesFinder do ...@@ -34,16 +34,6 @@ RSpec.describe Iterations::CadencesFinder do
group.add_reporter(user) group.add_reporter(user)
end end
context 'with feature flag disabled' do
before do
stub_feature_flags(iteration_cadences: false)
end
it 'returns no cadences' do
expect(subject).to be_empty
end
end
context 'iterations cadences for group' do context 'iterations cadences for group' do
it 'returns iterations cadences' do it 'returns iterations cadences' do
expect(subject).to contain_exactly( expect(subject).to contain_exactly(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment