JIRA 6.3 introduced a "Hide transition from user" condition bundled in the workflow plugin.
The description reads:
Condition to hide a transition from the user. The transition can only be triggered from a workflow function.
How this works? How it tells it's triggered from the UI or from a function?
Thanks in advance.
Indeed the Hide transition from user condition was added in JIRA 6.3.3. This condition will always fail, causing the Transition to never be available to be called manually. This was created in order to extend the usage of Workflow Triggers, in order to make certain transitions only possible through triggers (not manually):
Triggers are events which initiate an automatic workflow transition for a JIRA issue. Examples of triggers are pull request creation, or code review rejection.
Caveats: Conditions, validators, and permissions will be ignored for automatic transitions but operate as usual for manual transitions. Global transitions can be automated with triggers, if you follow some simple guidelines. Read our best practices page on automatic issue transitioning.
Third-party plugins trying to transition an issue will indeed not be able to do so, nor will the REST API work.
I would change the condition description since it can be misleading. The bottom line is that there should be a genuine hide transition condition that allows triggering from plugins or other postfuntions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There are two suggestions on JAC regarding that: - https://jira.atlassian.com/browse/JRA-41125 - to improve the description of the condition, and - https://jira.atlassian.com/browse/JRA-41123 - to add a "hide from GUI" condition as in the JMWE
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It just hides it from the user when he is on the issue (on the UI). You can trigger it from anywhere else, including a plugin.
It doesn't know where it is triggered from. It just hides the button, that's all.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have tried that condition with 2 plugins, JIRA AUTOMATION and JIRA WORKFLOW TOOLBOX. Both don't work. When you remove the condition, they work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Agreed - it simply does not work. There is no option to hide the transition when triggered from a 'transition issue' post function. Error highlighted above occurs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried from the script runner in 2 similar instances (6.3.15)
in one it work from the script console, in second doesn't (It seems that you have tried to perform a workflow operation that is not valid for the current state of this issue)
Not clear for me what is going on
def transitionValidationResult = issueService.validateTransition(user, issue.id, actionId, issueInputParameters)
if (transitionValidationResult.isValid()) {
issueService.transition(user, transitionValidationResult)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is possible to get and execute hidden transitions using the JIRA API. Just build a TransitionOptions Object with skipConditions set to true and pass it to the appropriate API methods.
@Andrey VorobetsThat should also work with ScriptRunner if you use the validateTransition() method with a 5th parameter for TransitionOptions. See the API Documentation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How can I make transition for hidden transition from Rest call.
I am currently using /{issueorKey}/transitions endpoint
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I also run into the same problem with JJUPIN / SIL plugins.
The problem is actually that the condition is NOT just hiding the button on the UI. It is actually a condition which always returns False. All automatic workflow function which check the conditions before fireing the transition will fail. Only workflow functions which don't check the conditions and validations will work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
JIRA WORKFLOW TOOLBOX has an option to solve this.
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.