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 Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,711 views 17 21
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