I need the number of all defects in a testplan. One defect can be linked to multiple tests but should only count as one. How can I do that? I can't use the JQL "defectsCreatedDuringTesting()" since some defects have to be created outside of a test.
I have the same problem?
Do you were able to solve it?
Hi and sorry for the long wait.
I do it like this for each priority and in the ende I put the prior vars in a table. You get the total number of defects, and how many are in a given state.
Hope this helps.
${set(Prior1,0)}
${set(StatOpenPrio1,0)}
${set(StatClosedPrio1,0)}
${set(StatResPrio1,0)}
${set(StatInPPrio1,0)}
#{if (%{'${BulkIssueIndex}'==0})}
&{for issues|filter=%{'${IssueTypeName}'.equals('Product defect')}}
#{if (%{'${Priority}'.equals('1')})}
#{if (%{'${Status}'.equals('Open')})}
${set(Prior1,%{${Prior1}+1})}
${set(StatOpenPrio1,%{${StatOpenPrio1}+1})}
#{end}
#{if (%{'${Status}'.equals('Resolved')})}
${set(StatResPrio1,%{${StatResPrio1}+1})}
#{if (%{'${Status}'.equals('In Progress')})}
${set(StatInPPrio1,%{${StatInPPrio1}+1})}
#{if (%{'${Status}'.equals('Closed')})}
${set(StatClosedPrio1,%{${StatClosedPrio1}+1})}
&{end}
Thanks for the reply.
I got this solution from the support, using js, hope it help someone else:
${set(Count,0)}
${set(repeatp, “A”)}
#{for tc=TestsCount}
#{for s=Tests[tc].LinksCount|filter=%{‘${Tests[tc].Links[s].IssueType}’.equals(‘Bug’)}}
${set(Count,%{${Count} + 1})}
#{if (%{‘${Count}‘.equals(‘0’)})}
This Release has no Defects
#{if (%{!‘${Count}‘.equals(‘0’)})}
S. No.
Issue Key
#{if (%{“${repeatp}”.indexOf(“${Tests[tc].Links[s].Key}”)==-1})}
${Count}
@{title=${Tests[tc].Links[s].Key}|href=${BaseURL}/browse/${Tests[tc].Links[s].Key}}
${set(repeatp,%{“${repeatp}”.concat(”${Tests[tc].Links[s].Key}”)})}
It looks like you're new here. Sign in or register to get started.