add support for, and use, the mint_condition flag on holds and copies; adjust the...
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 3 Nov 2009 01:57:46 +0000 (01:57 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 3 Nov 2009 01:57:46 +0000 (01:57 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@14730 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/action.pm
Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/asset.pm
Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm
Open-ILS/src/sql/Pg/upgrade/0065.schema.mint_condition.sql

index 31136d4..6ae0a23 100644 (file)
@@ -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/);
 
 #-------------------------------------------------------------------------------
index 7a4dfbe..1b29698 100644 (file)
@@ -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/ );
 
index d6b3707..3844dd9 100644 (file)
@@ -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
index 9ee8fc0..394ddca 100644 (file)
@@ -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;
+