Table plus | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
| autotransition(transition, issueKey),Alias autotransition(transition, issueKey, skipStateCheck), autotransition(transition, issueKey, skipStateCheck, skipConditions, skipValidators)
|
Description
Excerpt | ||
---|---|---|
| ||
Executes a transition and moves to the specified step. |
Executes a transition and moves to the specified step. It will execute the transition only if the transition is valid for the current status of the issue. If the skipStateCheck parameter is set to true, the routine will force the target transition even if the issue is currently inside another transition and has been modified.
Parameters
Table plus | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||
skipStateCheck Boolean No If set to "true", will force the target transition even if the issue is currently inside another transition and has been modified. skipConditions Boolean No If set to true, will not check conditions on the target transition skipValidators Boolean No If set to true, will not check validators on the target transition |
Return Type
Boolean (true/false)
If the return value is "true", the transition was executed successfully. A "false" return value means that the transition failed. In this case check the log for additional details.
Note |
---|
Starting with version 2.5.3, autotransitions are executed after the script has finished. Since we do not know the result of the operation at the time the routine is called inside the script, it will return "true" by default. |
Examples
Example 1
Code Block | ||
---|---|---|
| ||
autotransition(121, "PRJ-123"); |
...
Returns "true" if the transition requiring requirng information for the issue PRJ-232 was executed and "false" if the transition wasn't executed.
Note |
---|
|
Info |
Frequent ProblemsProblem: When executing an autotransition, it fails with the message: It seems that you have tried to perform a workflow operation (<Transition _Name >) that is not valid for the current state of this issue (<Issue _Key >)
Solution: Set the skipStateCheck parameter to "true ". |
See also
Filter by label (Content by label) | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|