Commit f45e26b2 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Merge branch 'change-defaults-insights-period' into 'master'

[Insights] Change the default weeks period limit to 12

See merge request gitlab-org/gitlab-ee!11498
parents 3b504843 d3c3cd7d
---
title: "[Insights] Change the default weeks period limit to 12"
merge_request: 11498
author:
type: changed
...@@ -16,7 +16,7 @@ module Gitlab ...@@ -16,7 +16,7 @@ module Gitlab
}.with_indifferent_access.freeze }.with_indifferent_access.freeze
PERIODS = { PERIODS = {
days: { default: 30 }, days: { default: 30 },
weeks: { default: 4 }, weeks: { default: 12 },
months: { default: 12 } months: { default: 12 }
}.with_indifferent_access.freeze }.with_indifferent_access.freeze
......
...@@ -93,7 +93,7 @@ RSpec.describe Gitlab::Insights::Finders::IssuableFinder do ...@@ -93,7 +93,7 @@ RSpec.describe Gitlab::Insights::Finders::IssuableFinder do
opts.merge!(group_by: 'week') opts.merge!(group_by: 'week')
end end
it 'returns issuable created after 4 weeks ago' do it 'returns issuable created after 12 weeks ago' do
expect(subject.to_a).to eq([issuable2, issuable3, issuable4]) expect(subject.to_a).to eq([issuable2, issuable3, issuable4])
end end
end end
...@@ -219,8 +219,8 @@ RSpec.describe Gitlab::Insights::Finders::IssuableFinder do ...@@ -219,8 +219,8 @@ RSpec.describe Gitlab::Insights::Finders::IssuableFinder do
context 'with group_by: "week"' do context 'with group_by: "week"' do
let(:opts) { base_opts.merge!(group_by: 'week') } let(:opts) { base_opts.merge!(group_by: 'week') }
it 'returns 4' do it 'returns 12' do
expect(subject).to eq(4) expect(subject).to eq(12)
end end
end end
......
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