You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hi Community!
I have a xPorter template I have been asked to created. The Criteria are:
1 - Retrieve a list of all issues of type "A" with a status other than "Won't Do".
2 - For each issue on that list, populate the template with the issue AND
2a. populate the template with each Link to the issue when the Linked Issue is:
Type "B" AND status other than "Won't Do" AND does not have the label "OMIT"
I can do a straight query of Jira for the first Condition:
Project = ABC and type = "A" and status not in ("Won't do") and labels not in ("OMIT") ORDER BY key ASC
And I put this in the Template (It goes into a Word Table:
&{for issues}
#{for oks=LinksCount|filter=%{'${Links[oks].IssueType}'.equals('B') && !'${Links[oks].Status}'.equals('Won\'t Do') && !'${Links[oks].Labels}'.equals('OMIT')}}
${Source} ${Key} ${Summary} ${Links[oks].Key} ${Links[oks].Summary}
#{end}
&{end}
I think the .equals('OMIT') is wrong,... Because I have many labels on these issues (and some where Labels are EMPTY.
Has anyone successfully excluded content based on a label? If so, where am I missing it?
(Oh, and Yes. Still very new, I don't even know what this language is called.)
When you add fields like labels to your JQL you also have to cover the case when label is empty or those will be excluded too. So something like this should do it:
(labels != OMIT OR labels is EMPTY)
Thank you, Excellent Point.
The trickiness (for me) is that I use the JQL to obtain the 'parent' issues, and I use xPorter filter statement to return the issues linked to that 'parent' issue.
So, I would have to place this OR within the filter statement in the xPorter template.
For those that follow, my main error was using .equals rather than .contains
Here's the statement that (I think) worked (includes issues without labels):
#{for trqs=LinksCount|filter=%{'${Links[oks].IssueType}'.equals('B') &&!'${Links[oks].Status}'.equals('Won\'t Do') && (!'${Links[oks].Labels}'.contains('NotInSRS') || '${Links[oks].Labels}'.contains(null))}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.