Incorrect total circs for current/previous year in Item Status
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Medium
|
Unassigned | ||
3.10 |
Fix Released
|
Medium
|
Unassigned | ||
3.9 |
Fix Released
|
Medium
|
Unassigned |
Bug Description
EG 3.9+
PostgreSQL 14
In Item Status Detail View, the "Total Circs - Current Year" and "Total Circs - Prev Year" counts always show as 0, instead of showing the actual number of circs for that item.
The issue appears to be that the open-ils.
I don't know why the Postgres version matters since the year is ultimately EXTRACT'ed from a timestamp, and such values ought to be numeric in all versions of Postgres.
(This bug is not to be confused with bug 1746300.)
Changed in evergreen: | |
assignee: | nobody → Jeff Davis (jdavis-sitka) |
tags: | added: itemstatus |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
Changed in evergreen: | |
importance: | Undecided → Medium |
Working branch user/jeffdavis/ lp2018534- numeric- circbyyr fixes the issue by forcing the staff client to treat circbyyr years as numbers:
https:/ /git.evergreen- ils.org/ ?p=working/ Evergreen. git;a=shortlog; h=refs/ heads/user/ jeffdavis/ lp2018534- numeric- circbyyr
Test plan:
1. On a server with a Postgres 14 database, go to Item Status and scan an item with at least one circ for the current year.
2. Click Detail View. "Total Circs - Current Year" shows 0 circs.
3. Apply the fix.
4. Repeat steps 1-2. "Total Circs - Current Year" should now show the correct circ count for this year (and the previous year).
Kudos to Jason Boyer for noticing that Postgres changed the return type for EXTRACT from double precision to numeric; this appears to be what introduced the problem. The return type was changed in PG14, so Postgres versions up to and including PG13 will be unaffected by this bug.