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

Behaviours don't preset or lock issue type field

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 5.3.7
    • Fix Version/s: 5.4.28
    • Component/s: Behaviours
    • Labels:
      None
    • Critical Points:
      3.1

      Description

      To reproduce:

      • Create a behaviour containing only the following initialiser or server-side field script:
      import com.atlassian.jira.component.ComponentAccessor
      import com.onresolve.jira.groovy.user.FieldBehaviours
      import groovy.transform.BaseScript
      
      import static com.atlassian.jira.issue.IssueFieldConstants.ISSUE_TYPE
      
      @BaseScript FieldBehaviours fieldBehaviours
      
      def constantsManager = ComponentAccessor.getConstantsManager()
      def queryIssueType = constantsManager.getAllIssueTypeObjects().find { it.name == "Improvement" }
      getFieldById(ISSUE_TYPE).with {
          setFormValue(queryIssueType.id)
          setReadOnly(true)
         setDescription("This is a description from a behaviour")
      }
      • Open up the issue creation screen in an applicable project.

      Behaviour in 5.2.2: Issue type is set to Improvement and is read-only.

      Behaviour in latest: Nothing appears to happen and the following message appears in the browser (Chrome) console log:

      [SR Behaviours] Unrecognised backend ID, or possibly field with no available options: issueTypeId
      [SR Behaviours] Field not found: issueTypeId

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ahasan Ashraful Hasan [X] (Inactive)
              Reporter:
              jchoules Joanna Choules
              Votes:
              8 Vote for this issue
              Watchers:
              19 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: