rt icon indicating copy to clipboard operation
rt copied to clipboard

Make 'BasedOn' custom field option works with custom fields with autocomplete type

Open danpoltawski opened this issue 1 year ago • 3 comments

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.: Screenshot 2023-01-02 at 11 55 45
  • 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 Screenshot 2023-01-02 at 11 59 00

danpoltawski avatar Jan 02 '23 11:01 danpoltawski