Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
d3c3cd7d
Commit
d3c3cd7d
authored
Apr 24, 2019
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Insights] Change the default weeks period limit to 12
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
06a27dc3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
ee/changelogs/unreleased/change-defaults-insights-period.yml
ee/changelogs/unreleased/change-defaults-insights-period.yml
+5
-0
ee/lib/gitlab/insights/finders/issuable_finder.rb
ee/lib/gitlab/insights/finders/issuable_finder.rb
+1
-1
ee/spec/lib/gitlab/insights/finders/issuable_finder_spec.rb
ee/spec/lib/gitlab/insights/finders/issuable_finder_spec.rb
+3
-3
No files found.
ee/changelogs/unreleased/change-defaults-insights-period.yml
0 → 100644
View file @
d3c3cd7d
---
title
:
"
[Insights]
Change
the
default
weeks
period
limit
to
12"
merge_request
:
11498
author
:
type
:
changed
ee/lib/gitlab/insights/finders/issuable_finder.rb
View file @
d3c3cd7d
...
@@ -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
...
...
ee/spec/lib/gitlab/insights/finders/issuable_finder_spec.rb
View file @
d3c3cd7d
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment