Script Runner: Create sub-tasks- error when clearing customfield

When I use Script Runners function "Create a sub-tasks" to create sub-tasks during a workflow post condition, it copies the Story Points from the parent to the newly created sub-task as well, which does not make much sense in our opinion.

So, now I'm clearing the field via the Additional issue actions. Why is this field copied from parent?

We have Script Runner version: 3.0.16. Plan to update to the paid version next year. 



1 answer

0 votes
Steven Behnke Community Champion Oct 16, 2015

I would imagine that all fields are being copied by the script. It's not looking at the words "story points" and deciding not to copy it, the logic is much more simple than that. Foremost, I would not recommend using Story Points on Sub-Tasks, so the easy fix here would be to hide that field within the sub-task field configuration for your project. smile

Secondly, you should take the Create Sub-Task script, which is included within your Script Runner package, the .jar file you've installed within your JIRA. You can open this file and locate all of the scripts, which are written in Groovy. This script should then be customized to fit your needs. So in this case, you'd desire logic to not copy the Story Points field, but otherwise remain the same. Then, you can use this script instead.

Thanks for your reply. However, I cannot disable story points on sub-tasks as quite a few projects want to use it (although I recommended against it), but still I would prefer having control over the fields being copied. Creating a subtask is not the same as creating a cloned issue. But thanks for your suggestion to customise the groovy script.

At some point I will make it much easier to configure the list of copied fields. The real issue is that this script and cloning an issue both share the same subclass... it makes sense when cloning, but not when creating a subtask. Normally.

Thanks. I've solved it now by cleaning the fields in the additional issue actions and keep your groovy scripts original.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,852 views 12 18
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot