How to update parent in automation, when children issue deleted?

Anty Zhang May 28, 2023

I'm trying to update parent(epic link / parent link), when I delete an issue. below is my automation rule.

roadmap.jpg

But I got error when I try to delete a story "AAAA-19" and it has an epic link "AAAA-16".

below is the audit log. (10451 is my project)

auditlog.jpg

Seems automation is trying to exclude current issue when I use JQL to find parent, but the child issue has been deleted, so JQL can't find it, and then throw exception.

how to resolve this?

2 answers

0 votes
Alexandru Bartic July 7, 2023

I had the same problem with that error in JQL branch on deleting issue and I wonder if you could find a solution.

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 8, 2023

Hi @Alexandru Bartic - Welcome to the Atlassian Community!

Can you create a new question please and include a screenshot of your rule and the trouble you are having in that one please? 

0 votes
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 29, 2023

Hi Anty - Welcome to the Atlassian Community!

So are you just trying to handle the scenario when the Epic itself is deleted? If so, then just add a Condition for Issue Type - Epic under the trigger. 

If you are deleting a story under the Epic, I don't think want/need anything to happen. That would take care of it. 

Anty Zhang May 29, 2023

Hi @John Funk ,

Actually, I want to handle below scenario:

- When child issue deleted, I want to edit its parent issue's custom field.

The parent--->child relationship is not only for epic--->story/task, but also for story/task--->subtask and other hierarchies which we defined in JIRA roadmap.

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 29, 2023

And what are you trying to update in the parent? 

You might try a Branch for Parent then action for Edit Issue under the branch. 

Then for the field you want to update, use {{triggerIssue.Custom Field}} for the value of the custom field you want to copy up. 

Anty Zhang May 29, 2023

As you can see in my question, "For JQL" part is a "Branch"

In this Branch rule, there is a "Parent" in "Type of related issues", but it only works for sub-task, so I can only choose "JQL" to find the parent, and then error happend, the JQL which run on backend has error.

1.jpg

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 29, 2023

I don't image that will be any different than using the Parent branch. 

Maybe add an IF/ELSE condition block and put one Parent branch under that and another branch for Epic under it. 

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 8, 2023

Hi @Anty Zhang  - Any update on this one? 

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