Comment 1 for bug 2018534

Revision history for this message
Jeff Davis (jdavis-sitka) wrote (last edit ):

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.