Condition Script

Looking for the documentation on the newest versions of Power Actions for Jira 8? Click here and leave these dusty old pages behind!

The condition script enables you to define whether an action should be available for the user, visible but disabled, or hidden from the user entirely.

By default, when you add a new action, it will have the following default condition script.

number ENABLED = 1;
number DISABLED = 2;
number HIDDEN = 3;

return ENABLED;

The script returns one of the predefined variables: ENABLED, DISABLE or HIDDEN.

  • Enabled actions are available for the user to execute.
  • Disabled actions show the button for the action but it will be disabled, preventing the user from executing the action.
  • Hidden actions will hide a button on the UI and thus such action will also be unavailable for the user to execute.

Of course, because we are using SIL, the return value of the script can be conditional.

number ENABLED = 1;
number DISABLED = 2;
number HIDDEN = 3;

if(<some_condition>){
	return ENABLED;
}
if(<some_other_condition>){
	return DISABLED;
}
return HIDDEN;

See also