Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to build an automation to change a subtask status based on parent ticket custom field value?

Bridget Caci
Contributor
December 16, 2024

Hello!

I am trying to puzzle out how to create an automation that will, ultimately, change a subtask status to Done if, when the parent ticket is created, a custom field has a specific value.

I have an automation to create subtasks when an issue is created with a specific customer request type.  And this works as it should.

I then tried to write an automation - that when the ticket was created if a custom field drop down value was a specific selection, then a subtask with a specific summary should transition to the Done status.

This version failed to trigger.

I then tried to write it with a different trigger, that when this custom field value was changed, to then mark the subtask's status to Done.  But this failed too.

I am testing this in my sample project.  I thought I should use Branch Rule/related issues and select Subtasks but this is where my rule keeps failing.

I attached a screenshot of the current rule setup and the fail in the audit log. 

What am I doing wrong? I am using JSM Data Center.

Appreciate any advice you can give!

1 answer

0 votes
Christopher Yen
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 16, 2024

Hi @Bridget Caci 

It seems like your screenshot did not get added. I have a similar rule but reversed, sub tasks conditions are updating the parent status but hopefully you can use it as reference and just reverse the parent to sub-task and sub-task to parent. 

2024-12-16 08_14_17-Window.png

 

 

Bridget Caci
Contributor
December 16, 2024

screenshot of Rule Audit Log.jpgscreenshot of Test Automation Rule.jpg

Bridget Caci
Contributor
December 16, 2024

Hi @Christopher Yen 

I added the screenshots again. Sorry about that!

Christopher Yen
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 16, 2024

No worries! from the screenshot it looks like it should work (but I may be wrong), I'm wondering if the issue is one of the IF statements? if this is in sandbox you can try removing the if statements and just running it to see if it fires successfully then and the statements in one at a time and test each time to see if one of them is causing the right issues to be excluded. 

Maybe you can check the JQL

 

summary ~ "Request W9"

Is returning the sub-task you want to mark Done and if so then change the if statement to the same JQL and that's one piece of the puzzle that should be confirmed working

Bridget Caci
Contributor
December 16, 2024

Hi @Christopher Yen 

I tested the JQL for the subtask separately and it was valid, pulling in the correct search results.

I'm now theorizing that this might be a timing issue?  Following the automation rule in my screenshot above, I created a new issue and the status change for the subtask did fail - like it has been.  But then I edited the value of the Merger Function custom field - changed it away from what I needed, saved it, then changed it back to ACH and saved it - after this, my rule worked - my W9 subtask status did change to Done.

I'm still building my experience as a Jira admin - if this is related to timing, how would I troubleshoot it?

Christopher Yen
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 16, 2024

Hi @Bridget Caci 

That's promising! Do you have the delay action in your environment? 

2024-12-16 10_30_17-Window.png

Bridget Caci
Contributor
December 16, 2024

Hi @Christopher Yen 

I think my Data Center equivalent is re-fetch.  I can't find a delay action.  I tried the re-fetch - I placed it immediately before the Branch Rule and then immediately after it -  but both tests failed.  

If re-fetch is the next piece in the puzzle, should it be placed before or after the Branch Rule?  I haven't used this option before.

Christopher Yen
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 16, 2024

Unfortunately it looks like there is no delay equivalent in data center yet. 

I did find this article for a workaround but it does say it's a workaround for cloud, so not sure if it can be used

 

By chance is your rule being triggered by another rule? Something else to check would be this checkbox at the bottom of rule details

2024_12_16_12_05_04_Window.png

Bridget Caci
Contributor
December 16, 2024

Yes, I do have that option checked - because of my other automation to create the subtasks when the issue is created - but my rule still fails.

Christopher Yen
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 16, 2024

Can you put this conditional transition at the bottom of the rule that creates the subtasks? You can insert the re-fetch issue data action after sub-tasks are crated then branch rule for sub-tasks

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events