I have created a parent transition post function, and then selected "Only if condition is true".
Initially, I wrote the code:
if ("a" == "a") {
return true;
}
Thus, every time, I executed the transition, the post function triggered the parent transition, which shows that the if statement executed and returned true.
However, the moment I try to put in some logic, rather even a single statement, the parent transition doesnot get triggered, which I believe is because the code is either not getting executed or has an error. The code which is not working is given below:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.MutableIssue
import com.atlassian.jira.web.action.issue.CreateSubTaskIssue
import com.atlassian.jira.web.action.issue.CreateSubTaskIssueDetails
import com.atlassian.jira.user.util.UserManager
import com.atlassian.jira.config.SubTaskManager
import com.atlassian.jira.issue.CustomFieldManager
import com.atlassian.jira.issue.watchers.WatcherManager
def MutableIssue currentIssue = issue
if ("a" == "a") {
return true;
}
Want to know, can we write a script in the condition of the post function. If yes, whats the issue with the above script?
Regards,
Manajit.