Hold Request -> Cancelation cause reports link is broken when creating templates

Bug #1963542 reported by Chris Sharp
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Evergreen
New
Undecided
Unassigned

Bug Description

When trying to get information related to bug 1963541, PINES staff discovered that the linkage between action.hold_request and action.hold_request_cancel_cause is not being created correctly by the SQL builder. Example reporter-generated SQL (table aliases cleaned up for readability):

============================================

SELECT ahr."cancel_time" AS "Hold Cancel Date/Time",
        cancel_cause."label" AS "Cause Label",
        ahr."cancel_note" AS "Cancelation note",
        bre."tcn_value" AS "TCN Value",
        ahr_usr_card."barcode" AS "Barcode"
  FROM action.hold_request AS ahr
        LEFT OUTER JOIN action.hold_request_cancel_cause AS cancel_cause ON (ahr."id" = cancel_cause."id")
        INNER JOIN actor.usr AS ahr_usr ON (ahr."usr" = ahr_usr."id")
        INNER JOIN actor.card AS ahr_usr_card ON (ahr_usr."card" = ahr_usr_card."id")
        LEFT OUTER JOIN reporter.hold_request_record AS rhrr ON (ahr."id" = rhrr."id")
        LEFT OUTER JOIN biblio.record_entry AS bre ON (rhrr."bib_record" = bre."id")
  WHERE date(ahr."cancel_time") >= '2022-03-01'
  GROUP BY 1, 2, 3, 4, 5
  ORDER BY ahr."cancel_time" ASC, cancel_cause."label" ASC, ahr."cancel_note" ASC, bre."tcn_value" ASC, ahr_usr_card."barcode" ASC

==============================================

(ahr."id" = cancel_cause."id") should be (ahr."cancel_cause" = cancel_cause."id")

Evergreen 3.8

Tags: reports
Revision history for this message
Steve Callender (stevecallender) wrote :

Looks like this is still an issue in 3.11. You can't report on the cancel cause label because the linkage is broken.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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