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

Behaviour to clear the value of a selection list field does not work in JSD portal

    Details

    • Type: Bug
    • Status: Done (View Workflow)
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: 6.10.0
    • Fix Version/s: 6.12.0
    • Component/s: None
    • Labels:
    • Sprint:
      SR4J Sprint 87
    • Critical Points:
      1

      Description

      Issue:

      When mapping a behaviour to a Service Desk project, using .setFormValue(null) on a single select list does not perform as expected

      Steps to reproduce:

      Create a single select custom field (Field A) with 2 options, 'Yes' and 'No'
      Create a second single select custom field (Field B) with any number of random options
      Configure a Service Desk Ticket screen to include these fields
      Create a Behaviour that is mapped to the Service Desk Project using Service Desk mapping, and apply the code below
      Go to create a ticket, select a value in Field B, and then select 'No' in Field A

      Expected result:

      Value in Field B should be cleared

      Actual result:

      Value in Field B is no cleared

      Code used:

      Behaviour applied to Field A

      def SelectionListField = getFieldByName("Field B")
      def YesNoField = getFieldById(getFieldChanged())
      
      def selectedOption = YesNoField.getValue() as String
      def isYesSelected = selectedOption == "Yes"
      
      if (!isYesSelected)
      
      { SelectionListField.setFormValue(null) }
      

       

        Attachments

          Structure

            Activity

              People

              Assignee:
              jechlin Jamie Echlin
              Reporter:
              rbailey Bobby Bailey
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Structure Helper Panel