Hi,
First off I am using ScriptRunner.
I am trying to write a generic, simple script (ie: return true/false) to be used by multiple transitions .
These will be used to set up a condition for the transition (ie: the transition will be visible or invisible based on the result).
The goal is to check if the action will lead to a particular step.
Pseudo code:
return transition.endStep == "ABC"
The issue is I cannot (after hours of reading) find a way to access the transition the condition script is being run for. I am able to get the current step descriptor as follows:
def currendef issueManager = ComponentAccessor.getIssueManager()
MutableIssue curIssue = (issueManager.getIssueByCurrentKey(issue.getKey()))
StepDescriptor = workflow.getLinkedStep(curIssue.getStatus())
transientVars["actionId"] is not available... (https://scriptrunner.adaptavist.com/latest/jira/recipes/workflow/get-workflow-vars.html)
getDestinationStep() is not available... (https://scriptrunner.adaptavist.com/latest/jira/behaviours-api-quickref.html#_workflow_information)
Thanks for any guidance!
Jon