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

Behaviours Mapping to selected Issue Type not working

    Details

    • Type: Bug
    • Status: Done (View Workflow)
    • Priority: Low
    • Resolution: Done
    • Affects Version/s: 6.4.0
    • Fix Version/s: 6.10.0
    • Component/s: Behaviours
    • Labels:
      None
    • Sprint:
      SR4J Sprint 87
    • Critical Points:
      4.9

      Description

      Steps to reproduce the problem:

      1. Create a behaviour mapping to project AA and issue type Bug only.
      2. Set description field to required using the UI toggle option.
      3. Go to Create Issue and change the issue type to Bug. We can see the description field is required but don't enter any value in it and click submit.
      4. You will force to enter the value in the description. Now, change issue type to Epic.
      5. Click submits to create the issue but you will not able to proceed.

      Demo - screen recording 2020-08-18 at 3.48.56 pm.mp4

      Expected Behaviour

      The behaviour mapping should run based on the selected issue type.

      Workaround

      1. Set to all projects and issue type mapping.
      2. Add the script below in the Initialiser section:
        def field1 = getFieldByName("Field Name 1") // change field name 1 to the valid field name
        def field2 = getFieldByName("Field Name 2")
        
        if(issueContext.issueType.name == "Task") //issue type that will trigger the field required
        {   
            field1.setRequired(true)
            field2.setRequired(true)
        }
        else
        {
            field1.setRequired(false)
            field2.setRequired(false)
        }
        

        Attachments

          Structure

            Activity

              People

              Assignee:
              dluksza Dariusz Luksza
              Reporter:
              jloong John Chin Loong
              Votes:
              6 Vote for this issue
              Watchers:
              10 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Structure Helper Panel