Hide transition from user

Adolfo Casari
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 14, 2014

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

0 votes
Answer accepted
Matheus Fernandes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 2, 2014

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.

Adolfo Casari
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 3, 2014

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.

Matheus Fernandes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 3, 2014

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

Like Mark Hostetler likes this
1 vote
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 14, 2014

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.

Adolfo Casari
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 14, 2014

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.

JMcDonnell June 23, 2016

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

Andrey Vorobets August 14, 2017

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)

Sascha Novakovic February 8, 2018

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.

Aayush Mohanka December 23, 2020

How can I make transition for hidden transition from Rest call.
I am currently using /{issueorKey}/transitions endpoint

0 votes
Dieter Konnerth September 4, 2015

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.

Adolfo Casari
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 4, 2015

JIRA WORKFLOW TOOLBOX has an option to solve this.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events