You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
The example in a screenshot in this article showing how to check a string against a field's value (repeated below) does not work anymore. Did the team change the format? I can't find any documentation about this on the official site.
{{#if(eq(issue.issuetype.name, “Bug”))}} Content {{/}}
Additionally, in the same article it says that other basic conditionals are supported (equals, not, and, or) but I can't find any documentation on how to use this either. Any guidance would be greatly appreciated!
Hi all,
An update on yesterday's issue.
I reached out to support and they sent me the following:
{{ #if(eq(issue.issuetype.name, "Task")) }} This is a task {{ / }}
Which to my surprise worked! I tried it formatted like the one from this article again to understand why:
{{#if(eq(issue.issuetype.name, "Task"))}}This is a task{{/}}
And it once again did not work. Turns out, you MUST put a space in front of #if and the / in the closing mustache, like so:
{{ #if(eq(issue.issuetype.name, "Task"))}}This is a task{{ /}}
A bit strange because I haven't seen spacing like that affect the completion of a smart value, but hey, I'm glad I can use it now.
Thanks for uncovering that! Did you suggest that they update the original article's images to reflect this difference?
And, one more thing to add to the documentation pages! ;^)
Best regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I agree that article may be incorrect, as the #if operator only seems to work for numeric values and not string/text ones. You can infer that looking at the documentation for math versus text smart value functions:
https://support.atlassian.com/jira-software-cloud/docs/smart-values-math-expressions/
https://support.atlassian.com/jira-software-cloud/docs/use-smart-values-to-manipulate-text-strings/
I saw your comment on that article, so let's see what the author says. :^)
Of note, your quotation marks appear to be the angled-type (from a human-readable document) rather than the generic ones used in code like smart values.
Anyway... what problem are you trying to solve? For example, if you are making conditional content for an email (like that article tries to do), have you instead tried using Create Variable and If/Else to build up your message pieces?
Best regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi all, After many months of work, I am delighted to announce the launch of the Jira Automation Template Library! The Template Library is a new website dedicated to all things Jira au...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.