-
Notifications
You must be signed in to change notification settings - Fork 530
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
Filters for date and datetime to search by week #2965
base: master
Are you sure you want to change the base?
Conversation
I figured out how to run the tests. Sorry for all the noise. I will debug and iterate locally now. |
Hi, This raise some design issues. It was supposed that the Converter class is user agnostic. I'll consider this enhancement when get a chance, maybe will re-implement, not sure. To add filters in a module:
|
Ok, sounds good. I thought about adding the feature in a module, but I couldn't figure out how to work around DateTimeTransformer. I'll see if I can figure something out. Thanks |
See https://github.com/espocrm/espocrm/blob/8.1.1/application/Espo/Core/Select/Where/ConverterFactory.php#L150. As an option, you can have this filters only for date view. |
You can also by pass the date-time transformer and rely only on where item converter for both date-times and dates. I think this would be the easiest and future-proof. |
This request adds a few filters to date and datetime fields:
Many businesses operate on a weekly basis, which makes searching, reporting, and filtering records with weekly filters very attractive. I currently build these filters into my instances manually. Instead of continuing to do that, I took the time to add the features to the application in a (hopefully) maintainable way.
If you do not like this feature or some of the changes, please let me know if there is anything I could change for it to be accepted. Otherwise, I will probably release the features as an extension, presuming I can figure how to do that.