LP1863196-Add series title to holds pull list.
authorGarry Collum <gcollum@gmail.com>
Sun, 26 Dec 2021 22:56:51 +0000 (17:56 -0500)
committerBill Erickson <berickxx@gmail.com>
Wed, 16 Mar 2022 21:45:50 +0000 (17:45 -0400)
This adds the series title as an column option in the holds pull list.

In the Hold Pull List template in the server print template adminstration
the variable 'hold.series_title' can be used.

One possible option would be to add series_title to the title cell.

Example:
<td style="width: 30%">[% hold.title %]<br>
[%IF hold.series_title %] Series: [% hold.series_title %][% END %]</td>

To Test the display:
1. Apply the patch.
2. Place a hold on a record with a series title.
3. Pull up the Holds Pull list and display the Series Title column.

To Test the Print Template:
1. Add the series_title variable to the hold pull list server template.
2. Display the Holds Pull list and click on the Print Full List button.
3. The print preview should display the series title information.

Signed-off-by: Garry Collum <gcollum@gmail.com>
Signed-off-by: Shula Link <slink@gchrl.org>
Signed-off-by: Bill Erickson <berickxx@gmail.com>

Open-ILS/src/eg2/src/app/staff/share/holds/grid.component.html
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm

index 8912709..d70e6d1 100644 (file)
       <eg-grid-column i18n-label label="CN Full label" path='cn_full_label' [hidden]="true"></eg-grid-column>
       <eg-grid-column i18n-label label="Part label" path='p_label' [hidden]="true"></eg-grid-column>
       <eg-grid-column i18n-label label="Author" path='author' [hidden]="true"></eg-grid-column>
+      <eg-grid-column i18n-label label="Series Title" path='series_title' [hidden]="true"></eg-grid-column>
       <ng-template #titleTmpl let-hold="row">
         <a class="no-href" routerLink="/staff/catalog/record/{{hold.record_id}}">
           {{hold.title}}
index 3a4359b..284bf12 100644 (file)
@@ -2196,7 +2196,8 @@ sub wide_hold_data {
     my $select = <<"    SQL";
 WITH
     t_field AS (SELECT field FROM config.display_field_map WHERE name = 'title'),
-    a_field AS (SELECT field FROM config.display_field_map WHERE name = 'author')
+    a_field AS (SELECT field FROM config.display_field_map WHERE name = 'author'),
+    s_field AS (SELECT field FROM config.display_field_map WHERE name = 'series_title')
 SELECT  h.id, h.request_time, h.capture_time, h.fulfillment_time, h.checkin_time,
         h.return_time, h.prev_check_time, h.expire_time, h.cancel_time, h.cancel_cause,
         h.cancel_note, h.target, h.current_copy, h.fulfillment_staff, h.fulfillment_lib,
@@ -2337,6 +2338,7 @@ SELECT  h.id, h.request_time, h.capture_time, h.fulfillment_time, h.checkin_time
 
         t.value AS title,
         a.value AS author,
+        s.value AS series_title,
 
         acpl.id AS acpl_id, acpl.name AS acpl_name, acpl.owning_lib AS acpl_owning_lib, acpl.holdable AS acpl_holdable,
         acpl.hold_verify AS acpl_hold_verify, acpl.opac_visible AS acpl_opac_visible, acpl.circulate AS acpl_circulate,
@@ -2376,6 +2378,7 @@ SELECT  h.id, h.request_time, h.capture_time, h.fulfillment_time, h.checkin_time
         JOIN actor.org_unit pl ON (h.pickup_lib = pl.id)
         JOIN t_field ON TRUE
         JOIN a_field ON TRUE
+        JOIN s_field ON TRUE
         LEFT JOIN action.hold_request_cancel_cause cc ON (h.cancel_cause = cc.id)
         LEFT JOIN biblio.monograph_part p ON (h.hold_type = 'P' AND p.id = h.target)
         LEFT JOIN serial.issuance siss ON (h.hold_type = 'I' AND siss.id = h.target)
@@ -2395,6 +2398,7 @@ SELECT  h.id, h.request_time, h.capture_time, h.fulfillment_time, h.checkin_time
         LEFT JOIN LATERAL (SELECT COUNT(*), MAX(notify_time) FROM action.hold_notification WHERE h.id = hold) n ON TRUE
         LEFT JOIN LATERAL (SELECT FIRST(value) AS value FROM metabib.display_entry WHERE source = r.bib_record AND field = t_field.field) t ON TRUE
         LEFT JOIN LATERAL (SELECT FIRST(value) AS value FROM metabib.display_entry WHERE source = r.bib_record AND field = a_field.field) a ON TRUE
+        LEFT JOIN LATERAL (SELECT FIRST(value) AS value FROM metabib.display_entry WHERE source = r.bib_record AND field = s_field.field) s ON TRUE
         LEFT JOIN LATERAL actor.org_unit_ancestor_setting('circ.holds.default_estimated_wait_interval',u.home_ou) AS default_estimated_wait_interval ON TRUE
         LEFT JOIN LATERAL actor.org_unit_ancestor_setting('circ.holds.min_estimated_wait_interval',u.home_ou) AS min_estimated_wait_interval ON TRUE
         LEFT JOIN LATERAL actor.org_unit_ancestor_setting('circ.hold_shelf_status_delay',h.pickup_lib) AS hold_wait_time ON TRUE,