A dup to B: how to carry over ticket A's labels to the linked ticket B when closing A as a duplicate

Eric Yang March 9, 2021

Please advise how to use a post function in a workflow to carry over the ticket A's labels to the linked ticket B when closing A as a duplicate to B. 

4 answers

0 votes
mararn1618 _secretbakery.io_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
March 10, 2021

Hey @Eric Yang , are you on Cloud and are the duplicates usually created manually?

A preventive measure could be this addin I've just shipped, which warns users in case they create duplicates: https://marketplace.atlassian.com/apps/1224559/no-duplicate-issues-jira-cloud

0 votes
Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 10, 2021

Hi Eric,

I can confirm with ScriptRunner for Jira Cloud you could loop over the linked issues and then call the Edit Issue rest API to set the labels from the first linked issue to the next linked issue when a linked issue is closed.

I can confirm we have an example Script here which can be run on the script console and shows how to copy the labels from one issue to all its linked issues and you will be able to use this script as a reference guide to help create the script that you require.

Regards,

Kristian

0 votes
Ravi Sagar _Sparxsys_
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.
March 9, 2021

Hi @Eric Yang 

I think that it might also be possible using the built in Automation rules as well. When updating the fields you can use "Additional fields" to update labels using JSON. I made a video on this topics if that helps.

Ravi

Drew Nedderman March 15, 2021

Hi @Ravi Sagar _Sparxsys_ Great video! How can I adapt this to copy labels from one issue to another when using the Issue Linked trigger?

Here's what I'm doing so far:

Advanced Edit Issue Fields.pngAudit Log.png

 

Any help would be greatly appreciated!

0 votes
Matt Doar
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 9, 2021

Likely a ScriptRunner groovy scripted post function. But what if there is more than one linked duplicate issue?

Suggest an answer

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

Atlassian Community Events