When deleting an epic, there is a field that requires editing in its children. Trying to use a branch "Children" OR "JQL" in combination with lookupIssues unfortunately doesn't work because while using a branch a "key != ({{triggerissue.key}})" is added in the backend of the branch so that it only returns related issues (not including the current issue).
A JQL with a deleted issue is not valid, hence the error. SD-902 is the deleted issue that triggers the rule in the snip attached.
Is there any other approach I could follow? :)
Thanks in advance for any help!
Welcome to the Atlassian Community!
If you delete an issue (Epic) then it is gone, completely. (The standard recommendation is that you should never allow anyone to delete an issue. Invalidate it, move it to a status that means "needs no more attention", or even move it into a "trash" project, but never delete)
You cannot work with data that no longer exists. There is no way you can search for something that no longer exists and expect to get any results.
You might be able to make this work if the automation is run as part of the "Epic deleted" process, but I'm not sure the issue deleted trigger will contain enough information about the Epic to identify all its children.
If that does not work, the best thing to do is disallow issue delete, and set up a trash project you can move the issues you want to delete into. Use that move as the trigger for your automation.
For your existing issues that have had their epic deleted, I don't think there's any way to automate anything. You'll have to manually read their issue history to see where their epic-link/parent was removed.
Hi @Thanasis Nikolaou -- Welcome to the Atlassian Community!
Yes, and...agreeing with Nic's suggestions on disabling issue deletion, and...
By the time the Issue Deleted trigger fires for a rule, the issue is gone and the links to the child issues are cleared. Although the rule has the deleted issue's key, that cannot help for finding the child issues (as you observed with JQL).
And...I do not believe the Issue Updated or Issue Field Updated triggers can be used to accurately detect the clearing of the parent field to find the children. Seems to be either a timing issue or a difference in which events are fired.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you both - very helpful answers
You are right, the "issue updated" does not get triggered when the parent field gets emptied as a result of a deletion. It's not even captured in the history of the story, which doesn't make sense to me...
Maybe a scheduled automation to find children with no parent will do for now.
Thank you both!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am not understanding what you are trying to do.
is SD-902 already deleted before the "branch"? why?
Please post picture of your actual rule in your original post along with details on what are you trying to do to "children" so folks can help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
SD-902 (Epic) Deleted by a user. Then using a branch to reach its children and clear some field values that shouldn't exist in stories without epic.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.