Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Create on Transition - prevent multiple linked issues

AndrewS October 10, 2013

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

1 vote
Answer accepted
Bob Swift
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.
October 11, 2013

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.

0 votes
Christopher Mohr [codecentric] August 11, 2016

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
TAGS
AUG Leaders

Atlassian Community Events