Forums

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

Automation not deleting issue links but successful in Audit Log

Jeremiah
Contributor
July 1, 2022

Title kind of sums it up.

I have a simple automation that should delete all issue links on an issue after a field change event and then apply a new issue link.

The Audit Log reports successful deletion, but the previous issue links remain and the new one is just added to the list.

2022-07-01_18-27-18.jpg

Here is the Automation rule:

2022-07-02_09-39-03.jpg

The outcome (according to the log) is successful. However, the comment IS NOT added and the issue links ARE NOT removed. The only thing that does happen is the new issue link is added to the list.

EDIT: Updated the screenshot to show what actions are not working vs working.

3 answers

1 accepted

0 votes
Answer accepted
Jeremiah
Contributor
July 2, 2022

Figured it out. Once I moved the Delete Issue Links and Comment actions above the JQL, it all worked as expected.

Thanks for your help @Jack Brickey and @Bill Sheboy !

0 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.
July 2, 2022

Hi @Jeremiah 

Would you please post an image of your automation rule?  That may provide some context for this symptom.

Until that is shown, I suspect what is happening is when you perform the link delete and then add more links, the trigger issue's data at the time of rule start is being used later.

For example:

  1. trigger: some trigger
  2. action: edit a rule some way
  3. action: edit a rule in another way

In this example, if step 3 builds on step 2, the rule will not work as expected as it will overwrite the changes.  The fix for this use case to to add a Re-fetch action to load the data again before proceeding.  

  1. trigger: some trigger
  2. action: edit a rule some way
  3. action: Re-fetch
  4. action: edit a rule in another way

Please note that Re-fetch will slow down the rule by a second or more, but it is essential in many use cases such as this one.  The other primary use is after the Issue Created trigger to slow a rule/reload data before condition tests.

Kind regards,
Bill

Jeremiah
Contributor
July 2, 2022

Thanks, Bill. I thought about the re-fetch action as well and that didn't seem to change the outcome. I'll put it back and try again and post the rule.

Like Bill Sheboy likes this
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.
July 2, 2022

Okay, I reproduced the symptom you are seeing: comments are not always added, although the link deleting seems to work consistently for me in a free Jira instance. 

I would suggest submitting this one to Atlassian Support ( https://support.atlassian.com/contact/#/ ) but it appears you are on a free license and so cannot do that.

Please try to select a specific type of link for the delete and so how that helps.

Also I wonder: branches which could be more than one issue (such as for JQL) run asynchronously and independently.  Based on the comment issue we both observed, there is clearly something not working as expected inside of that branch.

Like Jack Brickey likes this
Jeremiah
Contributor
July 2, 2022

Yeah, I don't know why it says free, but we are definitely not on the free plan.

Please try to select a specific type of link for the delete and so how that helps.

I did try that originally. I started there in-fact because I don't want all of them gone, just a certain type but that didn't work so I went with all for t/s purposes.

0 votes
Jack Brickey
Community Champion
July 2, 2022

Hi @Jeremiah , first I love the torn edges look on your screenshot. 👍🏼

So it appears that you are deleting one (more?) link and then adding others. Is that correct? When you look at the issue post rule execution. What do you see and how does it compare with prior to execution? Maybe you could share a couple of images of the issue before and after? Oh, and include the school torn edges.😉

Jeremiah
Contributor
July 2, 2022

Thanks @Jack Brickey I never leave home without Snagit!

Ideally I want to delete just one type of link, but that wasn't working so I thought I'd go nuclear and delete them all. When that didn't work I opened this question.

The issue in question prior to execution has (let's say) two linking issues on it. I change a value in a field that triggers the automation. The automation should remove all links and then add a new one based on the JQL. The outcome is nothing is removed and the new link is added.

I updated my post to include the automation rule.

Jack Brickey
Community Champion
July 2, 2022

Hi @Jeremiah ,

I did a quick test of the following rule. Below that you will see the pre-run and post run images. This worked for me. Note the condition is not required just something I threw in there.

DCB79B70-259C-4D3D-8B34-7EB9029FFD66.jpeg

3FFFEA82-4402-46FB-878E-ED104D44C20B.jpeg

64882A57-17A6-45F9-95DF-DB91B5175941.jpeg

sooooo.... now to figure out where your's is failing. A couple of suggestions to test;

  1. Can you manually delete links on the same issue?
  2. can you review the Histoy of the test issue an see if their are clues?
  3. can you create a manual trigger rule like mine and test? If so the you can add in other components until we find the culprit.
Jeremiah
Contributor
July 2, 2022

Thanks @Jack Brickey , I will conduct some more testing based on your suggestions and report back.

Can you manually delete links on the same issue?

Yes.

can you review the Histoy of the test issue an see if their are clues?

Yes. It simply shows my edit of the field that triggers the automation, then it shows the automation updated the link. Nothing else.

2022-07-02_12-47-20.jpg

can you create a manual trigger rule like mine and test? If so the you can add in other components until we find the culprit.

It yields the same results when ran manually.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events