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,456,891
Community Members
 
Community Events
176
Community Groups

XPORTER: How to design a IF Condition with "unequal"

This might a really trivial question but I see no answer in the XPorter Documentation.

I use XPorter to export Values from linked issues like in this example:

 

#{for i = LinksCount|sortby=Key}

#{if (%{'${Links[i].Semester[10413]}'.equals('1')})}

${Links[i].Key}

#{end}

#{end}

The "equals" condition is very helpful but for some problems I need like the "unequals" condition. I didnt figured out how to do that.

 

e.g. in that exaple:

#{for i = LinksCount|sortby=Key}

 #{if (%{'${Links[i].Semester[10413]}'.equals('2')})}

#{if (%{'${Links[i].Prüfungsleistung[10411]}'.unequals('PA / Ref und Präsentation')})}

#{end}

#{end}

#{end}

I tried unequals and if not. Both didnt work, so I need your help with this.

 

Best thanks in advance!

1 answer

1 accepted

1 vote
Answer accepted

Hi @dD 

Xporter uses Javascript when you have %{........} in the code.

So, all you need to use is the Javascript not operator ! (exclamation point) before the condition you want the evaluate the falsehood of the result, like this:

#{if (%{!'${Links[i].Prüfungsleistung[10411]}'.equals('PA / Ref und Präsentation')})}

What this condition evaluates is if the result is not equal to 'PA / Ref und Präsentation', since the operation unequal does not exist in Javascript.

Thank you.

Kind regards,
Rogerio Paiva [Xporter Support Team]

Best thanks to you @Rogério Paiva - Xray Xporter !!!

This works perfect and your answer came just in the right time. Also I learned a little about javascript.

Thank you so much and have a nice evening.

BEST

Daniel

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events