relaxdiego/redmine_backlogs — Issue #392: Printed story cards don't include the backlog position
Author: bagge
Created: 2012-01-12 07:29:20+00:00
State: open

In v0.7.2
When printing cards for stories the position of the story is not included on the card (empty parantheses are printed).

Seems to be a minor bug. I was to lazy to fork and create a pull request so I'll post the patch here instead:

diff --git a/lib/backlogs_cards.rb b/lib/backlogs_cards.rb
index d91317f..56dc268 100644
--- a/lib/backlogs_cards.rb
+++ b/lib/backlogs_cards.rb
@@ -463,7 +462,7 @@ module BacklogsCards
data['category'] = issue.category ? issue.category.name : ''
data['size'] = (issue.story_points ? "#{issue.story_points}" : '?') + ' ' + l(:label_points)
data['position'] = issue.position ? issue.position : l(:label_not_prioritized)
- data['path'] = (issue.self_and_ancestors.reverse.collect{|i| "#{i.tracker.name} ##{i.id}"}.join(" : ")) + " (#{data['story.position']})"
+ data['path'] = (issue.self_and_ancestors.reverse.collect{|i| "#{i.tracker.name} ##{i.id}"}.join(" : ")) + " (#{data['position']})"
data['sprint.name'] = issue.fixed_version ? issue.fixed_version.name : I18n.t(:backlogs_product_backlog)
data['owner'] = issue.assigned_to.blank? ? "" : "#{issue.assigned_to.name}"
data['owner.email'] = issue.assigned_to.blank? ? nil : issue.assigned_to.mail.to_s.downcase