What's the best way to get to the attributes of the Story to which a Defect is linked.
IE. defects[0].story.source
I'm using the Rally API from Ruby to generate a report. We have a custom field on Story called "Source", which determines the source type of Story (eg. Prod Issue, Enhancement, etc).
I'd like to be able to group all Stories and Defects that are of Source type "Enhancement". I haven't been able to work out how to access the Story attributes from the Defect object. I've only managed to get Defect.Requirement but I don't seem to be able to get anything from Requirement.
Any assistance would be appreciated.
Comments
Hi Saskia,
This is how you can get to a custom filed 'source' from requirement:
defect.requirement.source
I tested it with the following block of code:
#start block
all_defects = $rally.find_all(:defect, :workspace=> $rally_workspace, :project=>$rally_project, :project_scope_up=>false, :project_scope_down=>false, :fetch=>true)
all_defects.each do |defect|
puts defect.requirement.source
#end block
- Nick
Reply to this Comment