Forums

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

How to Automate Determining Overall Severity from Checked Conditions in a Jira Sub-task?

Manjinder Kumar
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!
July 3, 2025

So I have a checklist in sub task, I want to automate when task status done update severity of parent:

1. Make sure at least one item is checked.

2.  For each severity section, count how many boxes are checked.

3. Determine Overall Severity:

  • Pick the level with the highest number of checked items.

  • If two (or more) levels tie, choose the higher severity level (e.g. number of checked item in Minor = number of checked items in Major then choose Major)

4. Store Results:

  • Save the chosen severity (e.g. “Severity 2 / Major”) into a variable (e.g. {{overallSeverity}}).

  • Save the count of checked items for that level into another variable (e.g. {{severityCount}}).

5. Update parent

  • Update severity.
  • Add comments what severity is update in reason write condition.

Screenshot 2025-07-03 at 4.20.12 PM.png

 

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.
July 3, 2025

Hi @Manjinder Kumar -- Welcome to the Atlassian Community!

What have you tried to solve this need?

If you have a rule that is not working as expected, context is important for the community to help.  Please post the following:

  • what version of Jira are you using: Cloud, Server, or Data Center
  • for Cloud, what type of project is this: company-managed, team-managed, JPD, etc.
  • which Checklist app are you using
  • 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
  • explain what is not working as expected and why you believe that to be the case

Until we see those...

Have you tried splitting the field on the severity values into a list, counting the elements in each, and storing the results in variables for comparisons?

 

Kind regards,
Bill

Manjinder Kumar
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!
July 3, 2025

Apologies, @Bill Sheboy 

I am company managed cloud jira.

So I am using smart checklist - Severity 1, 2, 3, 4
I am trying to get which severity category has maximum checked items using this:

{{#math}} MAX( issue.checklists["Severity 1 / Critical"].items.filter(i -> i.checked).size, issue.checklists["Severity 2 / Major"].items.filter(i -> i.checked).size, issue.checklists["Severity 3 / Moderate"].items.filter(i -> i.checked).size, issue.checklists["Severity 4 / Minor"].items.filter(i -> i.checked).size ) {{/math}}

then comparing maxCount with each severity level like this:
{{issue.checklists["Severity 1 / Critical"].items.filter(i -> i.checked).size}} equals to {{maxCount}}, If yes I want severity category and checked items in list.

but it seem I am its not woking.
Screenshot 2025-07-03 at 6.24.06 PM.png

Screenshot 2025-07-03 at 6.29.02 PM.png

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.
July 4, 2025

First, lists do not use an array syntax such as you show with:

issue.checklists["Severity 1 / Critical"]

They have a get() function, but that will not help unless the checklists field is a list and you know the number index to access:

https://confluence.atlassian.com/automation/jira-smart-values-lists-993924868.html#Jirasmartvalueslists-list.getlist.get(index)

 

Next, there is no "filter" function for list smart values.  These are the supported functions for lists: 

https://confluence.atlassian.com/automation/jira-smart-values-lists-993924868.html

 

You can instead use conditional logic over a list's fields to filter it: 

https://confluence.atlassian.com/automation/jira-smart-values-conditional-logic-1081351607.html

 

Please try that to filter by one of the values, then try wrapping the result in a math expression to count the number of selected options in the checklist.

Manjinder Kumar
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!
July 7, 2025

Thank you @Bill Sheboy
So I am trying to get understand how this smartchecklist/checklist work.
when I log {{issues.checklist.size}} I got one, but as you can see I have at least 5 element under each category of list, does that mean checklist is not actually a list?

 

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.
July 7, 2025

Do you mean you are using this product:

https://marketplace.atlassian.com/apps/1215277/smart-checklist-for-jira-free?hosting=cloud&tab=support

If that vendor is the app you are using, please see the examples in their documentation to learn how to parse / split the values for checking:

https://railsware.atlassian.net/wiki/spaces/CHK/pages/305528896/Automation+for+Jira

 

And...apps like this typically use a single, custom field value to contain the markup for there check list.  Thus the field is not a list of values which can be tested with the size function until it is split.

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events