[open-ils-commits] [GIT] Evergreen ILS branch master updated. df467c8cd0feeee08ce401544e60453899aa4ed7

Evergreen Git git at git.evergreen-ils.org
Thu Jul 7 15:25:45 EDT 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  df467c8cd0feeee08ce401544e60453899aa4ed7 (commit)
       via  8b83743961623b69f2803a6ae28a373fcd03fcc3 (commit)
       via  2dc603fc4f94920181dbb48f81792f923f22c129 (commit)
       via  78060e952bef17e91d6b7c3180c56f1aa52965af (commit)
       via  20735bf13454c3d9bdcc958805228c85ec7af031 (commit)
       via  49d8828b18ebf2e091e3af1a9f70cec82d62eb69 (commit)
      from  3bade44241f9c77cf2cc6bffc4bdf78cca1ebbea (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit df467c8cd0feeee08ce401544e60453899aa4ed7
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Jul 6 16:34:41 2011 -0400

    Correct CDBI field name on biblio::peer_bib_copy_map
    
    Signed-off-by: Mike Rylander <mrylander at gmail.com>
    Signed-off-by: Jason Etheridge <jason at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/biblio.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/biblio.pm
index 44dbd4a..24e484c 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/biblio.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/biblio.pm
@@ -35,7 +35,7 @@ package biblio::peer_bib_copy_map;
 use base qw/biblio/;
 
 biblio::peer_bib_copy_map->table( 'biblio_peer_bib_copy_map' );
-biblio::peer_bib_copy_map->columns( Essential => qw/id peer_type peer_bib target_copy/ );
+biblio::peer_bib_copy_map->columns( Essential => qw/id peer_type peer_record target_copy/ );
 #-------------------------------------------------------------------------------
 
 #-------------------------------------------------------------------------------

commit 8b83743961623b69f2803a6ae28a373fcd03fcc3
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Jul 7 14:08:28 2011 -0400

    Ignore part-mapped copies for mr/title/volume holds
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Jason Etheridge <jason at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
index 0a056ac..48abee94 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
@@ -2284,11 +2284,13 @@ sub _check_title_hold_is_possible {
                         }
                     },
                     acpl => { field => 'id', filter => { holdable => 't'}, fkey => 'location' },
-                    ccs  => { field => 'id', filter => { holdable => 't'}, fkey => 'status'   }
+                    ccs  => { field => 'id', filter => { holdable => 't'}, fkey => 'status'   },
+                    acpm => { field => 'target_copy', type => 'left' } # ignore part-linked copies
                 }
             }, 
             where => {
-                '+acp' => { circulate => 't', deleted => 'f', holdable => 't', %org_filter }
+                '+acp' => { circulate => 't', deleted => 'f', holdable => 't', %org_filter },
+                '+acpm' => { target_copy => undef } # ignore part-linked copies
             }
         }
     );
@@ -2657,6 +2659,14 @@ sub _check_volume_hold_is_possible {
 	my $copies = new_editor->search_asset_copy({call_number => $vol->id, %org_filter});
 	$logger->info("checking possibility of volume hold for volume ".$vol->id);
 
+    my $filter_copies = [];
+    for my $copy (@$copies) {
+        # ignore part-mapped copies for regular volume level holds
+        push(@$filter_copies, $copy) unless
+            new_editor->search_asset_copy_part_map({target_copy => $copy->id})->[0];
+    }
+    $copies = $filter_copies;
+
     return (
         0, 0, [
             new OpenILS::Event(

commit 2dc603fc4f94920181dbb48f81792f923f22c129
Author: Mike Rylander <mrylander at gmail.com>
Date:   Fri Jun 24 14:53:50 2011 -0400

    Add Class::DBI linking for monograph parts (and some for conjoined items AKA peer bibs)
    
    Signed-off-by: Mike Rylander <mrylander at gmail.com>
    Signed-off-by: Jason Etheridge <jason at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI.pm
index 4cec39f..1bf550d 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI.pm
@@ -506,6 +506,15 @@ sub modify_from_fieldmapper {
 
 	action::survey_answer->has_a( question => 'action::survey_question' );
 
+	biblio::peer_bib_copy_map->has_a( target_copy => 'asset::copy' );
+	biblio::peer_bib_copy_map->has_a( peer_record => 'biblio::record_entry' );
+	biblio::peer_bib_copy_map->has_a( peer_type => 'biblio::peer_type' );
+
+	asset::copy_part_map->has_a( target_copy => 'asset::copy' );
+	asset::copy_part_map->has_a( part => 'biblio::monograph_part' );
+
+	biblio::peer_type->has_many( records => 'biblio::record_entry' );
+
 	asset::copy_note->has_a( owning_copy => 'asset::copy' );
 	asset::copy_note->has_a( creator => 'actor::user' );
 
@@ -514,6 +523,9 @@ sub modify_from_fieldmapper {
 
 	asset::copy->has_many( stat_cat_entries => [ 'asset::stat_cat_entry_copy_map' => 'stat_cat_entry' ] );
 	asset::copy->has_many( stat_cat_entry_copy_maps => 'asset::stat_cat_entry_copy_map' );
+	asset::copy->has_many( peer_bib_copy_maps => 'biblio::peer_bib_copy_map' );
+
+	asset::copy->has_many( part_maps => 'asset::copy_part_map' );
 
 	asset::copy->has_a( call_number => 'asset::call_number' );
 	asset::copy->has_a( creator => 'actor::user' );
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/biblio.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/biblio.pm
index 7780cbc..44dbd4a 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/biblio.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/biblio.pm
@@ -31,11 +31,11 @@ biblio::peer_type->columns( Essential => qw/id name/ );
 #-------------------------------------------------------------------------------
 
 #-------------------------------------------------------------------------------
-package biblio::peer_record_copy_map;
+package biblio::peer_bib_copy_map;
 use base qw/biblio/;
 
-biblio::peer_record_copy_map->table( 'biblio_peer_record_copy_map' );
-biblio::peer_record_copy_map->columns( Essential => qw/id peer_type peer_record target_copy/ );
+biblio::peer_bib_copy_map->table( 'biblio_peer_bib_copy_map' );
+biblio::peer_bib_copy_map->columns( Essential => qw/id peer_type peer_bib target_copy/ );
 #-------------------------------------------------------------------------------
 
 #-------------------------------------------------------------------------------
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/dbi.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/dbi.pm
index 5c6990f..ae9bfda 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/dbi.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/dbi.pm
@@ -4,6 +4,7 @@
     package asset::copy_part_map;
 
     asset::copy_part_map->table( 'asset.copy_part_map' );
+    asset::copy_part_map->sequence( 'asset.copy_part_map_id_seq' );
 
     #-------------------------------------------------------------------------------
     package biblio::monograph_part;
@@ -12,10 +13,10 @@
     biblio::monograph_part->sequence( 'biblio.monograph_part_id_seq' );
 
 	#-------------------------------------------------------------------------------
-	package biblio::peer_record_copy_map;
+	package biblio::peer_bib_copy_map;
 
-	biblio::peer_record_copy_map->table( 'biblio.peer_record_copy_map' );
-	biblio::peer_record_copy_map->sequence( 'biblio.peer_record_copy_map_id_seq' );
+	biblio::peer_bib_copy_map->table( 'biblio.peer_bib_copy_map' );
+	biblio::peer_bib_copy_map->sequence( 'biblio.peer_bib_copy_map_id_seq' );
 
 	#-------------------------------------------------------------------------------
 	package biblio::peer_type;

commit 78060e952bef17e91d6b7c3180c56f1aa52965af
Author: Mike Rylander <mrylander at gmail.com>
Date:   Fri Jun 24 14:54:31 2011 -0400

    Correct a documentation comment
    
    Signed-off-by: Mike Rylander <mrylander at gmail.com>
    Signed-off-by: Jason Etheridge <jason at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm
index b0d4fc8..01212da 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm
@@ -636,7 +636,7 @@ __PACKAGE__->register_method(
             { desc => 'Biblio record entry Id', type => 'number' }
         ],
         return => {
-            desc => 'True if specified id can be found in biblio.peer_record_copy_map.peer_record.',
+            desc => 'True if specified id can be found in biblio.peer_bib_copy_map.peer_record.',
             type => 'bool'
         }
     }

commit 20735bf13454c3d9bdcc958805228c85ec7af031
Author: Mike Rylander <mrylander at gmail.com>
Date:   Fri Jun 24 14:55:49 2011 -0400

    Filter out copies that have a monograph part designator when the hold is a non-P hold
    
    Signed-off-by: Mike Rylander <mrylander at gmail.com>
    Signed-off-by: Jason Etheridge <jason at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm
index c9743e2..ca1e0df 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm
@@ -1270,7 +1270,8 @@ sub new_hold_copy_targeter {
 						isTrue($_->location->holdable) && 
 						isTrue($_->holdable) &&
 						!isTrue($_->deleted) &&
-						(isTrue($hold->mint_condition) ? isTrue($_->mint_condition) : 1)
+						(isTrue($hold->mint_condition) ? isTrue($_->mint_condition) : 1) &&
+						($hold->hold_type ne 'P' ? @{ $_->part_maps } == 0 : 1)
 					} @$all_copies;
 
 			# let 'em know we're still working

commit 49d8828b18ebf2e091e3af1a9f70cec82d62eb69
Author: Bill Erickson <berick at esilibrary.com>
Date:   Tue Jun 28 14:51:43 2011 -0400

    Suggest parts selection on failed parts-capable hold
    
    When a title has copy parts and the user does not select a specific part
    for the hold, treat it as a regular title hold.  If the title hold
    fails, suggest to the user that he/she should select a specific part,
    since that opens the door to a new set of potentially capturable copies,
    which allow the hold to be successfully placed.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Jason Etheridge <jason at esilibrary.com>

diff --git a/Open-ILS/web/opac/locale/en-US/opac.dtd b/Open-ILS/web/opac/locale/en-US/opac.dtd
index cac50e0..d5be2c2 100644
--- a/Open-ILS/web/opac/locale/en-US/opac.dtd
+++ b/Open-ILS/web/opac/locale/en-US/opac.dtd
@@ -450,6 +450,7 @@ Please see a librarian to renew your account.">
 <!ENTITY opac.holds.pickupLocation "Pickup location">
 <!ENTITY opac.holds.success "Hold was successfully placed">
 <!ENTITY opac.holds.failure "Hold was not successfully placed">
+<!ENTITY opac.hold.has_parts "The system was not able to place the requested hold.  The item requested has multiple parts to choose from.  Try selecting a specific part for the hold.">
 <!--	================================================================= 
 	Advanced
 	================================================================= -->
diff --git a/Open-ILS/web/opac/skin/default/js/holds.js b/Open-ILS/web/opac/skin/default/js/holds.js
index 9e95da9..9552da1 100644
--- a/Open-ILS/web/opac/skin/default/js/holds.js
+++ b/Open-ILS/web/opac/skin/default/js/holds.js
@@ -126,6 +126,9 @@ function holdsDrawEditor(args) {
 	if(holdArgs.editHold) // flesh the args with the existing hold 
 		holdArgsFromHold(holdArgs.editHold, holdArgs);
 
+    $('holds_parts_selector').style.border = 'auto';
+    holdArgs.partsSuggestionMade = false;
+
 	holdsDrawWindow();
 }
 
@@ -1015,7 +1018,17 @@ function holdHandleCreateResponse(r, recurse) {
 		var res = r.getResultObject();
 		if(checkILSEvent(res) || res.success != 1) {
 			if(res.success != 1) {
-				alert($('hold_not_allowed').innerHTML);
+
+                if(!holdArgs.partsSuggestionMade && holdArgs.recordParts && 
+                        holdArgs.recordParts.length && holdArgs.type == 'T') {
+                    // T holds on records that have parts are OK, but if the record has no non-part
+                    // copies, the hold will ultimately fail.  Suggest selecting a part to the user.
+                    $('holds_parts_selector').style.border = '2px solid red';
+                    holdArgs.partsSuggestionMade = true;
+                    alert($('hold_has_parts').innerHTML);
+                } else {
+				    alert($('hold_not_allowed').innerHTML);
+                }
 			} else {
 				if( res.textcode == 'PATRON_BARRED' ) {
 					alertId('hold_failed_patron_barred');
diff --git a/Open-ILS/web/opac/skin/default/xml/common/holds.xml b/Open-ILS/web/opac/skin/default/xml/common/holds.xml
index 7d8712d..4930ab7 100644
--- a/Open-ILS/web/opac/skin/default/xml/common/holds.xml
+++ b/Open-ILS/web/opac/skin/default/xml/common/holds.xml
@@ -219,6 +219,7 @@
 		<span class='hide_me' id='hold_not_allowed'>
 			&common.hold.failed;
 		</span>
+        <span class='hide_me' id='hold_has_parts'>&opac.hold.has_parts;</span>
 
 	</div>
 

-----------------------------------------------------------------------

Summary of changes:
 .../perlmods/lib/OpenILS/Application/Circ/Holds.pm |   14 ++++++++++++--
 .../lib/OpenILS/Application/Search/Biblio.pm       |    2 +-
 .../lib/OpenILS/Application/Storage/CDBI.pm        |   12 ++++++++++++
 .../lib/OpenILS/Application/Storage/CDBI/biblio.pm |    6 +++---
 .../OpenILS/Application/Storage/Driver/Pg/dbi.pm   |    7 ++++---
 .../Application/Storage/Publisher/action.pm        |    3 ++-
 Open-ILS/web/opac/locale/en-US/opac.dtd            |    1 +
 Open-ILS/web/opac/skin/default/js/holds.js         |   15 ++++++++++++++-
 .../web/opac/skin/default/xml/common/holds.xml     |    1 +
 9 files changed, 50 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list