Uploaded image for project: 'SR for Jira - Development'
  1. SR for Jira - Development
  2. SRJIRA-6367

Field becomes read-only despite not in the status configured in Behaviour

    XMLWordPrintableJSON

Details

    • Bug
    • Status: To Do
    • Low
    • Resolution: Unresolved
    • None
    • None
    • Behaviours
    • 1

    Description

      Summary

      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.

      Steps to Reproduce

      1. Create a custom field (I used single-line text for testing).
      2. Create a behaviour. Add the newly created custom field into the Behaviour and use a script similar to this :
        def field = getFieldById("customfield_XXXX")
        def status = underlyingIssue.status.name
        
        if (status != null && status != "Status_A") {
            field.setReadOnly(true)
        } else {
            field.setReadOnly(false)
        }
        
      3. Open some issue with status "Status_B" (any status other that "Status_A").
      4. Click "Edit" button to open edit dialog. Click the "Update" button.
      5. Transition the issue into the status "Status_A", and click "Edit" button to open edit dialog.
      6. Input an invalid username in a user picker field (I used the system field "Assignee" for this test) and click "Update" button.
      7. The edit dialog is still open with the error message, and the customfield becomes readonly.

      Video recording is attached.

      Expected Results

      Custom field will be editable as long as the issue is in Status_A

      Actual Results

      Custom field becomes read-only if the above conditions are met

      Notes

      • 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

      Attachments

        Activity

          People

            Unassigned Unassigned
            jwai Joe Wai
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: