Create on Transition - prevent multiple linked issues


Great plugin and good documentation but I ran into a problem trying to prevent the creation of multiple linked issues when passing back through the transition that does the create post function.

You've documented a solution for doing this for sub-tasks and, from this, I eventually got a method working but I'm not sure it's the best option as it seems a little clunky. Also, I didn't want to use 'versions' as this would mess other things up so I used lables.

Could you please cast your eye over the following and advise if there is a better option?

  • Condition value:
    • %jql_result_count%,
    • Regex pattern: 0,
    • Exact,
    • Literal
  • Create multiple issues:
    • %original_labels_comma_separated%,
    • Regex pattern: (?i)answered,
    • Negative
  • Labels:
    • discovery
  • JQL query:
    • (issuekey in linkedissues("%parent_key%")) and (labels = "discovery")



2 answers

1 accepted

Thanks. I think you are on the right track. For issues, you have to use a query with some way to identify duplicates. It is harder because you are querying across way more issues that may share similar attributes where as subtasks are already a more controlled subset. Labels is certainly one way especially if there is nothing else that stands out in your scenario. Using a special link type might be another idea if it doesn't mess up other things. You will need to search by link type though using a plugin as it is not a native capability yet.


I had a very similar request and I managed to work this out combining Clone Plus with ScriptRunner.

Task was to prevent issue cloning to another project when already a clone exists. This would work for issues as well as subtasks.

  • Conditions: ◦Condition value: %jql_result_count%, Regex pattern: 0
  • Link: %original_key%, Link type: Cloners, Link direction: From new issue to issue key
  • JQL query: issueFunction in hasLinkType(Cloners) AND issuekey = %original_key%

ScriptRunner provides the JQL function for the query in the condition.

Thought this could help people with similar problems.




Suggest an answer

Log in or Sign up to answer
Community showcase
Published Feb 07, 2019 in Marketplace Apps

A Timeless Love Story

It started as any story starts, on a normal, rainy day.   Admin meets App, and her name was Klok2, and like any first relationship we were both trying to make it work but neither one knew what...

460 views 8 27
Read article

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