GNOME Bugzilla – Bug 250511
advanced search to be made more advanced (combined AND and OR)
Last modified: 2021-05-19 11:33:10 UTC
It would be cool if the advanced search (for emails) could be made a little bit more advanced. Currently, if you're searching on more than one criteria, you can do something analogous to: if (a || b || c ...) or if (a && b && c ...) It would be nice if we could go more complex than that, such as if ((a || b) && c ...) I'm not sure how the UI for this would look, but would be interested in looking at potential mockups.
yea, the ui is the hard part...
Here's one UI idea I've come up with. No idea if it's any good. In the Advanced Search Dialogue * Number the rules starting with 1 * In the Execute actions menu, add an option "Advanced" or "Advanced Boolean" or something * If that Advanced option is chosen, add a text entry widget, where the user can enter in something like ($1 || $2) && $3. Of course, the expressions should be allowed to be arbitrarily complex, and maybe different syntax would be better: (and (or $1 $2) $3) is a possibility. I've heard that entourage has something decent too, although I have't seen it.
Created attachment 43051 [details] my rockin' mockup of my proposed ui
There's a simpler solution, both UI and implemention wise; always show two lists of conditions. The lists would have the respective headings: "Require any of these:" "Require all of these:" This would allow for ((a && b) && (c || d)) rules, which should cover most use cases (I believe it covers maw's, after talking it over with him). Implementation should be fairly easy too. The list GUI code can be re-used, and you can glue the lists together using one of three expressions. (list-a && list-b) or (list-a) or (list-b) (The latter ones being used if one of the lists is empty).
Or, for the GUI, you could maintain one list and add an extra dropdown to each condition, with the options "Inclusive" and "Exclusive" (or "Not Mandatory" and "Mandatory", or whatever seems more user-friendly). It would work the same way behind the scenes, except you'd have to separate the "Inclusive" conditions from the "Exclusive" ones before building the expression.
You can do decent searches by entering sexps by hand. It's not very userfriendly - which isn't to say I don't appreciate the ability to do so, because I do! - and it's also not documented AFAIK. Also unfortunate is that the text entry widget is tiny, making it very hard to edit.
Oh, and with respect to HP's suggestion above, I think "Require any of these:" should be reworded to "Require at least one of these:"
updating version number, still missing in 2.5.
Bumping version to a stable release.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/Community/GettingInTouch/BugReportingGuidelines and create a new enhancement request ticket at https://gitlab.gnome.org/GNOME/evolution/-/issues/ Thank you for your understanding and your help.