Forums

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

Rule fails and still deletes issue

Dennis_H
Contributor
January 17, 2023

I have a rule set to based on a field setting to clone an issue then delete the original. Problem is that if the clone fails for some reason (in this case it was because the reporter was an inactive user) the original issue is still deleted. Is there a way to set the rule that if there are any errors to not delete the original issue?

3 answers

2 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.
January 17, 2023

Hi @Dennis_H 

Without seeing your rule...and depending upon its structure/design...

If you are doing the clone outside of a branch, the rule will run one action at a time.  And so you could add a re-fetch after the clone to slow the rule, and then use a condition to look for the new issue.  Then only delete the source issue if the clone was found.

Kind regards,
Bill

0 votes
Dennis_H
Contributor
January 17, 2023

Its a rule to move a subtask from one parent task to another parent task (by selecting from a dropdown field in the subtask named Move issue to:). In the JQL it checks if the selection is the same parent and won't do anything if the selected parent matches the parent it's already in.

Untitled.jpg

Simmo
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 24, 2023

Ouch, thats a bit nasty. @Bill Sheboy was on the right path with this one.

I suggest that you use an advanced condition here:

advanced.png

Do this after the clone. If the clone is successful then you'll have a created issue smart value. Check if it does not equal empty and then you'll only continue the rule if it was successful.

Note: Don't type empty into the second value input, just leave it empty.

FWIW, we revisited whether components should continue or stop rule execution on failure some years ago. We were set to change it so that things like this would not happen but we didn't because there were probably a lot of rules that relied on that behaviour. All new components will stop the rule if they error. A little history for you :D

Like Bill Sheboy likes this
0 votes
Trudy Claspill
Community Champion
January 17, 2023

Hello @Dennis_H 

When asking for help with a rule it is very helpful to us for you to post a copy of the rule. 

This can probably be handled with branching or a condition, but it is hard to say without seeing your rule.

Suggest an answer

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

Atlassian Community Events