Is there a way to know when an issue is being duplicated so that you can perform some action/check?

I've been asked to handle situations where when a bug is duplicated I need to perform some checks and or copy some of the fields over from the master bug to the duplicated bug. I don't believe this is doable through workflow transitions or behaviours? Can anyone confirm? Would a eventlistener through scriptrunner accomplish this?


Thanks in advance!

1 answer

1 accepted

0 votes
Gaston Valente Community Champion Jul 18, 2017

Hi Randy,

First of all you need to define what duplication means, for example if it's based on a paticular field being equal to one on an non resolved issue and then define the action to take.

i have a similar requirement to close tickets created if they had a certain field with the same value as an unresolved ticket.

i handle this case with a scritptrunner postfunction to automatically close the issue and then move it as a subtask of the open issue.

Hi Gaston,


Thanks for the quick reply. Sorry for the confusion. For my particular situation I was speaking more of when a user changes the issue link of a bug to "Duplicates". I need to detect and act upon that event.


I don't think this happens with behaviours or a workflow transition as you are not going through a state change for the latter. And therefore was wondering if this was even possible to detect. Am new to eventlisteners and was wondering if that would detect if anyone knew?




Gaston Valente Community Champion Jul 18, 2017

It's an issue with a long history:

I have to deal with it using a database trigger (not recommended) back in jira 4, it's hard to maintain and obscure.

May be you can detect with an event listener when a bug is resolved with the Duplicate resolution, this can be captured.

The other solution might be a service that runs every certain time to detect this relationships.

Hi Gaston,


That is what I had found but I had hoped I had interrupted that incorrectly.


Thanks so much for the confirmation and ideas. It's really appreciated.



Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,760 views 11 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot