mail icon indicating copy to clipboard operation
mail copied to clipboard

In the search input above the envelope list, we should search in subject, to and from by default

Open GretaD opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe.

It will be more convenient if the search shortcut above the envelope will search throw more field rather than just the subject.

Describe the solution you'd like

In the search input above the envelope list, we should search in subject, to and from by default, and not only for subject matches.

Work packages

  • [x] Implementation
  • [ ] User manual documentation

Additional context

No response

GretaD avatar Nov 28 '23 10:11 GretaD

To search for matches in the subject OR the to field OR the from field we need to adapt the backend search API to also allow OR-ing search criteria. Right now everything is AND-ed.

  • \OCA\Mail\Controller\MessagesController::index needs a new parameter for this
  • \OCA\Mail\Contracts\IMailSearch::findMessages / \OCA\Mail\Service\Search\MailSearch::findMessages new a new parameter
  • Put the parameter into the search query object
  • Adjust \OCA\Mail\Db\MessageMapper::findIdsByQuery and similar. Make sure the other parameters are still AND-ed, like mailbox id, thread root id, etc. Basically it becomes a big AND with a sub expression for the ORs of the search.

ChristophWurst avatar Apr 24 '24 15:04 ChristophWurst

@ChristophWurst we don't actually need new parameters if we make it a token inside the query

hamza221 avatar May 27 '24 13:05 hamza221