Skip to content

[FIX] Since the user selector field supported multiple users, the indexing for the single user case was broken in that usernames with spaces '"John Doe"' (with quotes) was indexed instead of just 'John Doe' in certain cases and so you can't find that user

This fix needs to go to 19.x and 18.x too.

Basically, since the introduction of support for multiple users in the User Selector field, specifically 3a4e65de, a user like 'John Doe' would be saved in the db with the value of '"John Doe"' in the following cases (the csv formatting adds the quotes):

  • When auto-assign is off
  • When auto-assign is on but the item is edited after initial creation

This causes a problem in that the value is indexed as '"John Doe"' which makes it impossible to find the user when searching for 'John Doe'.

The multiple user case works fine as the csv-formatted value from the db is parsed to get back an array of usernames before indexing as MultiValue.

This fix gets back the old behavior for the single user case and preserve environment, and removes any chance anything else is broken inadvertently. It's also forward-compatible in the sense that 'John Doe' itself is a valid csv and so even if you assume the multi user case and parse into an array, it would still be fine.

Edited by Nelson Ko

Merge request reports