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
3e9f7b46
Commit
3e9f7b46
authored
Aug 06, 2018
by
Jasper Maes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rails5: fix slice in burndown fixture
parent
0277bf92
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
db/fixtures/development/20_burndown.rb
db/fixtures/development/20_burndown.rb
+3
-3
ee/changelogs/unreleased/rails5-fix-burndown-fixture.yml
ee/changelogs/unreleased/rails5-fix-burndown-fixture.yml
+5
-0
No files found.
db/fixtures/development/20_burndown.rb
View file @
3e9f7b46
...
...
@@ -63,9 +63,9 @@ class Gitlab::Seeder::Burndown
@milestone
.
start_date
.
upto
(
@milestone
.
due_date
)
do
|
date
|
Timecop
.
travel
(
date
)
close_number
=
rand
(
0
..
2
)
close_number
=
rand
(
1
..
3
)
open_issues
=
@milestone
.
issues
.
opened
open_issues
=
open_issues
.
slice
(
0
..
close_number
)
open_issues
=
open_issues
.
limit
(
close_number
)
open_issues
.
each
do
|
issue
|
Issues
::
CloseService
.
new
(
@project
,
@project
.
team
.
users
.
sample
,
{}).
execute
(
issue
)
...
...
@@ -77,7 +77,7 @@ class Gitlab::Seeder::Burndown
def
reopen_issues
count
=
@milestone
.
issues
.
closed
.
count
/
3
issues
=
@milestone
.
issues
.
closed
.
slice
(
0
..
rand
(
count
)
)
issues
=
@milestone
.
issues
.
closed
.
limit
(
rand
(
count
)
+
1
)
issues
.
each
{
|
i
|
i
.
update
(
state:
'reopened'
)
}
end
end
...
...
ee/changelogs/unreleased/rails5-fix-burndown-fixture.yml
0 → 100644
View file @
3e9f7b46
---
title
:
'
Rails5:
fix
slice
in
burndown
fixture'
merge_request
:
6813
author
:
Jasper Maes
type
:
fixed
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