Details
-
Bug
-
Status: Done
-
Medium
-
Resolution: Done
-
6.10.0
-
None
-
SR4J Sprint 87
-
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) }