Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…-BackEnd into US21_manter_nota

Signed-off-by: Álax Alves <[email protected]>
  • Loading branch information
pedrokelvin authored and alaxalves committed Dec 13, 2017
2 parents f97b492 + edd1d32 commit 88ef72c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/controllers/issues_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ def convert_form_params(issue)
end

def assingnee_counter(issue)
assignees = []
if issue.assignees.count > 0
assignees = []
issue.assignees.each do |assignee|
assignees.push(assignee.login)
end
Expand Down
1 change: 1 addition & 0 deletions app/controllers/sprints_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def get_burndown
set_ideal_line(days_of_sprint, ideal_line, total_points)

coordenates = { x: date_axis, y: points_axis, ideal_line: ideal_line }

burned_stories = burned_stories.sort_by { |key, value| key }

render json: coordenates
Expand Down
6 changes: 3 additions & 3 deletions app/controllers/stories_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ def create
end

def update
if story_params[:pipeline] == "Done"
@story.final_date = Date.today
end
if @story.update(story_params)
if @story.pipeline == "Done"
@story.final_date = Date.today
end
render json: @story
else
render json: @story.errors, status: :unprocessable_entity
Expand Down

0 comments on commit 88ef72c

Please sign in to comment.