Forums

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

Automation

Kerri-Anne Mak April 7, 2025

Hi all,

I have a very specific one.
*My company uses the basic license*

I'm trying to create an automation in Jira to follow the following conditions. 

I have 5 custom fields I have already created + 1 custom field that will need to be a calculation of the 5.

5 fields:

  • Frequency
  • Impact
  • Severity
  • Reproducibility
  • Effort

Calculated Field:

  • Score

I want the automation to trigger once Effort is updated or entered for the first time.
This field will always be the last one to be updated, which is why I don't want the other fields to trigger the automation. 
This is the weighting I need to use for the calculation.

{{#=}}({{Severity}}*5) + ({{Impact}}*3) + ({{Frequency}}*2) + ({{Reproducibility}}*1) - ({{Effort}}*1){{/}}

If any of the 5 fields are left blank or marked as zero, the 'Score' field should be left blank. This should also take affect if any of the fields are changed later.

I also need to Score to update by using the weighting formula anytime any of the 5 fields' values change.

1 answer

0 votes
Bill Sheboy
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.
April 7, 2025

Hi @Kerri-Anne Mak 

If I understand your scenario correctly, you want:

GIVEN a work item
WHEN the Effort field is set the first time
THEN calculate the Score
AND all subsequent updates of the following fields will trigger an update of Score: Frequency, Impact, Severity, Reproducibility, Effort, and Score.

Note: I added that last field in case you want to handle the tampering case where someone manually changes the Score.

The question is: how do you detect the Effort field has not be set yet?  You could...

  • assume if the value is empty, it has never been set, and so once not empty, the rule can proceed
  • save another indicator in the issue (e.g., with an entity property) to track the field has be set at least once

 

Kind regards,
Bill

Kerri-Anne Mak April 8, 2025

Hi Bill, 

Thank you for your response - what you said is correct.
I tried different ways of automating it within Jira and can't seem to get it to trigger properly.

Bill Sheboy
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.
April 8, 2025
Please post the following to provide a bit more context for what you are observing: 
  • what type of project is this: company-managed, team-managed, JPD, etc.
  • an image of your complete automation rule in a single image for continuity
  • images of any relevant actions / conditions / branches
  • an image of the audit log details showing the rule execution
 
Thanks!
Like Kerri-Anne Mak likes this
Kerri-Anne Mak April 9, 2025

I am using a company-managed project where I am a Jira Admin.

Automation.jpgAutomation 2.jpgAutomation 3.jpgAutomation 4.jpgAutomation 5.jpgAudit Log.jpg

Bill Sheboy
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.
April 9, 2025

Thanks for that information, and...

I am assuming the source fields for the calculation are number fields.  Please let me know if that is not correct.

Based on what you described, the first set of conditions in the if / else block is incorrect as it is using OR operators (i.e., At least one condition matches) when they should all be not empty, using the AND operator.  That is a simple fix: at the top of that condition, select the "All conditions match" option.

 

With that change, I believe the rule can be simplified:

  • trigger: field changes for Effort (At this point, you could include all of the fields to detect changes if you want that.)
  • if / else block:
    • work item field fields conditions...with "All conditions match" selected to use AND operator
      • Frequency is not empty
      • Impact is not empty
      • Severity is not empty
      • Reproducibility is not empty
      • Effort is not empty
    • action: edit work item to set Number Score with your calculation
  • else
    • action: edit work item to set Number Score to empty

 

Please try that and let me know what you observe.

Suggest an answer

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

Atlassian Community Events