New request
#19739: Relative Dates not working as expected
We'll provision a sandbox, run an agent against the issue, and open a draft PR. You can pull the branch and iterate from there.
Today is the Thursday the 16th of April (where I am).
If I add a View Filter on a Date field and choose Is Relative, then set it to Past 1 Quarter, it will select the dates between 1st Jan and 31st March. That's great.
If instead I set it to Past 1 Week, it will select the dates between the Friday the 10rd of April and Thursday the 16th of April. It's effectively treating this as the past 7 days.
This is not what I expected, based on the behaviour of Quarter. I expected it to select Sunday the 5th of April to Saturday the 11th of April. ie. Last Calendar week.
Same thing happens with Month and Year. So basically the Past/Next behavior is inconsistent between Quarter and Week/Month/Year.
Why is this a bug, and not just a difference of opinion?
Because the current behaviour can be achieved by using Past 7 days. There is currently no way to achieve Last Calendar Week.
Now, I understand it might be undesirable to change this behaviour given people are used to it. In which case, can you at least introduce Calendar Month/Week/Year in addition to the current Month/Week/Year? As I said, without it, seeing all Orders from Last week (as opposed to the last 7 days) is impossible.
Inconsistent relative date filtering between quarter and week/month/year indicates buggy date-boundary computation in filter logic.
- packages/twenty-front/src/modules/views/utils
- packages/twenty-front/src/modules/object-record/hooks
- packages/twenty-shared/src/types
- packages/twenty-server/src/engine/core-modules