I have a custom field that's a select list with "Yes" and "No" options for values. This works:
#{if (%{'${elmYnMigration}'.equals('Yes')})}
... show this content ...
#{end}
How does one do a "not equals" version?
Piling on... is there an "or" construct? What about an "else"?
Thanks in advance for any feedback...
-Gene
Hi @Gene Smilgiewicz
Please try the following code:
#{if (%{'${elmYnMigration}'==='Yes'})}
…Show Content Here…
#{end}
#{if (%{!('${elmYnMigration}'==='Yes') || !${elmYnMigration}})}
…Show Other Content Here…
#{end}What is the version of Xporter for JIRA that you're using ?
Kind Regards,
Fábio Antunes
Hi @Gene Smilgiewicz
Currently Xporter for JIRA does not have an "else" statement, but you could use another if as workaround, example:
#{if (%{'${elmYnMigration}'==='Yes'})}
... show this content ...
#{end}
#{if (%{!'${elmYnMigration}'==='Yes'})}
... show other content ...
#{end}Kind Regards,
Fábio Antunes
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, I tried to create an Or condition in an if statement but it's not working and in the documentation I can't find a proper example. I need to know what is the proper sintax for that. Could anyone help me, please?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have the same issue when it comes to filtering certain link types from an issue.
#{for tests}
#{for a=Tests[n].LinksCount}
#{if (%{'${Tests[n].Links[a].LinkType}'.equals('tests')})}
${Tests[n].Key}
#{end}
#{end}
#{end}I need an IF to get my all links except the TESTS one. I tried:
#{if (%{!'${Tests[n].Links[a].LinkType}'.equals('tests')})}#{if (%!{'${Tests[n].Links[a].LinkType}'.equals('tests')})}
#{if (!%{'${Tests[n].Links[a].LinkType}'.equals('tests')})} #{if !(%{'${Tests[n].Links[a].LinkType}'.equals('tests')})}None of those work.
Any idea?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
#{if (%{'${elmYnMigration}'!='Yes'})} works for me
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for chiming in, Fábio.
Without an #{else} I was forced to stack #{if} statements... an #{or} would be helpful.
BTW, your suggestion for not equals (#{if (%{!'${elmYnMigration}'==='Yes'})}) did not work for me. Interesting variation of the Xporter syntax there.
-Gene
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.