Forums

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

Automation - problem with smart value {{issue.priority.name}}

Rees_ Ian
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.
January 17, 2024

I am creating an automation which does a calculation based on the value of the priority field and another field.  

To do this I need to map the Priority names to values required for the calculation.  This should be quite simple but is failing for a reason I can summarize in the following message that I log in my automation 

Priority="{{issue.priority.name}}" IsItMajor={{issue.priority.name.equalsIgnoreCase(“Major”)}}

for which the output is

Priority="Major" IsItMajor =false

Any ideas welcome ?

1 answer

1 accepted

1 vote
Answer accepted
Walter Buggenhout
Community Champion
January 17, 2024

Hi @Rees_ Ian ,

I am not sure why you would need to lookup the name of a priority specifically to enable your calculations.

Automation allows you to create a lookup table that you can than use to retrieve the values you may need to process further. If you could map the list of priorities and the corresponding values in such a table, I think you may get an easier way to process the required logic.

Have a look at this community post to get you starrted. It also has a link to further documentation in it.

Hope this helps!

Rees_ Ian
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.
January 17, 2024

Thanks I will have a look at that. Although I hae solved the initial problem just by  assigning the priotiy name to a variable and doing the check on the variable

varPriority="{{issue.priority.name}}"

IsItMajor={{varPriority.equals("Major")}} and that works 

Rees_ Ian
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.
January 17, 2024

Thanks @Walter Buggenhout - thanks for the info and Lookup tables seem to b the way to go.  I've created the lookup tables but how do I lookup, based on the value of a field in an issue.

e.g. for a table called tablePriority {{tablePriority.get("Medium")}} work fine to get me the numerical value I have assigned to Medium but how can I look up based on say a smart value or the issues priority name

e.g. {{tablePriority.get({{varPriority)}} 

or {{tablePriority.get({{issue.priority.name}})}} 

Rees_ Ian
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.
January 17, 2024

sorted - thanks very much for your help {{tablePriority.get(issue.priority.name)}} Breadth= {{tableBreadth.get(issue.Breadth.value)}}

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events