rt
rt copied to clipboard
Make 'BasedOn' custom field option works with custom fields with autocomplete type
Previously this option didn't do anything when a custom field was based on an field which set to the autocomplete type.
Fixes https://rt.bestpractical.com/Ticket/Display.html?id=37524
There maybe more elaborate solutions to prevent this JS firing when the autocomplete is 'in progress', but I went for the minimal approach.
Testing instructions:
- Make custom field 'Customer' with type 'Enter one value with autocompletion'
- Set some values for the Customer ('Customer 1', 'Customer 2')
- Make another Custom field 'Service' with type 'Select one value'
- Set the Service custom field to be Based on 'Customer'
- Add some values for the Service with the Category set to one of the customers, e.g.:
- Ensure both custom fields are applied to a queue and observe the behaviour on the create ticket page
Before this patch: 'Service' was always set to 'Nothing Selected'
After this patch:
The correct values are chosen in the Selection dropdown