Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Locking Issues

Table of Contents

 


Info
titleRequired plugins
You will need the following JIRA plugins:
  1. Blitz-Actions

Level:  INTERMEDIATE

...

Code Block
titleUnlock button condition script
number ENABLED = 1;
number DISABLED = 2;
number HIDDEN = 3;

if( assignee != currentUser()) {
 return HIDDEN;
}

if(isNull(securityLevel)) {
 	return DISABLED;
}
return ENABLED;

 


Now that we have the conditions, it's time to do the actual scripts. For the Lock button we will set the issue security to Locked and for the Unlock button we will set it to none.

...

That's it! Now let's test it.

 


Note

Instead of current assignee, we could set the value of a user picker as the allowed user, and change the value of the custom field to the current user when locking an issue, thus resolving a common problem exposed here: https://jira.atlassian.com/browse/JRA-6146