[open-ils-commits] [GIT] Evergreen ILS branch rel_2_1 updated. f6c4d663986df4968640dff0bdbedd2e48fc15cf

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, rel_2_1 has been updated
       via  f6c4d663986df4968640dff0bdbedd2e48fc15cf (commit)
       via  0d26a8786d39213b7c53ea1d93fb4b91f9aa39dc (commit)
       via  c4a631b1f1fd908cb8da003f6031ad72bd0e3895 (commit)
       via  c99aa493b37e316f83da1052ae8e020645543ae7 (commit)
       via  32c52e608cab3e4be8e6f1b997b1114b029fed64 (commit)
       via  451cd1bae88d256575d9b6ed0352799d8d47dfa7 (commit)
      from  f89b87775ec879d9ce6d91f263034f86c8cf2067 (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 f6c4d663986df4968640dff0bdbedd2e48fc15cf
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 0d26a8786d39213b7c53ea1d93fb4b91f9aa39dc
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 a3bce99..40e1909 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
@@ -2185,11 +2185,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
             }
         }
     );
@@ -2558,6 +2560,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 c4a631b1f1fd908cb8da003f6031ad72bd0e3895
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 c99aa493b37e316f83da1052ae8e020645543ae7
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 32c52e608cab3e4be8e6f1b997b1114b029fed64
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 451cd1bae88d256575d9b6ed0352799d8d47dfa7
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 8203ce4..bdaf91c 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 73514c1..9b09f68 100644
--- a/Open-ILS/web/opac/skin/default/js/holds.js
+++ b/Open-ILS/web/opac/skin/default/js/holds.js
@@ -109,6 +109,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();
 }
 
@@ -998,7 +1001,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