Reporter: incorrect link between hold_request & hold_request_cancel_cause

Bug #1161616 reported by tji@sitka.bclibraries.ca
38
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

Tags: reports
Ben Shum (bshum)
Changed in evergreen:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Jason Boyer (jboyer) wrote :

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",
 "ahrcc"."label" AS "Cause Label",
 "ahr"."cancel_cause" AS "Cancelation cause",
 COUNT(DISTINCT "ahr"."id") AS "Hold ID"
  FROM action.hold_request AS "ahr"
 LEFT OUTER JOIN action.hold_request_cancel_cause AS "ahrcc" ON ("ahr"."id" = "ahrcc"."id")
  WHERE date("ahr"."cancel_time") BETWEEN $_27678$2016-03-20$_27678$ AND $_27678$2016-03-26$_27678$
  GROUP BY 1, 2, 3
  ORDER BY "ahrcc"."id" ASC, "ahrcc"."label" ASC, "ahr"."cancel_cause" ASC, COUNT(DISTINCT "ahr"."id") ASC
) limited_to_1048575_hits LIMIT 1048575

See the end of line 6.

I can't see any reason in fm_IDL.xml that this would be the case, however.

Revision history for this message
Beth Willis (willis-a) wrote :

We are seeing this as well, exactly as described by Jason above.

Changed in evergreen:
status: Triaged → Confirmed
Revision history for this message
Beth Willis (willis-a) wrote :

Sorry, the above comment pertains to EG 2.12.2

Revision history for this message
Rogan Hamby (rogan-hamby) wrote :

Still affects 3.2.

tags: added: reports
Jason Boyer (jboyer)
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.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.