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

Behaviours Mapping to selected Issue Type not working

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Done
    • Low
    • Resolution: Cannot Reproduce
    • 6.4.0
    • 6.22.0, 6.31.0
    • Behaviours
    • None
    • SR4J Sprint 87, SR4J Sprint 104
    • 7.1

    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

        Activity

          People

            wsignoretti Wagner Signoretti
            jloong John Chin Loong [X] (Inactive)
            Votes:
            7 Vote for this issue
            Watchers:
            14 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: