We've encountered an issue exporting this macro. Please try exporting this page again later.
Condition scripts allow uses cases that have complex requirements around data validation or permissions to come to life. Condition scripts are very simple, if the script returns TRUE at then end, the user will be able to see the transition button. If the script returns FALSE, the button will not be visible.
Example 1 - Is user in group
There is no need to create an ‘else’ statement in this script because condition scripts are assumed to be true unless a false is specifically returned by the script.
if(userInGroup("administrators", currentUser()) == false) {
return false;
}
Example 2 - Is user in role
For routines that return true or false there is no need to wrap them in an IF statement.
return isUserInRole(currentUser(), project, "developers");