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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Extracting Labels Issue (Xporter)


I am creating a word document template for xporter that needs to extract a label. This issue I am running into is that each issue has 2 labels. Label1 is used for the kanban board filter and Label2 is the one I want to extract. Is there anyway I can only extract the 2nd label?

I know the syntax for extracting labels is : ${Labels}. Is there anyway I could write some filter on the mapping like ${Labels != Label1}? 


2 answers

1 accepted

0 votes
Answer accepted

Hi Joseph,


Here you are an example:

%{ var secondLabel=’${Labels}’.split(‘ ‘);secondLabel [1]}



Rui Rodrigues.

Hey Rui,

I am still having trouble getting it to print the label I want. The situation is: 

- I have 6 epics and each has 2 labels. 1 is "Project_Kanban" and the other is "Project_Team"

- Project Team is unique for every single epic.

- Project_kanban label is always going to be on an epic because my kanban board uses it to display the issues.

- I want my xporter template to print out the unique project team for each epic.


I tried your solution but was unable to get it to print the second label (Project_Team). Do you have any suggestion as to why? If your solution still works for my issue would you mind explaining?



What is the value of your Label's field?

So I'll just say that the unique names are "Team_EBS", "Team_CTA", "Team_WOV", and "Team_PSP"

You want to print labels that starts with "Team_" basically. Am I right?

Epics has labels; Project_Team and Project_Kanban and each issue of them contains "Teams_" for each teams. What you want is printing all the teams per issue that belongs to an epic, right?


Rui Rodrigues.

yes, but they may not always start with "team". I want to print out the team label, not the Kanban label. Each epic only has two labels. I don't need to print off the team label for each story in the epic.


my report currently is:


Epic name

Labels (this is where i want to print just that one team label and not both labels)




What's printed when you put the following code in your template?

%{ var secondLabel=’${Labels}’.split(‘ ‘);secondLabel [1]}

This code block should print the second label.

If you are exporter Epics, for each one it will print just the second label.


Like Joseph likes this

It isnt printing anything. 

Which version of Xporter do you have?

Put just the following placeholder in your template:


What's is printed?

I got it to pull only the second label! Thank you so much!

Like Rui Rodrigues likes this

Hello community,

I want to separate my labels and add an semicolon ";" between my labels in the export. I have an different quantity of labels in different tickets. Can you please help me how can I do this?

Thank you in advance!

Kind regards,


Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Marketplace Apps & Integrations

🤺 Atlympic Event: Partnerships

Hello Community!  Quick disclaimer: We are running a contest on Community (The Atlympics!) from July 23rd - August 8th of 2021. If you are interested in participating in this contest (prizes! ...

149 views 2 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you