Hi Community!
We have a custom field in Jira that contains the value of another Jira-key.
If an issue that has a value in this field is deleted, I want to delete the issue that is named here as well.
However, when I run the rule, it fails with the following error:
I’m a bit unsure why it has added "AND (key != TSU-457)" to the query.
Is there any way to solve this?
First thing, I recommend not deleting issues from Jira Cloud. There is no built-in "undo" or trash bin capability, and so mistakes are possible. Instead consider using a resolution value or custom field to indicate "abandoned" issues, and update filters / reporting accordingly. Then the "delete issue" permission may be removed from all users except Site Admins.
I recommend pausing and discussing this rule and the problem you are trying to solve with your Jira Site Admin for advice.
Back to your original question...
Some rule components such as Branch on JQL explicitly exclude the trigger issue. This is to prevent errors, such as looping or walking over prior results. That is why you see that expression added to the JQL: key != TSU-459
Next, the issues you show are in different projects. What is the scope of your rule: single-project, multiple-project, or global? A single-project scope rule cannot access issues in other projects. To change the rule scope, your Jira Site Admin will need to help.
Kind regards,
Bill
Hi @Bill Sheboy Thanks for the response and tips. I agree with you regarding best practices for deletion, but in this case, we want to delete the issue + the related issue.
The rule is set up to run "Global." Since it adds "!= TSU-459" and this one has already been deleted, Jira Automate stops, so we can't proceed. Is there another way to perform an action on the related issue?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for that reminder, and this edge case is a known problem. You may watch / vote for this defect to see progress on resolution: https://jira.atlassian.com/browse/AUTO-361
One possible workaround for your scenario is to call the REST API endpoint using the Send Web Request action. That will eliminate the need for the branch and so prevent the error.
If you want to try that approach, here is a how-to article and the relevant endpoint needed:
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.
Hi Dag,
You can try with: Key = {{customfield_10547}}
Also if the issue/s are in different projects please ensure that the Rule is Global.
OR
Create a variable
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi!
Thanks for the quick reply. Unfortunately, it didn’t help. We get the correct issue key from the custom field, but it still automatically adds the deleted IssueKey in the query. See the audit log below.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.