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

(JSD) Field converted to MultiSelect, loses its value after conversion

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Done
    • Affects Version/s: 6.9.1
    • Fix Version/s: 6.20.0
    • Component/s: Behaviours
    • Labels:
    • Sprint:
      SR4J Sprint 91, SR4J Sprint 92
    • Critical Points:
      1

      Description

      Steps to Reproduce

      1. Add two text fields to the project example Field A and Field B
      2. Create two REST Endpoints with some sample data for the fields respectively. Field A and Field B need to be converted into Multi-Select fields. The values of Field B will be updated based on the option selected in Field A.
      3. Create a Behaviour Initialiser and a Server Side Behaviour for Field A. Below is the sample Initialiser Code
        getFieldByName("Field A").convertToMultiSelect([ 
            ajaxOptions: [
                url           : getBaseUrl() + "/rest/scriptrunner/latest/custom/eventTypes", 
                query         : true, 
                keyInputPeriod: 500, 
                formatResponse: "general", 
            ]
        ])
        

        Below is a sample Server Side Behaviour code

        def fieldA = getFieldById(fieldChanged)
        
        def fieldAValue = fieldA.value.toString()
        
        getFieldByName("Field B").convertToMultiSelect([ 
            ajaxOptions: [
                url           : getBaseUrl() + "/rest/scriptrunner/latest/custom/books?query${fieldAValue}", 
                query         : true, 
                keyInputPeriod: 500, 
                formatResponse: "general", 
            ]
        ])
        
      4. Select an option from in Field A.
      5. Next, select an available option from Field B.
      6. Add another option to Field A.

      Current Behaviour

      When another option is added to Field A, Field B resets.
      Currently, this is only occurring on the Service Desk. It doesn't happen on Jira Server.

      Expected Behaviour

      If another option is added to the first multi-select field, the second multi-select field should not reset.

      Additional Information

      Below is a short test video on both Jira Service Desk and Jira Server.
      test1.mp4

        Attachments

          Activity

            People

            Assignee:
            dluksza Dariusz Luksza
            Reporter:
            rkumar Ram Kumar Aravindakshan
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: