Skip to content
This repository has been archived by the owner on Aug 30, 2019. It is now read-only.

Commit

Permalink
Print the error_message rather than the error_class as the story name…
Browse files Browse the repository at this point in the history
…, as it's much more informative. Continue to include it in the body of the story so the story title can be edited without losing the data.
  • Loading branch information
Empact committed Jun 2, 2012
1 parent bca3f77 commit bc7be39
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pivotal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ def bugs_to_xml(bugs)
description = {
'File' => bug.values_at("file", "line_number").compact.join(':'),
'Action' => bug.values_at("controller", "action").compact.join('#'),
'Environment' => bug["rails_env"]
'Environment' => bug["rails_env"],
'Exception' => bug["error_class"]
}.map do |label, value|
"#{label}: #{value}" if value && !value.empty?
end.compact
Expand All @@ -29,7 +30,7 @@ def bugs_to_xml(bugs)

xml.external_story do
xml.external_id bug["id"]
xml.name bug["error_class"]
xml.name bug["error_message"]
xml.description description.join("\n")
xml.requested_by requestor
xml.created_at({ :type => "datetime" }, bug["created_at"])
Expand Down

0 comments on commit bc7be39

Please sign in to comment.