Skip to content

Idea: parse search string in form

Bengfort requested to merge idea-parse-search-in-form into master

We worked a lot on subject search lately. Thinking about it again, I think there is room for simplification. Let me recap the thought process so far first:

  • We wanted to allow to search for more fields than just name:
  • In order to keep the UI simple, we decided to go with a single search string instead of multiple fields
  • It may be possible to decide whether a token from the search string is an email address, but it is not as clear how we would distinguish between first name, last name, and pseudonym. Also, there may be additional fields in the future.
  • We came up with a relatively complex database query that works without knowing which input relates to which field.
  • Then we realized that we used to pass data from the search form to the create form. We restored that in !1153 (merged) and !1155 (merged). In order to do that, we had to guess which parts of the input related to which field on the create form.

The two interesting parts here are:

  • One major reason (but not the only one) for not guessing was that it was hard to distinguish between pseudonyms and names. We do not intent to include pseudonyms in this search anymore, so this reason went away.
  • We guess anyway when passing data to the create form.

So my idea is to do the guessing in a single place (the form) and simplify everything else.

Merge request reports