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

Behaviours for Insight Multiple field is using old values and Search Option returned a null value

    XMLWordPrintableJSON

    Details

    • Sprint:
      SR4J Sprint 103
    • Critical Points:
      7.5

      Description

      Behaviour is unable to capture the latest Insight Multiple field value via JSD screen.

      First Scenario - Insight Multiple field option is using old values

      Steps to Reproduce

      1. Create two Insight Custom field
      2. Edit Insight field configuration and check the "Multiple" option
      3. Associate to a JSD screen.
      4. Create a Behaviour with the script below on the Insight field (multiple choice)
        def fieldA = getFieldByName("Insight Object 1")
        
        def fieldB = getFieldByName("Insight Object 2")
        
        log.warn "field value: "+fieldA.getValue()
        
        def values = fieldA.getValue()
        
        if(fieldA.getValue() == "HR-1")
        {
           fieldB.setHidden(false)
        }
        else
        {
           fieldB.setHidden(true)
        }
        
      5. Next, go to the JSD screen and select first option (e.g HR-1)
      6. In the server logs returned a null value:
        2021-03-01 08:27:29,665+0000 http-nio-8080-exec-39 WARN admin 507x36027x1 1mp60zg 172.17.0.1 /rest/scriptrunner/behaviours/latest/jsd/jsd/runvalidator.json [c.o.scriptrunner.runner.ScriptBindingsManager] field value: []
        
      7. Now, select another value on the field:
        2021-03-01 08:28:53,614+0000 http-nio-8080-exec-22 WARN admin 508x36030x1 1mp60zg 172.17.0.1 /rest/scriptrunner/behaviours/latest/jsd/jsd/runvalidator.json [c.o.scriptrunner.runner.ScriptBindingsManager] field value: [HR-1]
        

      Demo - Screen Recording 2021-03-01 at 4.36.17 PM.mp4

      Second Scenario - search option returned a null value

      Steps to Reproduce

      1. Search option (magnifying glass by the field) returned a null value from getValue() API.
      2. In the server log, its printed a null value:
        2021-03-16 09:23:28,117+0000 http-nio-8080-exec-5 WARN admin 563x1781x1 ne6tmt 172.17.0.1 /rest/scriptrunner/behaviours/latest/jsd/jsd/runvalidator.json [c.o.scriptrunner.runner.ScriptBindingsManager] field value: 
        

      Demo - Screen Recording 2021-03-16 at 5.23.34 PM.mp4

      Expected Behaviour

      Behaviour getValue() API should be capturing the latest value after field value changed from Insight Multiple field option. Also, magnifying glass by the field is able to return a field value.

      Actual Behaviour

      Behaviour getValue() API is returning a null/old value and magnifying glass by the field returned a null value.

      Additional Info

      • Tested on JIRA 8.14.0 and Insight 8.7.4
      • Behaviour getValue() API is working on Insight Select field option.

        Attachments

        1. image-2021-03-01-16-25-39-490.png
          198 kB
          John Chin Loong [X]
        2. image-2021-03-01-16-27-41-928.png
          154 kB
          John Chin Loong [X]
        3. image-2021-03-01-16-29-57-630.png
          139 kB
          John Chin Loong [X]
        4. Screen Recording 2021-03-01 at 4.36.17 PM.mp4
          12.81 MB
          John Chin Loong [X]
        5. Screen Recording 2021-03-16 at 5.23.34 PM.mp4
          12.97 MB
          John Chin Loong [X]
        6. screenshot-1.png
          23 kB
          John Chin Loong [X]

          Issue Links

            Activity

              People

              Assignee:
              dluksza Dariusz Luksza
              Reporter:
              jloong John Chin Loong [X] (Inactive)
              Votes:
              7 Vote for this issue
              Watchers:
              21 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: