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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Jul 10, 2018 in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

158 views 0 4
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