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

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!

0 vote
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.

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

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...

252 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