---
title: "Lock issues"
canonical: "https://support.appfire.com/space/PSJ/15482303/Lock%20issues"
format: markdown
---
Problem You want to lock an issue and ensure that only the issue assignee can edit it.  Power Actions™ allows an assignee to lock an issue (with only logging work or commenting on the issue possible), without the need to  Set Issue Security Level  or have the  Edit issue  permission. Solution To solve this problem, you can use Power Actions™ and the Issue Security Scheme. Begin by creating two actions:  Lock  and  Unlock .  The  Lock  action sets the security level to  Locked. The  Unlock  action sets the security level back to none. The actions are only visible to the issue assignee. Create the security level Create the security level as below: Create the actions Create the  Lock  and  Unlock  actions. Click  Edit conditions . Enter the following scripts for each action.  Lock button condition script 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 number ENABLED = 1;
number DISABLED = 2;
number HIDDEN = 3;

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

if(isNull(securityLevel)) {
 	return DISABLED;
}
return ENABLED; The  Lock  button is disabled if the security level is already  Locked . The  Unlock  button is disabled if the security level is  Null .  The buttons are only visible to the current assignee. For the  Lock  button, set the issue security to  Locked . For the  Unlock  button, set it to none. Lock button script securityLevel = "Locked"; Unlock button script  securityLevel = ""; Testing Now you can test. You can set the value of the  User picker  custom field to  Allowed user  instead of  Current assignee . Also, you can change the value of the custom field to  Current user  when locking an issue. This also resolves a common  problem  that users have encountered using Jira.  Table of Contents