Auto-create sub-task copying parents field

We are using ScriptRunner to auto create sub-task once the parent issue (story) goes to a "to do" status. We are coming across an issue that two fields that are populated on the story before it's moved to that status are being copied to the sub-task. Is there any post function that would disable this?

Could a post function be added to the  Additional issue actions within the Auto Create Sub-Task?

3 answers

1 accepted

This widget could not be displayed.

Hi Davor,

You can clear the fix versions field and the Epic Link field  by specifying the following code below in the additional issue actions of the post function.

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.*
Issue issue  = issue as MutableIssue

// Clear the fix versions field
issue.fixVersions = null

// Clear the epic link field
checkLink = {link -> false};

I have attached the screenshot below to show how I have configured this.

image2016-6-3 11:43:30.png

 

I hope this helps.

Thanks

Kristian

Works exactly how i need it to work.

 

Thanks a lot!

This widget could not be displayed.
Steven Behnke Community Champion May 31, 2016

What fields are populated? I believe this is a "feature," so you could find the Built-in script and simply remove the ability for it to copy those fields to the sub-task.

This widget could not be displayed.

Epic Link & Fix Version are both being copied over to sub-task from parent!

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 22, 2018 in Marketplace Apps

How a Marketplace app tech team is achieving gender diversity

Hello! My name is Genevieve Blanch, and I'm the Marketing Manager at RefinedWiki, creators of apps to give teams the tools to customize Atlassian platforms. Currently, 44% of the tech team at Re...

484 views 3 18
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