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

Evergreen Git git at git.evergreen-ils.org
Fri Jun 7 11:56:44 EDT 2013


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  3a0dd23027cf94d0149ae637eef765f736205f75 (commit)
       via  221ed45e9c93587b1e6461597f3932de4ee818f3 (commit)
       via  0759846a2dd381db698ffd04b873129655f869b9 (commit)
       via  aea4764fea34c1f1ba3bd617b811dde2404a87a1 (commit)
      from  c9eaeb57d803a448bd763f915acca2db1901915f (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 3a0dd23027cf94d0149ae637eef765f736205f75
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Jun 7 09:42:57 2013 -0400

    LP1040147 Return wrong-shelf holds in clearable list
    
    1. Change the staff client "View Shelf-Expired Holds" action label to
    "View Clearable Holds".
    
    2.  When "View Clearable Holds" is selected, display both shelf-expired
    and wrong-shelf holds.
    
    New API calls:
    
    open-ils.circ.captured_holds.expired_on_shelf_or_wrong_shelf.retrieve
    open-ils.circ.captured_holds.id_list.expired_on_shelf_or_wrong_shelf.retrieve
    
    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 7e06492..924da08 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
@@ -2056,6 +2056,30 @@ __PACKAGE__->register_method(
     /
 );
 
+__PACKAGE__->register_method(
+    method    => 'fetch_captured_holds',
+    api_name  => 
+      'open-ils.circ.captured_holds.expired_on_shelf_or_wrong_shelf.retrieve',
+    stream    => 1,
+    authoritative => 1,
+    signature => q/
+        Returns list of shelf-expired un-fulfilled holds OR wrong shelf holds
+        for a given shelf lib
+    /
+);
+
+__PACKAGE__->register_method(
+    method    => 'fetch_captured_holds',
+    api_name  => 
+      'open-ils.circ.captured_holds.id_list.expired_on_shelf_or_wrong_shelf.retrieve',
+    stream    => 1,
+    authoritative => 1,
+    signature => q/
+        Returns list of shelf-expired un-fulfilled holds OR wrong shelf holds
+        for a given shelf lib
+    /
+);
+
 
 sub fetch_captured_holds {
     my( $self, $conn, $auth, $org, $match_copy ) = @_;
@@ -2097,6 +2121,17 @@ sub fetch_captured_holds {
     }
     my $hold_ids = $e->json_query( $query );
 
+    if ($self->api_name =~ /wrong_shelf/) {
+        # fetch holds whose current_shelf_lib is $org, but whose pickup 
+        # lib is some other org unit.  Ignore already-retrieved holds.
+        my $wrong_shelf =
+            pickup_lib_changed_on_shelf_holds(
+                $e, $org, [map {$_->{id}} @$hold_ids]);
+        # match the layout of other items in $hold_ids
+        push (@$hold_ids, {id => $_}) for @$wrong_shelf;
+    }
+
+
     for my $hold_id (@$hold_ids) {
         if($self->api_name =~ /id_list/) {
             $conn->respond($hold_id->{id});
diff --git a/Open-ILS/xul/staff_client/chrome/content/main/constants.js b/Open-ILS/xul/staff_client/chrome/content/main/constants.js
index 0956d9e..80748ca 100644
--- a/Open-ILS/xul/staff_client/chrome/content/main/constants.js
+++ b/Open-ILS/xul/staff_client/chrome/content/main/constants.js
@@ -140,7 +140,7 @@ var api = {
     'HTML_HOLD_PULL_LIST' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.hold_pull_list.print' },
     'FM_AHR_ONSHELF_RETRIEVE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.captured_holds.on_shelf.retrieve' },
     'FM_AHR_ID_LIST_ONSHELF_RETRIEVE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.captured_holds.id_list.on_shelf.retrieve.authoritative', 'secure' : false },
-    'FM_AHR_ID_LIST_EXPIRED_ONSHELF_RETRIEVE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.captured_holds.id_list.expired_on_shelf.retrieve.authoritative', 'secure' : false },
+    'FM_AHR_ID_LIST_EXPIRED_ONSHELF_RETRIEVE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.captured_holds.id_list.expired_on_shelf_or_wrong_shelf.retrieve', 'secure' : false },
     'FM_AHR_COUNT_FOR_BRE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.bre.holds.count', 'secure' : false },
     'FM_AHR_COUNT_RETRIEVE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.hold_requests.count', 'cacheable' : true, 'ttl' : 60000  },
     'FM_AHR_COUNT_RETRIEVE.authoritative' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.hold_requests.count.authoritative', 'cacheable' : true, 'ttl' : 60000  },

commit 221ed45e9c93587b1e6461597f3932de4ee818f3
Author: Jason Etheridge <jason at esilibrary.com>
Date:   Thu Jun 6 19:00:45 2013 -0400

    change checkbox label in Browse Hold Shelf
    
    from View Shelf-Expired Holds to View Clearable Holds
    
    Signed-off-by: Jason Etheridge <jason at esilibrary.com>
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd
index 7084976..508d6b2 100644
--- a/Open-ILS/web/opac/locale/en-US/lang.dtd
+++ b/Open-ILS/web/opac/locale/en-US/lang.dtd
@@ -2778,7 +2778,7 @@
 <!ENTITY staff.circ.holds.set_top_of_queue.accesskey "Q">
 <!ENTITY staff.circ.holds.title_transfer.label "Transfer to Marked Title">
 <!ENTITY staff.circ.holds.title_transfer.accesskey "">
-<!ENTITY staff.circ.holds.view_expired_onshelf_holds.label "View Shelf-Expired Holds">
+<!ENTITY staff.circ.holds.view_expired_onshelf_holds.label "View Clearable Holds">
 <!ENTITY staff.circ.holds.view_expired_onshelf_holds.accesskey "x">
 <!ENTITY staff.circ.holds.clear_expired_onshelf_holds.label "Clear these Holds">
 <!ENTITY staff.circ.holds.clear_expired_onshelf_holds.accesskey "">

commit 0759846a2dd381db698ffd04b873129655f869b9
Author: Jason Etheridge <jason at esilibrary.com>
Date:   Thu Jun 6 17:49:46 2013 -0400

    add Current Shelf Library column to xul interfaces
    
    Signed-off-by: Jason Etheridge <jason at esilibrary.com>
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/xul/staff_client/server/circ/util.js b/Open-ILS/xul/staff_client/server/circ/util.js
index 4a3b2a4..9c41675 100644
--- a/Open-ILS/xul/staff_client/server/circ/util.js
+++ b/Open-ILS/xul/staff_client/server/circ/util.js
@@ -2160,6 +2160,37 @@ circ.util.hold_columns = function(modify,params) {
         },
         {
             'persist' : 'hidden width ordinal',
+            'id' : 'current_shelf_lib',
+            'label' : document.getElementById('circStrings').getString('staff.circ.utils.current_shelf_lib'),
+            'flex' : 1,
+            'primary' : false,
+            'hidden' : true,
+            'editable' : false, 'render' : function(my) {
+                if (Number(my.ahr.current_shelf_lib())>=0) {
+                    return data.hash.aou[ my.ahr.current_shelf_lib() ].name();
+                } else {
+                    return my.ahr.current_shelf_lib().name();
+                }
+            }
+        },
+        {
+            'persist' : 'hidden width ordinal',
+            'id' : 'current_shelf_lib_shortname',
+            'label' : document.getElementById('commonStrings').getString('staff.ahr_current_shelf_lib_label'),
+            'flex' : 0,
+            'primary' : false,
+            'hidden' : true,
+            'editable' : false, 'render' : function(my) {
+                if (Number(my.ahr.current_shelf_lib())>=0) {
+                    return data.hash.aou[ my.ahr.current_shelf_lib() ].shortname();
+                } else {
+                    return my.ahr.current_shelf_lib().shortname();
+                }
+            }
+        },
+
+        {
+            'persist' : 'hidden width ordinal',
             'id' : 'current_copy',
             'label' : document.getElementById('commonStrings').getString('staff.ahr_current_copy_label'),
             'flex' : 1,
diff --git a/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties b/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties
index c77579a..cf4ae70 100644
--- a/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties
+++ b/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties
@@ -338,6 +338,7 @@ staff.circ.utils.active=Active?
 staff.circ.utils.thaw_date=Activation Date
 staff.circ.utils.thaw_date.none=No Date
 staff.circ.utils.pickup_lib=Pickup Library (Full Name)
+staff.circ.utils.current_shelf_lib=Current Shelf Library (Full Name)
 staff.circ.utils.current_copy.none=No Copy
 staff.circ.utils.title.none=No Title?
 staff.circ.utils.author.none=No Author?
diff --git a/Open-ILS/xul/staff_client/server/locale/en-US/common.properties b/Open-ILS/xul/staff_client/server/locale/en-US/common.properties
index 4cac73a..612fbb1 100644
--- a/Open-ILS/xul/staff_client/server/locale/en-US/common.properties
+++ b/Open-ILS/xul/staff_client/server/locale/en-US/common.properties
@@ -60,6 +60,7 @@ staff.ahr_phone_notify_label=Phone Notify
 staff.ahr_sms_notify_label=Text Notify
 staff.ahr_sms_carrier_label=Text Carrier
 staff.ahr_pickup_lib_label=Pickup Library
+staff.ahr_current_shelf_lib_label=Current Shelf Library
 staff.ahr_prev_check_time_label=Previous Check Time
 staff.ahr_requestor_label=Requestor
 staff.ahr_selection_depth_label=Selection Depth

commit aea4764fea34c1f1ba3bd617b811dde2404a87a1
Author: Bill Erickson <berick at esilibrary.com>
Date:   Tue Aug 21 17:19:54 2012 -0400

    Include Wrong-Shelf holds in clear-shelf results
    
    Include non-expired, Wrong-Shelf holds in the results list of the "Clear
    Shelf-Expired Holds" process.  ("Wrong-Shelf" holds are those whose
    pickup lib was changed while the hold was on the holds shelf).  The idea
    behind this option is that branches may use the clear-shelf process as a
    general shelf management report beyond just holds that have expired.
    I.e. tell me everything I need to remove from the shelf.
    
    This change includes a label change for the clear-shelf menu options:
    
    "Clear Shelf-Expired Holds" -> "Clear Holds Shelf"
    
    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 cde9619..7e06492 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
@@ -3541,7 +3541,8 @@ sub clear_shelf_process {
         my %cache_data = (
             hold => [],
             transit => [],
-            shelf => []
+            shelf => [],
+            pl_changed => pickup_lib_changed_on_shelf_holds($e, $org_id, \@hold_ids)
         );
 
         for my $hold (@holds) {
@@ -3590,6 +3591,42 @@ sub clear_shelf_process {
     }
 }
 
+# returns IDs for holds that are on the holds shelf but 
+# have had their pickup_libs change while on the shelf.
+sub pickup_lib_changed_on_shelf_holds {
+    my $e = shift;
+    my $org_id = shift;
+    my $ignore_holds = shift;
+    $ignore_holds = [$ignore_holds] if !ref($ignore_holds);
+
+    my $query = {
+        select => { alhr => ['id'] },
+        from   => {
+            alhr => {
+                acp => {
+                    field => 'id',
+                    fkey  => 'current_copy'
+                },
+            }
+        },
+        where => {
+            '+acp' => { status => OILS_COPY_STATUS_ON_HOLDS_SHELF },
+            '+alhr' => {
+                capture_time     => { "!=" => undef },
+                fulfillment_time => undef,
+                current_shelf_lib => $org_id,
+                pickup_lib => {'!='  => {'+alhr' => 'current_shelf_lib'}}
+            }
+        }
+    };
+
+    $query->{where}->{'+alhr'}->{id} =
+        {'not in' => $ignore_holds} if @$ignore_holds;
+
+    my $hold_ids = $e->json_query($query);
+    return [ map { $_->{id} } @$hold_ids ];
+}
+
 __PACKAGE__->register_method(
     method    => 'usr_hold_summary',
     api_name  => 'open-ils.circ.holds.user_summary',
diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd
index b7a2f4d..7084976 100644
--- a/Open-ILS/web/opac/locale/en-US/lang.dtd
+++ b/Open-ILS/web/opac/locale/en-US/lang.dtd
@@ -1065,7 +1065,7 @@
 <!ENTITY staff.main.menu.circ.hold_browse.accesskey "B">
 <!ENTITY staff.main.menu.circ.hold_browse.label "Browse Holds Shelf">
 <!ENTITY staff.main.menu.circ.hold_clear.accesskey "">
-<!ENTITY staff.main.menu.circ.hold_clear.label "Clear Shelf-Expired Holds">
+<!ENTITY staff.main.menu.circ.hold_clear.label "Clear Holds Shelf">
 <!ENTITY staff.main.menu.circ.hold_capture.accesskey "H">
 <!ENTITY staff.main.menu.circ.hold_capture.label "Capture Holds">
 <!ENTITY staff.main.menu.circ.hold_pull.accesskey "S">
@@ -2476,7 +2476,7 @@
 <!ENTITY staff.circ.checkin_overlay.checkin_auto_print_slips.accesskey "P">
 <!ENTITY staff.circ.checkin_overlay.checkin_modifiers_btn.label "Checkin Modifiers">
 <!ENTITY staff.circ.checkin_overlay.checkin_modifiers_btn.accesskey "M">
-<!ENTITY staff.circ.checkin_overlay.checkin_clear_shelf_expired.label "Clear Shelf-Expired Holds">
+<!ENTITY staff.circ.checkin_overlay.checkin_clear_shelf_expired.label "Clear Holds Shelf">
 <!ENTITY staff.circ.checkin_overlay.checkin_clear_shelf_expired.accesskey "C">
 <!ENTITY staff.circ.checkin_overlay.checkin_auto_retarget.label "Retarget Local Holds">
 <!ENTITY staff.circ.checkin_overlay.checkin_auto_retarget.accesskey "R">
diff --git a/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties b/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties
index 2f058ae..c77579a 100644
--- a/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties
+++ b/Open-ILS/xul/staff_client/server/locale/en-US/circ.properties
@@ -332,6 +332,7 @@ staff.circ.utils.hold_post_clear_shelf_action.label=Post-Clear
 staff.circ.utils.hold_post_clear_shelf_action.hold=Need for Hold
 staff.circ.utils.hold_post_clear_shelf_action.transit=Need for Transit
 staff.circ.utils.hold_post_clear_shelf_action.shelf=Reshelve
+staff.circ.utils.hold_post_clear_shelf_action.pl_changed=Wrong Shelf
 staff.circ.utils.frozen=Frozen?
 staff.circ.utils.active=Active?
 staff.circ.utils.thaw_date=Activation Date

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

Summary of changes:
 .../perlmods/lib/OpenILS/Application/Circ/Holds.pm |   74 +++++++++++++++++++-
 Open-ILS/web/opac/locale/en-US/lang.dtd            |    6 +-
 .../staff_client/chrome/content/main/constants.js  |    2 +-
 Open-ILS/xul/staff_client/server/circ/util.js      |   31 ++++++++
 .../server/locale/en-US/circ.properties            |    2 +
 .../server/locale/en-US/common.properties          |    1 +
 6 files changed, 111 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list