Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AdvancedSearch support for filtering mails before a given date #1606

Merged
merged 2 commits into from
Jun 9, 2024

Conversation

codiflow
Copy link

The current implementation of AdvancedSearch only allows filtering of emails which arrived since a given date. As one can easily modify the search string (which for example is since=2024-05-27) to also filter mails which have arrived until a given date we should also add this functionality to the drop down as well to make it easier for users to access this option.

There are some small things to consider before merging this:

  1. Currently { id: -1, name: i18n(prefix + 'ALL') }, filters for all mails. Maybe it would be better to switch to 0 here instead of -1 to have it designed more intuitively like all positive numbers are searches before a given date and all negative numbers are searches until a given date.
  2. The language strings have no prefix (yet) which differentiates between since and before. We should add that (see my comment in the code before let prefix = 'SEARCH/DATE_';)
  3. The corresponding language strings are missing yet because I couldn't find the respective files – would be glad if you could tell me where to find them.
  4. The code has not been tested yet because I've no dev setup in place currently.

@codiflow codiflow changed the title Add AdvancedSearch support for filtering older mails Add AdvancedSearch support for filtering mails before a given date May 27, 2024
@the-djmaze
Copy link
Owner

The translations can be found here:

"DATE_ALL": "All",
"DATE_3_DAYS": "Up to 3 days old",
"DATE_7_DAYS": "Up to 1 week old",
"DATE_MONTH": "Up to 1 month old",
"DATE_3_MONTHS": "Up to 3 months old",
"DATE_6_MONTHS": "Up to 6 months old",
"DATE_YEAR": "Up to 1 year old",

the-djmaze pushed a commit that referenced this pull request Jun 3, 2024
@codiflow
Copy link
Author

codiflow commented Jun 9, 2024

Thank you for merging this – I did not have the time yet to adapt the lanugage strings. Thank you for doing that for me 🙏

@codiflow codiflow closed this Jun 9, 2024
@the-djmaze
Copy link
Owner

the-djmaze commented Jun 9, 2024

It's not merged. But i will add your changes

@the-djmaze the-djmaze added the enhancement New feature or request label Jun 9, 2024
@the-djmaze the-djmaze reopened this Jun 9, 2024
@the-djmaze the-djmaze merged commit 13543e3 into the-djmaze:master Jun 9, 2024
2 checks passed
the-djmaze pushed a commit that referenced this pull request Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants