From 2b2d910201be324fcaed315a56acb0328e7152a7 Mon Sep 17 00:00:00 2001 From: Chris Sharp Date: Wed, 28 Sep 2016 14:36:11 -0400 Subject: [PATCH] LP#1628639 - Reporter Classic Item List source improvements This changes the following: 1) Capitalize the first letters of all words in title and author. 2) Display the copy status name (previously only available through the "Status" link) 3) Add a link to the last editing user. No DB upgrade script. To apply re-run Open-ILS/src/sql/Pg/example.reporter-extension.sql Signed-off-by: Chris Sharp --- Open-ILS/examples/fm_IDL.xml | 17 ++++++++++------- Open-ILS/src/sql/Pg/example.reporter-extension.sql | 19 ++++++++++++------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index 7126f16779..8a729b2930 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -11215,7 +11215,7 @@ SELECT usr, - + @@ -11234,14 +11234,16 @@ SELECT usr, - + + - + + @@ -11249,13 +11251,14 @@ SELECT usr, - + - + + - + - + diff --git a/Open-ILS/src/sql/Pg/example.reporter-extension.sql b/Open-ILS/src/sql/Pg/example.reporter-extension.sql index 5095aeecf6..5bb754a2f3 100644 --- a/Open-ILS/src/sql/Pg/example.reporter-extension.sql +++ b/Open-ILS/src/sql/Pg/example.reporter-extension.sql @@ -172,10 +172,10 @@ SELECT x.id AS id, JOIN actor.usr_address paddr ON (paddr.id = u.billing_address); CREATE OR REPLACE VIEW reporter.classic_item_list AS -SELECT rmsr.title, - rmsr.author, +SELECT initcap(rmsr.title) AS title, + initcap(rmsr.author) AS author, rmsr.pubdate, - cp.id, + cp.id AS copy_id, cp.price, cp.barcode, cn.label as call_number_label, @@ -212,18 +212,20 @@ SELECT rmsr.title, cn.owning_lib, cl.shortname AS circ_lib_name, cl.id AS circ_lib, - cp.creator, + creator.id AS creator_id, + editor.id AS editor_id, cp.age_protect, cp.opac_visible, cp.ref, cp.deposit_amount, cp.deleted, rmsr.tcn_value, - cp.status, + status.id AS status_id, + status.name AS status_name, circ.stop_fines, circ.due_date, - circ_card.barcode as patron_barcode, - circ_u.first_given_name || ' ' || circ_u.family_name as patron_name + circ_card.barcode AS patron_barcode, + circ_u.first_given_name || ' ' || circ_u.family_name AS patron_name FROM asset.copy cp JOIN extend_reporter.full_circ_count erfcc ON (cp.id = erfcc.id) JOIN asset.copy_location sl ON (cp.location = sl.id) @@ -231,8 +233,11 @@ SELECT rmsr.title, JOIN actor.org_unit ol ON (cn.owning_lib = ol.id) JOIN actor.org_unit cl ON (cp.circ_lib = cl.id) JOIN reporter.materialized_simple_record rmsr ON (cn.record = rmsr.id) + JOIN config.copy_status status ON (cp.status = status.id) LEFT JOIN action.circulation circ ON (circ.target_copy = cp .id AND circ.checkin_time IS NULL) LEFT JOIN actor.usr circ_u ON (circ_u.id = circ.usr) + LEFT JOIN actor.usr creator ON (cp.creator = creator.id) + LEFT JOIN actor.usr editor ON (cp.editor = editor.id) LEFT JOIN actor.card circ_card ON (circ_u.card = circ_card.id) LEFT JOIN asset.stat_cat_entry_copy_map sc1 ON (sc1.owning_copy = cp.id AND sc1.stat_cat = 1) LEFT JOIN asset.stat_cat_entry sce1 ON (sce1.id = sc1.stat_cat_entry) -- 2.11.0