I am using Xray to export my project issues to Excel.
What I would like to do is export the links from each issue of a project with the heading 'Links' if they are present.
If no links are present I do not want the heading 'Links' to appear.
I have tried an if statement with LinksCount:
#{if LinksCount >0}
Links:
#{for j=LinksCount}
#{if (%{'${Links[j].LinkType}'.equals('comprises')})}
Child: ${Links[j].Key}
#{end}
#{if (%{'${Links[j].LinkType}'.equals('part of ')})}
Parent: ${Links[j].Key}
#{end}
#{if (%{'${Links[j].LinkType}'.equals('tested by')})}
Tested by: ${Links[j].Key}
#{end}
#{end}
#{end}
I have also tried Javascript, which works for a custom Notes field but not for 'Links' :)
%{('${Notes}'.length > 0) ? 'Notes: ${Notes}' : ‘’}
Please try with the condition code like this:
#{if (%{${LinksCount} > 0})}
The evaluation of the value comparison needs to be done inside Javascript, like found in the documentation (https://confluence.getxray.app/display/public/XPORTERCLOUD/Conditional+Blocks).
I hope it helps.
Thank you.
Kind regards,
Rogerio Paiva [Xray Support Team]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.