From 58c70051d6ed18524128a1268e28c62d214dd97a Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 11 Feb 2014 14:34:42 -0500 Subject: [PATCH] FF additional hold mediation SQL repairs oils_json_to_text() should not be used against boolean values. They can be cast directly to SQL BOOL's. Signed-off-by: Bill Erickson --- Open-ILS/src/sql/Pg/fulfillment-mods.sql | 2 +- Open-ILS/src/templates/staff/fulfillment/t_item_table.tt2 | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/sql/Pg/fulfillment-mods.sql b/Open-ILS/src/sql/Pg/fulfillment-mods.sql index a34a151468..f9791a693f 100644 --- a/Open-ILS/src/sql/Pg/fulfillment-mods.sql +++ b/Open-ILS/src/sql/Pg/fulfillment-mods.sql @@ -100,7 +100,7 @@ $func$ LANGUAGE PLPGSQL; CREATE FUNCTION action.hold_request_mediated () RETURNS TRIGGER AS $f$ BEGIN - SELECT COALESCE(oils_json_to_text(value)::BOOL,FALSE) INTO NEW.frozen + SELECT COALESCE(value::BOOL,FALSE) INTO NEW.frozen FROM actor.org_unit_ancestor_setting('ff.request.force_mediation', NEW.request_lib); RETURN NEW; END; diff --git a/Open-ILS/src/templates/staff/fulfillment/t_item_table.tt2 b/Open-ILS/src/templates/staff/fulfillment/t_item_table.tt2 index 30fb2f6cbb..f0412266b8 100644 --- a/Open-ILS/src/templates/staff/fulfillment/t_item_table.tt2 +++ b/Open-ILS/src/templates/staff/fulfillment/t_item_table.tt2 @@ -17,6 +17,7 @@ COLUMNS = [ {name => 'copy_circ_lib', label => l('Copy Library')}, {name => 'request_time', label => l('Request Date'), tabs => 'tab_pending', extra => "| date:'shortDate'"}, {name => 'expire_time', label => l('Expire Date'), tabs => 'tab_pending', extra => "| date:'shortDate'"}, + {name => 'frozen', label => l('Active'), tabs => 'tab_pending'}, {name => 'hold_request_lib', label => l('Requesting Library'), tabs => 'tab_pending'}, {name => 'hold_pickup_lib', label => l('Pickup Library'), tabs => 'tab_pending'} {name => 'transit_time', label => l('Transit Date'), tabs => 'tab_inbound || tab_outbound', extra => "| date:'shortDate'"}, @@ -56,6 +57,8 @@ COLUMNS = [ ng-init="addColumn({name : '[% col.name %]', label : '[% col.label %]'})"> [% IF col.name == 'copy_barcode' %] {{item.copy_barcode}} + [% ELSIF col.name == 'frozen' %] + {{!item.frozen}} [% ELSE %] {{item.[% col.name %][% col.extra IF col.extra %]}} [% END %] -- 2.11.0