Jira automation fails when adding DONE AND CANCELLED

Bill Ewald December 5, 2022

I have an existing automation rule that will set the Story to DONE when all the Sub-Tasks are set to Done (When all sub-tasks are done → move parent to done).  Works perfect.  We now have administrators using the Cancelled status in their Sub-Tasks, so I need to adjust the automation rule.  

When: Issue is transitioned to Done

For Parent - Status does not equal Done.  And: Sub-tasks match "status = done". Related issues = Sub-tasks.  Condition = All match specified JQL.

Then: Transition the issue to Done.  

When I change And: Sub-tasks match "status = done OR status = cancelled" or "status = done AND status = cancelled" the rule fails to transition if the sub-tasks are set to cancelled.  If one sub-task is set to cancelled and one sub-task is set to done the rule fires appropriately.  I have tried many possible variations in changing\adjusting the "And:Sub-tasks match" field.  

Is there something specific to the Cancelled status?

Thank you for your help.

 

2 answers

1 accepted

2 votes
Answer accepted
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 5, 2022

Hi @Bill Ewald - I would consider changing your sub-tasks match condition to status contains Done/Canceled or if you're using JQL status IN (Done,Canceled)

Bill Ewald December 5, 2022

Validate query was successful.  Automation rule did not work when testing against two sub-tasks that were change to cancelled.  Not 100% sure I set the changes correctly.

Related issues - Sub-tasks

Condition - All match specified JQL

Matching JQL - status in (Cancelled, Done)

Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 5, 2022

Can you please share a screenshot of your rule and audit log?

Bill Ewald December 5, 2022

jira_rule.JPG

Bill Ewald December 5, 2022

Audit log just reads Config Changed.  No other details.

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 5, 2022

That tells me that the rule has not triggered since you changed the config. You need to transition a sub-task.

did you try the "statuscategory"?

Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 5, 2022

Ok - So your trigger is still only looking for when issues are transitioned to Done.  You'll need to include Cancelled in your trigger. 

Like Jack Brickey likes this
Bill Ewald December 5, 2022

Yes I moved my two sub-tasks from Cancelled to In Progress and back to Cancelled.  The validate query returned 1200 results but the rule did not fire.  I am working on statuscategory now.

Bill Ewald December 5, 2022

Attempted statuscategory= done AND statuscategory= cancelled.  It appears I only have TO DO, IN PROGRESS, and DONE.  When I run my JQL search:"project = ITOPS AND statusCategory = 3" it returns DONE and CANCELLED status results.

Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 5, 2022

Did you see my last comment?  You'll need to update your trigger to include Cancelled.

Also - statusCategory is indiscriminate of individual statuses as it relates to the status colors you see on the screen (Gray = To Do, Blue = In Progress, Green = Done).  So assuming both your Done and Cancelled statuses are green, it would be statusCategory = Done

Bill Ewald December 5, 2022

Mark I did see your last comment.  Trying to figure out where to add Cancelled.

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 5, 2022

please try this

2022-12-05_10-01-11.jpg

Like # people like this
Bill Ewald December 5, 2022

That worked!  Thank you both!!

Like # people like this
Saraswathikotala September 24, 2023

@Jack Brickey @Bill Ewald  can you pls help on this

 

I've encountered an issue with a Jira Cloud automation rule, and I'm hoping someone can help me resolve it.

 I've set up an automation rule to count field changes in an issue from Monday to Friday. However, it appears that the rule is also counting changes on Saturday and Sunday, which is not the intended behavior.

 Is there a way to configure the automation rule to exclude weekends (Saturday and Sunday) from the count? I want it to operate strictly on weekdays.

Any guidance or suggestions on how to achieve this would be greatly appreciated.

Thank you in advance for your assistance!

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 25, 2023

@Saraswathikotala , please post a new question in the community. This will ensure you get the most eyes on your question. In this post, only those that were engaged are seeing your question.

Saraswathikotala September 25, 2023

@Jack Brickey  I was posted already but no one not replied

1 vote
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 5, 2022

I would use this...

statuscategory = done

The reason being, if you ever add another "done" status it will still work.

Bill Ewald December 5, 2022

I will adjust and test the rule.  Will return the findings to you.  Thank you!

Like Jack Brickey likes this

Suggest an answer

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

Atlassian Community Events