Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

'If equals' operation using Smart Values in Jira Automation

Oscar Readwin
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 9, 2022

I'm looking to add an 'if equals' operation into one of my global automation rules - the idea being that, depending on the value of our Smart Value (customField_10129), the inline styling on the HTML table contents of the automated email sent out will change.

 

I have followed the syntax defined in this article about conditional logic, however it does not work correctly. The following always returns what should be the conditional value of 'red' (this should only happen when the text for customField_10129 equals "Serious"):

<td style="background-color: {{#if(equals(customField_10129, "Serious"))}}red{{/}} </td>

 

I've done some further testing and it appears that these if statements do not work correctly at all, as the following also returns true/'red' when it shouldn't:

<td style="background-color: {{ #if( equals("A", "B")) }}red{{ / }};">{{customField_10129}}</td>

 

Any advice/help on this would be greatly appreciated.

1 answer

0 votes
Nic Brough -Adaptavist-
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 Champions.
February 13, 2018

This makes no sense.

My guess is that you might mean that you want to add a new status into the workflow for bugs?  Is that right?

Benny Jose
February 13, 2018

yes tats exactly my question.Can you help me on this 

Nic Brough -Adaptavist-
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 Champions.
February 14, 2018

Log in as an admin, go to the project you want to change this in, and go to the project admin section.

Look for the workflow section, descend into it, going down to the workflow that is in use for bugs. 

Use the edit option, you will find "add status" appears along with all the other editing options.

Benny Jose
February 14, 2018

I have added my status ,but still i dont see that reflected in any issue type.I see a button call "Add transition".Does that button have anything that i should do?

Nic Brough -Adaptavist-
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 Champions.
February 15, 2018

Yes, adding a status to a workflow does nothing of itself, you also need to give the users a way to move issues into the status.  That means adding transitions.

Benny Jose
February 15, 2018

can you guide me on adding transistions?

Nic Brough -Adaptavist-
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 Champions.
February 15, 2018

Try the "add transition" button you mentioned.

If you want to be able to get to your new status from any point in the workflow, use a "from anywhere" or "all" transition.  Otherwise, you'll want to select a start status. 

When doing this, make sure you add a transition out of the status (or have at least one other "all" transition).  Your users will always make a mistake and need to move out at some point.

Benny Jose
February 15, 2018

I dont find the options you have listed

Options listed are,

1)transition name

2)Description

3)Destination step

4)Transition view

Add button

Nic Brough -Adaptavist-
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 Champions.
February 15, 2018

Ok, I think you need to start with the basics, rather than ask us, as we can't spoon-feed you everything.

Please have a read of https://confluence.atlassian.com/adminjiraserver072/working-with-workflows-828787890.html to start with.

Suggest an answer

Log in or Sign up to answer