When specifying a field to be read-only dependent on the status, if an issue is transitioned from a read-only status to the editable status, then experiences an error with a user picker field, the field becomes read-only.
- Create a custom field (I used single-line text for testing).
- Create a behaviour. Add the newly created custom field into the Behaviour and use a script similar to this :
- Open some issue with status "Status_B" (any status other that "Status_A").
- Click "Edit" button to open edit dialog. Click the "Update" button.
- Transition the issue into the status "Status_A", and click "Edit" button to open edit dialog.
- Input an invalid username in a user picker field (I used the system field "Assignee" for this test) and click "Update" button.
- The edit dialog is still open with the error message, and the customfield becomes readonly.
Video recording is attached.
Custom field will be editable as long as the issue is in Status_A
Custom field becomes read-only if the above conditions are met
- In step 4, if the user does not click on 'Update' and instead transitions directly to Status_A, the issue will not occur.
- Tested in JIRA 9.3.0 with ScriptRunner 7.6.0