From: miker Date: Tue, 3 Nov 2009 01:57:46 +0000 (+0000) Subject: add support for, and use, the mint_condition flag on holds and copies; adjust the... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e3f6d975be168527d7d6d2ed92b3ba7646ee6f66;p=evergreen%2Fbjwebb.git add support for, and use, the mint_condition flag on holds and copies; adjust the mint_condition upgrade script -- please ignore the possible failure on the post-COMMIT ALTER TABLE statement, that is generally expected git-svn-id: svn://svn.open-ils.org/ILS/trunk@14730 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/action.pm b/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/action.pm index 31136d417..6ae0a237c 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/action.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/action.pm @@ -96,7 +96,7 @@ __PACKAGE__->columns(Essential => qw/request_time capture_time fulfillment_time prev_check_time expire_time requestor usr cancel_cause hold_type holdable_formats target cancel_time shelf_time phone_notify email_notify selection_depth cancel_note - pickup_lib current_copy request_lib frozen thaw_date + pickup_lib current_copy request_lib frozen thaw_date mint_condition fulfillment_staff fulfillment_lib selection_ou cut_in_line/); #------------------------------------------------------------------------------- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/asset.pm b/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/asset.pm index 7a4dfbe5f..1b29698b4 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/asset.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/asset.pm @@ -46,7 +46,7 @@ __PACKAGE__->columns( Primary => qw/id/ ); __PACKAGE__->columns( Essential => qw/call_number barcode creator create_date editor edit_date copy_number status loan_duration circ_lib fine_level circulate deposit price ref opac_visible - circ_as_type circ_modifier deposit_amount location + circ_as_type circ_modifier deposit_amount location mint_condition holdable dummy_title dummy_author deleted alert_message age_protect/ ); diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm index d6b370795..3844dd91b 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm @@ -1019,7 +1019,8 @@ sub new_hold_copy_targeter { @$all_copies = grep { isTrue($_->status->holdable) && isTrue($_->location->holdable) && isTrue($_->holdable) && - !isTrue($_->deleted) + !isTrue($_->deleted) && + isTrue($hold->mint_condition) ? isTrue($_->mint_condition) : 1 } @$all_copies; # let 'em know we're still working diff --git a/Open-ILS/src/sql/Pg/upgrade/0065.schema.mint_condition.sql b/Open-ILS/src/sql/Pg/upgrade/0065.schema.mint_condition.sql index 9ee8fc0bc..394ddcaf8 100644 --- a/Open-ILS/src/sql/Pg/upgrade/0065.schema.mint_condition.sql +++ b/Open-ILS/src/sql/Pg/upgrade/0065.schema.mint_condition.sql @@ -13,3 +13,5 @@ ADD COLUMN mint_condition boolean NOT NULL DEFAULT TRUE; COMMIT; +ALTER TABLE auditor.action_hold_request ADD COLUMN mint_condition boolean NOT NULL DEFAULT TRUE; +