Reporter: incorrect link between hold_request & hold_request_cancel_cause
Bug #1161616 reported by
tji@sitka.bclibraries.ca
This bug affects 7 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Confirmed
|
Medium
|
Unassigned |
Bug Description
EG 2.2.5
I can see the cancellation cause id from the hold_request table, but it's always blank if I choose to display Cause ID and Cause Label from the "linked" cancellation cause table.
Tina
Changed in evergreen: | |
status: | New → Triaged |
importance: | Undecided → Medium |
tags: | added: reports |
summary: |
- Reporter: no link between hold_request & hold_request_cancel_cause + Reporter: incorrect link between hold_request & + hold_request_cancel_cause |
To post a comment you must log in.
We've run into this recently because a user was trying to get a count of cancellation reasons by date. Looking at the Debugging Output SQL somehow the Left Outer Join is trying to match ahr.id = ahrcc.id where it should be ahr.cancel_cause = ahrcc.id
SELECT * FROM (SELECT "ahrcc"."id" AS "Cause ID", "cancel_ cause" AS "Cancelation cause", hold_request_ cancel_ cause AS "ahrcc" ON ("ahr"."id" = "ahrcc"."id") ."cancel_ time") BETWEEN $_27678$ 2016-03- 20$_27678$ AND $_27678$ 2016-03- 26$_27678$ cancel_ cause" ASC, COUNT(DISTINCT "ahr"."id") ASC to_1048575_ hits LIMIT 1048575
"ahrcc"."label" AS "Cause Label",
"ahr".
COUNT(DISTINCT "ahr"."id") AS "Hold ID"
FROM action.hold_request AS "ahr"
LEFT OUTER JOIN action.
WHERE date("ahr"
GROUP BY 1, 2, 3
ORDER BY "ahrcc"."id" ASC, "ahrcc"."label" ASC, "ahr"."
) limited_
See the end of line 6.
I can't see any reason in fm_IDL.xml that this would be the case, however.