"Create a sub-task. Will optionally reopen a matching sub-task." not working, but I do not change the summary

As the title says,  

"Create a sub-task. Will optionally reopen a matching sub-task." is not working, but I do not change the summary via scripts, and the Subtask Summary field is set.

I followed this previous question


But as I mentioned, the Subtask Summary field is not changed, and does exist, so that answer does not help.

Groovy Script Runner version 2.1.17
Jira version 6.2.7
Jira Agile version 6.6.0

Additional issue actions

import com.atlassian.jira.ComponentManager
import com.atlassian.jira.issue.CustomFieldManager
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.MutableIssue
import com.atlassian.jira.issue.fields.CustomField
import com.atlassian.jira.user.util.UserManager
import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.issue.fields.CustomField;
import com.atlassian.crowd.embedded.api.User
userManager = (UserManager)  ComponentAccessor.getUserManager()
MutableIssue issue = issue
def cf_1 = customFieldManager.getCustomFieldObjectByName('Campaign Manager')
User usera = userManager.getUser(issue.getCustomFieldValue(cf_1).getUsername());

Subtask Action: is blank

Thanks in advance for the assistance.

3 answers

1 accepted

The subtask action can't be blank - it needs to know which transition to do on it. 

I guess the script title is not the most accurate. What it means to say, is that it will optionally do some action on the child, maybe because you want to keep it in sync with the parent state, for instance reopen it.

Blank means you are choosing the option not to do any action on the subtask. 

Sorry, I missed this on first read.

Edit - I need to update a few of the descriptions... some of them are ambiguous, and this one is just plain confusing.


That was not a solution I expected.  Thank you very much for your help!

@Jamie Echlin [Adaptavist]

Trying to do this, reopen a sub-task from a resolved parent - all on script page is blank except the existing subtask issue type (Defect) and the Sub-Task action which is the transition I expect to fire. It keeps creating a new sub-task ... What am I missing??


Groovy Script Runner version 2.1.17
Jira version 6.4.11, 5.1

Sub-Task Action: Schedule and Move to Dev Team (331)

(This transition is listed on the child issue)

Part of the problem is the summary is going to change for every single issue - it won't be the same for each issue, so the example in the scriptrunner tutorial doesn't really work for us.

I also tried Reopen (31) with the same result.


It will only work with a hard-coded summary. If you don't have that you will need to write your own script to reopen the subtask... which will have to include knowing which subtask to reopen, if more than one.

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 ...

877 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