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
https://answers.atlassian.com/questions/314926
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()); issue.setAssignee(usera);
Subtask Action: is blank
Thanks in advance for the assistance.
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.
@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.
https://scriptrunner.adaptavist.com/4.1.3.5/jira/builtin-scripts.html#_create_a_sub_task
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That was not a solution I expected. Thank you very much for your help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.