Months Ago Filter Label Confusing and Misleading
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Low
|
Unassigned | ||
3.4 |
Fix Released
|
Low
|
Unassigned |
Bug Description
This may have been intentional in the original implementation but the 'months ago' filter in the reporter excludes months that are part of years and only reports remainders. This means that the filter is not useful without a secondary filter for years. This isn't indicated in any intuitive way (or unintuitive IMO) by the label.
For more context,
Example generated query portion:
SELECT EXTRACT(MONTH FROM AGE(NOW(
Using a timestamp of '2019-01-10 11:27:04-05' as an example:
SELECT EXTRACT(MONTH FROM AGE(NOW(
date_part
-----------
5
(1 row)
This is because EXTRACT only gives the MONTHS provided by AGE not total months:
SELECT AGE(NOW(
age
-------
1 year 5 mons 20 days 02:07:29.708954
(1 row)
Thus a filter set for 9 months ago or older would not catch this even though it's actually 17 months ago. Also a filter set for 3 months ago would false value (based on intent) a value from years ago so long as the remainder was 3 months.
The function should either be relabled (no recommendation for what) or (my opinion) actually return the number of months ago by extracting year and multiplying it as well. Is anyone using reports with this in such a way that the change would break that?
Changed in evergreen: | |
assignee: | nobody → Rogan Hamby (rogan-hamby) |
Changed in evergreen: | |
milestone: | none → 3.5.1 |
status: | New → Confirmed |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
The second option is really the only sane one, and seems straight forward to do. Thus:
https:/ /git.evergreen- ils.org/ ?p=working/ Evergreen. git;a=shortlog; h=refs/ heads/user/ miker/lp- 1885759- correct- month-count