Jira automation to delete links created while in certain status

Alicia Pena April 17, 2023

Hello,  I'm trying to figure out how I can use jira automation to remove any newly created links after a jira has moved to a particular status. 

For example, users link jira tickets from many projects to a particular project maintenance task.  Prior to maintenance that task ticket it moved to a maintenance status.  At that time I need to block any additional links.  The post functions and Transition properties I've tried to block links only blocks the maintenance ticket from linking out but does not block all projects from linking to the maintenance ticket.

I tried using a project automation branch rule for destination issue, if status equals Mantenance, then delete issue links.  But that deletes every single link, not newly created links that were attempted after the ticket was placed into Maintenance status.  Is there a way to accomplish this with jira automation?  Or any other suggestions would be appreciated.

1 answer

1 vote
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.
April 17, 2023

Hi @Alicia Pena 

First thing, I am using Jira Cloud, not Server/Data Center version, and so I am suggesting an answer based on what I know about automation rules in general.  Onward...

One challenge with this scenario is that the links and status are independent: there is no information about one to the other.

You might accomplish your scenario by triggering a rule on issue linked (added), check the status, and then use the change log to determine if a link should be removed.

Kind regards,
Bill

Alicia Pena April 20, 2023

I tried jira automation to do that.  But the only automation I can find deletes all links to the maintenance jira.  I haven't figured out a way to only remove the offending link.

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.
April 20, 2023

To delete specific links with a rule, I believe you can use advanced edit with JSON, and just note the specific link to remove.  Please look here for the documentation on that syntax:

https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/#Linking-issues

Sankalp Chugh July 5, 2023

I tried the above solution and used "remove" instead of "add". It gave error that the supported operations are only "Copy/add".

Like Adan Warren 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 5, 2023

Hi @Sankalp Chugh 

First, I recommend creating a new question, with images of your complete rule and audit log details, and providing a link back to this thread.  Otherwise only the people following this older thread will see your post.

Are you using Jira Cloud or Jira Server/Data Center?  That impacts which features are available for the different versions of automation for Jira rules.

Kind regards,
Bill

Like # people like this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.20.12
TAGS
AUG Leaders

Atlassian Community Events