Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

xPorter template filter on labels

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}



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.)


1 answer

1 accepted

1 vote
Answer accepted
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Sep 09, 2022

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))}}

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events