Auto-create sub-task copying parents field

Davor Fisher May 31, 2016

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

1 vote
Answer accepted
Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 3, 2016

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

Davor Fisher June 3, 2016

Works exactly how i need it to work.

 

Thanks a lot!

0 votes
Davor Fisher May 31, 2016

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

0 votes
Steven F Behnke
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.
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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events