Skip to content

Commit

Permalink
Merge pull request #1 from hamilton2br/master
Browse files Browse the repository at this point in the history
Correção de exceção caso a história não tenha tarefas
  • Loading branch information
eduardomacan committed Dec 3, 2012
2 parents a4dcff8 + 25d7964 commit 9eb8ad8
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions itertasks
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ class TaskBook
@pdf.text task_desc, :size => 16 , :style => :bold
end

# @pdf.bounding_box([x + 65.mm, y - 31.mm] ,
# :width => 34.mm, :height => 34.mm ) do
# @pdf.print_qr_code(task_id, :extent => 25.mm, :stroke => false )
# end
@pdf.bounding_box([x + 65.mm, y - 31.mm] ,
:width => 34.mm, :height => 34.mm ) do
@pdf.print_qr_code(task_id, :extent => 25.mm, :stroke => false )
end
@card_index = @card_index + 1
end
def render_file(filename)
Expand Down Expand Up @@ -125,7 +125,6 @@ rally = RallyRestAPI.new(:username => rally_user, :password => rally_pass)
res = rally.find( :iteration ) { equal :object_i_d , itername }
iter = res.first


if options.pdfoutput then
tb = TaskBook.new
end
Expand All @@ -135,19 +134,21 @@ end

stories = rally.find( :hierarchical_requirement ) { equal :iteration, iter }
stories.each do |story|
story.tasks.each do |task|
if options.pdfoutput then
tb.add_card(story.formatted_i_d,task.formatted_i_d,task.name)
end

if options.csvoutput then
csv << [story.formatted_i_d,task.formatted_i_d,task.name]
end

if !(options.csvoutput or options.pdfoutput) then
puts "#{story.formatted_i_d}, #{task.formatted_i_d}: #{task.name}"
if !story.tasks.nil? then
story.tasks.each do |task|
if options.pdfoutput then
tb.add_card(story.formatted_i_d,task.formatted_i_d,task.name)
end

if options.csvoutput then
csv << [story.formatted_i_d,task.formatted_i_d,task.name]
end

if !(options.csvoutput or options.pdfoutput) then
puts "#{story.formatted_i_d}, #{task.formatted_i_d}: #{task.name}"
end
end
end
end
end

if options.pdfoutput then
Expand Down

0 comments on commit 9eb8ad8

Please sign in to comment.