Hide transition from user

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.

 

3 answers

1 accepted

This widget could not be displayed.

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.

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

This widget could not be displayed.

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.

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.

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

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)

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.

This widget could not be displayed.

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.

JIRA WORKFLOW TOOLBOX has an option to solve this.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 22, 2018 in Marketplace Apps

How a Marketplace app tech team is achieving gender diversity

Hello! My name is Genevieve Blanch, and I'm the Marketing Manager at RefinedWiki, creators of apps to give teams the tools to customize Atlassian platforms. Currently, 44% of the tech team at Re...

509 views 3 18
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you