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

Evergreen Git git at git.evergreen-ils.org
Thu Feb 18 20:06:48 EST 2016


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  825e7bb13c0b976b2368787c47370568b0f8c1fa (commit)
       via  e107ef6791a7e3f5e4a57cca2e2678d81943caa4 (commit)
      from  51c58f55324e77579473a26f323bf22b72a499b1 (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 825e7bb13c0b976b2368787c47370568b0f8c1fa
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Aug 4 09:16:41 2014 -0400

    LP#1202742 non-active copy transit release notes
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Chris Sharp <csharp at georgialibraries.org>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>

diff --git a/docs/RELEASE_NOTES_NEXT/Circulation/non_activate_copy_transit_msg.txt b/docs/RELEASE_NOTES_NEXT/Circulation/non_activate_copy_transit_msg.txt
new file mode 100644
index 0000000..0bc8d2b
--- /dev/null
+++ b/docs/RELEASE_NOTES_NEXT/Circulation/non_activate_copy_transit_msg.txt
@@ -0,0 +1,17 @@
+==== Non-Active Status Copy Transit Message ====
+
+After copy checkin, if the copy is in-transit, display a special
+message in the transit alert dialog and in the printed transit receipt
+(optionally, via macro) if the copy is in (or, rather, will be once it
+arrives at its destination) a non-active copy status.
+
+===== Upgrade Notes =====
+
+ * To add the new message to the transit slip, add the
+   'transit_copy_status_msg' MACRO.
+ * To remove the new message from the alert dialog, remove the 
+   'staff.circ.utils.transit.copy_status_message' string property
+   from 'Open-ILS/xul/staff_client/server/locale/LOCALE/circ.properties'
+ * For a list of non-active copy statuses, see in the staff client
+   under Admin -> Server Administration -> Copy Statuses.
+

commit e107ef6791a7e3f5e4a57cca2e2678d81943caa4
Author: Bill Erickson <berick at esilibrary.com>
Date:   Thu Jul 18 11:17:23 2013 -0400

    LP#1202742 Non-active transit copy status messages
    
    When an in-transit copy is checked into the staff client, display a special
    message in the transit alert dialog and in the printed transit receipt
    (optionally, via macro) if the copy is in (or, rather, will be once it
    arrives at its destination) a non-active copy status.
    
    See config.copy_status.copy_active.
    
    For example, assuming the org unit setting 'circ.lost_immediately_available'
    is unset, when a Lost copy is checked in that must transit home, the
    following message will appear in the transit alert dialog:
    
    This item is in status "Lost", additional staff action may be required.
    
    Additionally, the value of the 'transit_copy_status_msg' macro, which
    defaults to "", will be set to this message, so that the message may
    appear in printed transit slips.
    
    Note that the code will test for the presence of the
    "staff.circ.utils.transit.copy_status_message" string property and fail
    gracefully if it is unset.  Through this, admins can disable this
    feature entirely.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Chris Sharp <csharp at georgialibraries.org>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>

diff --git a/Open-ILS/xul/staff_client/server/circ/util.js b/Open-ILS/xul/staff_client/server/circ/util.js
index 32bfabf..1af3646 100644
--- a/Open-ILS/xul/staff_client/server/circ/util.js
+++ b/Open-ILS/xul/staff_client/server/circ/util.js
@@ -1621,6 +1621,7 @@ circ.util.transit_columns = function(modify,params) {
 
     JSAN.use('OpenILS.data'); var data = new OpenILS.data(); data.init({'via':'stash'});
 
+    var circStrings = document.getElementById('circStrings');
     var c = [
         {
             'id' : 'transit_item_barcode',
@@ -1766,6 +1767,23 @@ circ.util.transit_columns = function(modify,params) {
                 return data.hash.ccs[ my.atc.copy_status() ].name();
             }
         },
+        {
+            'persist' : 'hidden width ordinal',
+            'id' : 'transit_copy_status_msg',
+            'label' : circStrings.getString(
+                        'staff.circ.utils.transit.copy_status_message.label'),
+            'flex' : 1,
+            'primary' : false,
+            'hidden' : true,
+            'editable' : false,
+            'render' : function(my) {
+                var stat_obj = data.hash.ccs[my.atc.copy_status()];
+                if (stat_obj.copy_active() == 't') return '';
+                var prop = 'staff.circ.utils.transit.copy_status_message';
+                if (!circStrings.testString(prop)) return ''; // prop not defined
+                return circStrings.getFormattedString(prop, [stat_obj.name()]);
+            }
+        }
     ];
     for (var i = 0; i < c.length; i++) {
         if (modify[ c[i].id ]) {
@@ -3348,12 +3366,30 @@ circ.util.checkin_via_barcode2 = function(session,params,backdate,auto_print,che
             print_data.item_author = payload_author;
             msg += print_data.item_author_msg;
             msg += '\n';
+
+            print_data.transit_copy_status_msg = '';
             if (check.payload.transit) {
+                var stat_obj = data.hash.ccs[check.payload.transit.copy_status()];
+
                 // by adding this here, we make the data available to the
-                // receipt printing engine, but since we are not appending it
-                // to the 'msg', it will not display in the pre-print dialog.
-                print_data.transit_copy_status = 
-                    data.hash.ccs[check.payload.transit.copy_status()].name();
+                // receipt printing engine.
+                print_data.transit_copy_status = stat_obj.name();
+
+                // If the copy, once arrived at its destination, will be 
+                // in a non-active state (and a statu message string is 
+                // present) append the message to the alert dialog and apply
+                // the message to the transit_copy_status_msg macro.
+                if (stat_obj.copy_active() == 'f') {
+                    var strings = document.getElementById('circStrings');
+                    var prop = 'staff.circ.utils.transit.copy_status_message';
+
+                    if (strings.testString(prop)) {
+                        var status_msg = strings.getFormattedString(
+                            prop, [stat_obj.name()]);
+                        msg += status_msg + '\n'; // alert dialog
+                        print_data.transit_copy_status_msg = status_msg; // print macro
+                    }
+                }
             }
             JSAN.use('util.date');
             if (check.payload.hold) {
@@ -3522,6 +3558,7 @@ circ.util.checkin_via_barcode2 = function(session,params,backdate,auto_print,che
                             'data' : print_data,
                             'context' : data.print_list_templates[ template ].context,
                         };
+
                         if ($('printer_prompt')) {
                             if (! $('printer_prompt').checked) { parms.no_prompt = true; }
                         }
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 415eb97..d5bb8d1 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
@@ -494,3 +494,5 @@ staff.circ.holds.list_view.accesskey=V
 staff.circ.missing_pieces.scan_item.prompt=Enter barcode for item missing pieces:
 staff.circ.missing_pieces.scan_item.title=Missing Pieces
 staff.circ.missing_pieces.scan_item.error_alert=No item with barcode "%1$s"
+staff.circ.utils.transit.copy_status_message.label=Transit Copy Status Message
+staff.circ.utils.transit.copy_status_message=This item is in status %1$s, additional staff action may be required.

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

Summary of changes:
 Open-ILS/xul/staff_client/server/circ/util.js      |   45 ++++++++++++++++++--
 .../server/locale/en-US/circ.properties            |    2 +
 .../Circulation/non_activate_copy_transit_msg.txt  |   17 +++++++
 3 files changed, 60 insertions(+), 4 deletions(-)
 create mode 100644 docs/RELEASE_NOTES_NEXT/Circulation/non_activate_copy_transit_msg.txt


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list