Versions Compared

Key

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

Problem

You can use Power Actions™ and the Issue Security Scheme to lock an issue and ensure that only the issue assignee can edit it.

Tip

Power Actions™ offers the possibility of an assignee locking an issue without needing to grant them Set Issue Security Level or Edit issue permission (only logging work or commenting on the issue).

Solution

To lock an issue, you must first create two blitz actions: Lock and Unlock. The actions are only visible to the issue assignee.

  • The Lock action sets the security level to Locked.

  • The Unlock action sets the security level back to none.

Create the security level

Create the security level:

Create the actions

Create the Lock and Unlock blitz actions.

Click Edit conditions. Enter the below scripts for each blitz action.
The Lock button is disabled if the security level is already Locked. The Unlock button is disabled if the security level is blank.

The buttons are only visible to the current assignee.

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

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

if( securityLevel == "Locked" ){
 	return DISABLED;
}
return ENABLED;
Unlock button condition script
Code Block
number ENABLED = 1;
number DISABLED = 2;
number HIDDEN = 3;

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

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

Now create the blitz action scripts.

For the Lock button, set the issue security to Locked. For the Unlock button, set it to none.

Lock button script
Code Block
securityLevel = "Locked";
Unlock button script
Code Block
 securityLevel = "";

Testing

Now you can test.

Info

You can set the value of a user picker as the allowed the User picker custom field to Allowed user instead of current Current assignee. Also, you can change the value of the custom field to the current Current user when locking an issue. This also resolves a common problem that users have encountered using Jira.

Table of Contents

Table of Contents