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

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

Avatar

1 badge earned

Collect

Participate in fun challenges

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

Challenges
Coins

Gift kudos to your peers

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

Recognition
Ribbon

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!

Leaderboard

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
4,551,681
Community Members
 
Community Events
184
Community Groups

Xporter conditional

Hi,

 

I'm brand new to using Xporter so excuse this probably simple question. I am using the below in my template to bring back the linked issue key but if there is no linked issue I want to default to a string 'n/a'. Can anyone advise the syntax to use for that please?

 

#{for links}

${Links[n].Key}

#{end}

 

 

1 answer

1 accepted

0 votes
Answer accepted
Rogério Paiva - Xray Xporter
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.
Jan 18, 2022

Hi @Lee Hutchinson 

Xporter has a programming language that can help you code some behaviors.

For instance, o achieve what you want, it is necessary to add two conditions: print N/A when the links count is zero and print the Keys when the links count is different from zero.

Here is an example:

#{if (%{"${LinksCount}".equals("0")})}

N/A

#{end}

#{if (%{!"${LinksCount}".equals("0")})}

#{for links}

${Links[n].Key}

#{end}

#{end}

 

Please check the Xporter documentation here (https://confluence.getxray.app/display/public/XPORTERCLOUD/Conditional+Blocks) for the details on conditional blocks. And also, please explore all the documentation to get a view of all the features. Since you are starting to use Xporter, I would advise you to do the Xporter Academy to train and learn how to use the tool (https://confluence.getxray.app/display/public/XPORTERCLOUD/Xporter+Academy).

Any additional questions, please get in touch with Xporter Support (http://Xportersupport.getXporter.app); we would gladly assist you.

Thank you.

Kind regards,
Rogerio Paiva [Xporter Support Team]

That's fantastic - thanks for your help Rogerio!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events