Create on Transition - prevent multiple linked issues

Bob,

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")

Thanks

Andrew

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.

Hi,

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.

 

Cheers,

Chris

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

364 views 0 6
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