Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Unexpected behavior when using the "Clones an issue and links" of the Script Post Function

When I use the "Clones an issue and links", I am able to create 19 different Cloned issues in different projects, using 19 different post function in the same workflow action, but am having a problem where the Cloned issues shows all of the links to the other Cloned issues, so it is hard to pick out the Original issue. What we are looking for is:

(a) When viewing the Original - see all of the Cloned issues linked
(b) When viewing a Cloned issue, only see the Link to the Original issue.

Is there a way to use script in the "Additional issue actions" to stop the Cloned issues from being linked to each other? 

Background.....

Our current implementation for tracking Security Vulnerabilities in multiple products is using Parent and Sub-tasks, where multiple Sub-tasks are created in a JIRA Post Function script.  The different teams will investigate and work through to resolution on their individual product's Sub-task.  The problem with the Parent/Sub-task is individual product teams cannot associate their Sub-task to their team's Sprint, (Sub-task inherit Sprint from Parent)  so we need to move this same capability from Sub-tasks to another Issue Type and use a unique Issue Linking to identify.

From the Parent we can see the all of the Sub-tasks, while from the Sub-tasks there are no associations to the others created at the same time. 

When using the "Clones an issue and links"the viewing of a Cloned issue  is causing concerns as this put the Activity further down the page, but more importantly, the association of the Outward and Inward links are lost when multiple issues are cloned during the same workflow action. Was hoping there is a way to limit what Links are created.

 

 

 

1 answer

1 accepted

0 votes
Answer accepted

You can choose not to include the links from the parent when you clone, if you add this to the Additional issue actions in the post script function

checkLink = {link -> false};

 

Mikael Sandberg Community Leader Jul 12, 2018

Here is a link to the documentation about it, https://scriptrunner.adaptavist.com/latest/jira/builtin-scripts.html#_control_of_cloning_links

You can also choose not to clone any attachments.

Mikael - Thank you- that did resolve my issue. When I read the documented description  for "checkLink = {link -> false};" last night it seemed counter-intuitive as I wanted to add the Link. But this morning with your explanation it is clear that it keeps from Cloning the Links as they are individually added during the single workflow action. Thanks again - Wayne

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Asked in Jira Service Desk

Calling all Insight users, we need your help!

Hello Insight users,  As part of our (Mindville's) acquisition by Atlassian, our training team is looking to build some new Insight training materials. It would really helpful if you can ...

54 views 0 0
View question

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you