Skip to content

Commit edd1d32

Browse files
Merging pull request #203 from fga-gpp-mds/issue_burndown
2 parents f43d2ea + 8bf525c commit edd1d32

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

app/controllers/issues_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ def convert_form_params(issue)
134134
end
135135

136136
def assingnee_counter(issue)
137+
assignees = []
137138
if issue.assignees.count > 0
138-
assignees = []
139139
issue.assignees.each do |assignee|
140140
assignees.push(assignee.login)
141141
end

app/controllers/sprints_controller.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ def get_burndown
7878

7979
for story in @sprint.stories
8080
total_points += story.story_points
81+
8182
if story.pipeline == "Done"
8283
if burned_stories[story.final_date] == nil
8384
burned_stories[story.final_date] = story.story_points
@@ -86,12 +87,11 @@ def get_burndown
8687
end
8788
end
8889
end
89-
9090
planned_points = total_points
9191

9292
range = (@sprint.initial_date .. @sprint.final_date)
93-
9493
range.each do |date|
94+
9595
if burned_stories[date] == nil
9696
burned_stories[date] = total_points
9797
else
@@ -109,6 +109,7 @@ def get_burndown
109109
end
110110

111111
coordenates = { x: date_axis, y: points_axis, ideal_line: ideal_line }
112+
112113
burned_stories = burned_stories.sort_by { |key, value| key }
113114

114115
render json: coordenates

app/controllers/stories_controller.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ def create
6262
end
6363

6464
def update
65+
if story_params[:pipeline] == "Done"
66+
@story.final_date = Date.today
67+
end
6568
if @story.update(story_params)
66-
if @story.pipeline == "Done"
67-
@story.final_date = Date.today
68-
end
6969
render json: @story
7070
else
7171
render json: @story.errors, status: :unprocessable_entity

0 commit comments

Comments
 (0)