Extracting Labels Issue (Xporter)

Joseph November 20, 2019

Hi,

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
Rui Rodrigues
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 25, 2019

Hi Joseph,

 

Here you are an example:

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

 

Cheers,

Rui Rodrigues.

Joseph November 25, 2019

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?


Thanks,

Joseph

Rui Rodrigues
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 2, 2019

What is the value of your Label's field?

Joseph December 2, 2019

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

Rui Rodrigues
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 3, 2019

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?

Cheers,

Rui Rodrigues.

Joseph December 3, 2019

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)

Summary

Comments

Rui Rodrigues
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 4, 2019

Hi,

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.

Thanks.

Like Joseph likes this
Joseph December 4, 2019

It isnt printing anything. 

Rui Rodrigues
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 4, 2019

Which version of Xporter do you have?

Put just the following placeholder in your template:

${Labels}

What's is printed?

Joseph December 4, 2019

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

Like Rui Rodrigues likes this
Rui Rodrigues
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 4, 2019

Oh yeah.

Great.

0 votes
Markus Miehling June 18, 2020

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,

Markus

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events