I need help with a script, please. I have to provide a screen cap, because it is on a network that is not connected to the Internet.
The goal of this script is to transition the Status of an Issue's subtask back to a previous status ("Back to Draft") when the Issue is transitioned backward in its workflow. I have the script as a Post function in the Issue's workflow--so it executes when the Issue's workflow transitions backward. I am getting an error "Cannot find matching method..." see the attached screenshot. Please help!
Hi @kdickason ,
that method return a Collection of Issue and not of MutableIssue (https://docs.atlassian.com/software/jira/docs/api/8.5.1/index.html?com/atlassian/jira/issue/Issue.html).
Your code should be :
Collection<Issue> subTasks = issue.getSubTaskObjects();
This should fix your issue.
Fabio
I made your change, thank you. On Line 21, I am getting error, "The variable [issue] is undeclared." Also on Line 22 it says, "Expected parameter of type com.atlassian.issue.Issue but got com.atlassian.jira.issue.MutableIssue. So something is screwed up on Line 22. I'm obviously very inexperienced--I inherited this script from someone. Thank you 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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Okay, that fixed line 22. I also removed the -> at the end of line 22 (that didn't look right). Line 21 is still complaining about the variable [issue] is undeclared with a red x in the script editor. Anything I can do for that? Thank you again and again...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you use a Custom script post-function "issue" should automatically associated to issue in which you perform the transition ;)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.