Prevent Story Points from being inherited in Scriptrunner Sub-task post-function

Hi there

I am using Script-runner Post-function to automatically create sub-tasks at certain points in my workflow. By default, sub-tasks inherit most fields from the parent task - which is great most of the time. 

However, I do not want the sub-task to inherit the Story Points field from the parent task. And I can't figure out a way to override this, or set it to null.

Any ideas on how to script this into the 'Additional Actions' ?

Thanks & regards



1 answer

1 accepted

1 vote
Accepted answer

From this answer:

You can set the story points of the subtask in Additional Actions using the custom field manager.

def cf = customFieldManager.getCustomFieldObjects(issue).find { == 'Story Points'}
issue.setCustomFieldValue(cf, null)

In this context, issue refers to the subtask created.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

812 views 3 9
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