[open-ils-commits] [GIT] Evergreen ILS branch rel_2_7 updated. 733040f9f4593807b4f8eff0a21a7fb0496251e9

Evergreen Git git at git.evergreen-ils.org
Fri Mar 13 17:32:58 EDT 2015


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_7 has been updated
       via  733040f9f4593807b4f8eff0a21a7fb0496251e9 (commit)
       via  aa525575a4b6feb7c3144f7bd6e1ab431067934e (commit)
       via  c3db81e80c4c4b11807defc74c5828577811fa82 (commit)
      from  c7cc97c6fb690f49b928e49933eb6669d01402bb (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 733040f9f4593807b4f8eff0a21a7fb0496251e9
Author: Bill Erickson <berickxx at gmail.com>
Date:   Fri Mar 13 17:23:56 2015 -0400

    LP#1234220 Stamping DB upgrade copy/ratio messages
    
    Signed-off-by: Bill Erickson <berickxx at gmail.com>

diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index 5e1a892..2d5f0f5 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -91,7 +91,7 @@ CREATE TRIGGER no_overlapping_deps
     BEFORE INSERT OR UPDATE ON config.db_patch_dependencies
     FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates');
 
-INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0914', :eg_version); -- dpearl/gmcharlt
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0915', :eg_version); -- berick
 
 CREATE TABLE config.bib_source (
 	id		SERIAL	PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.hold_copy_ratio_override.sql b/Open-ILS/src/sql/Pg/upgrade/0915.data.hold_copy_ratio_override.sql
similarity index 89%
rename from Open-ILS/src/sql/Pg/upgrade/XXXX.data.hold_copy_ratio_override.sql
rename to Open-ILS/src/sql/Pg/upgrade/0915.data.hold_copy_ratio_override.sql
index fceaab8..333725a 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.hold_copy_ratio_override.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/0915.data.hold_copy_ratio_override.sql
@@ -1,6 +1,6 @@
 BEGIN;
 
--- SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+SELECT evergreen.upgrade_deps_block_check('0915', :eg_version);
 
 INSERT INTO permission.perm_list (id, code, description) 
 VALUES (  

commit aa525575a4b6feb7c3144f7bd6e1ab431067934e
Author: Bill Erickson <berickxx at gmail.com>
Date:   Fri Mar 6 11:43:43 2015 -0500

    LP#1234220 hold ratio renewal override perms
    
    New permissions for overriding renewal failure events:
    
    TOTAL_HOLD_COPY_RATIO_EXCEEDED.override
    AVAIL_HOLD_COPY_RATIO_EXCEEDED.override
    
    Signed-off-by: Bill Erickson <berickxx at gmail.com>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>

diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
index 834921a..fb3fd09 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -1613,7 +1613,11 @@ INSERT INTO permission.perm_list ( id, code, description ) VALUES
  ( 558, 'group_application.user.staff.data_review', oils_i18n_gettext( 558, 
     'Allow a user to add/remove users to/from the "Data Review" group', 'ppl', 'description' )),
  ( 559, 'group_application.user.staff.volunteers', oils_i18n_gettext( 559, 
-    'Allow a user to add/remove users to/from the "Volunteers" group', 'ppl', 'description' ))
+    'Allow a user to add/remove users to/from the "Volunteers" group', 'ppl', 'description' )),
+ (  560, 'TOTAL_HOLD_COPY_RATIO_EXCEEDED.override', oils_i18n_gettext( 560,
+    'Override the TOTAL_HOLD_COPY_RATIO_EXCEEDED event', 'ppl', 'description')),
+ (  561, 'AVAIL_HOLD_COPY_RATIO_EXCEEDED.override', oils_i18n_gettext( 561,
+    'Override the AVAIL_HOLD_COPY_RATIO_EXCEEDED event', 'ppl', 'description'))
 ;
 
 SELECT SETVAL('permission.perm_list_id_seq'::TEXT, 1000);
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.hold_copy_ratio_override.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.hold_copy_ratio_override.sql
new file mode 100644
index 0000000..fceaab8
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.hold_copy_ratio_override.sql
@@ -0,0 +1,29 @@
+BEGIN;
+
+-- SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+INSERT INTO permission.perm_list (id, code, description) 
+VALUES (  
+    560, 
+    'TOTAL_HOLD_COPY_RATIO_EXCEEDED.override',
+    oils_i18n_gettext(
+        560,
+        'Override the TOTAL_HOLD_COPY_RATIO_EXCEEDED event',
+        'ppl', 
+        'description'
+    )
+);
+
+INSERT INTO permission.perm_list (id, code, description) 
+VALUES (  
+    561, 
+    'AVAIL_HOLD_COPY_RATIO_EXCEEDED.override',
+    oils_i18n_gettext(
+        561,
+        'Override the AVAIL_HOLD_COPY_RATIO_EXCEEDED event',
+        'ppl', 
+        'description'
+    )
+);
+
+COMMIT;

commit c3db81e80c4c4b11807defc74c5828577811fa82
Author: Bill Erickson <berickxx at gmail.com>
Date:   Fri Mar 6 11:04:01 2015 -0500

    LP#1234220 Improve hold/copy ratio renewal messages
    
    Display friendlier messages in the TPAC and staff client client when a
    hold/copy ratio rule prevents a renewal.
    
    This creates top-level ILS events for total/avail hold copy ratios,
    since that's what best works with the staff client.  The TPAC displays a
    simple "item is needed for a hold" message, whereas the staff client
    displays the raw event description, which is slightly more descriptive.
    
    Signed-off-by: Bill Erickson <berickxx at gmail.com>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>

diff --git a/Open-ILS/src/extras/ils_events.xml b/Open-ILS/src/extras/ils_events.xml
index 80892ad..43b9ddd 100644
--- a/Open-ILS/src/extras/ils_events.xml
+++ b/Open-ILS/src/extras/ils_events.xml
@@ -1031,6 +1031,13 @@
             for the selected transaction</desc>
     </event>
 
+    <event code='11106' textcode='TOTAL_HOLD_COPY_RATIO_EXCEEDED'>
+        <desc xml:lang="en-US">Renewal attempt failed because the "hold / total copies" ratio exceeds the configured limit</desc>
+    </event>
+
+    <event code='11107' textcode='AVAIL_HOLD_COPY_RATIO_EXCEEDED'>
+        <desc xml:lang="en-US">Renewal attempt failed because the "hold / available copies" ratio exceeds the configured limit</desc>
+    </event>
 
 </ils_events>
 
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
index f37c0fb..7e38228 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
@@ -1083,6 +1083,10 @@ my $LEGACY_CIRC_EVENT_MAP = {
     'config.circ_matrix_test.max_overdue' =>  'PATRON_EXCEEDS_OVERDUE_COUNT',
     'config.circ_matrix_test.max_fines' => 'PATRON_EXCEEDS_FINES',
     'config.circ_matrix_circ_mod_test' => 'PATRON_EXCEEDS_CHECKOUT_COUNT',
+    'config.circ_matrix_test.total_copy_hold_ratio' => 
+        'TOTAL_HOLD_COPY_RATIO_EXCEEDED',
+    'config.circ_matrix_test.available_copy_hold_ratio' => 
+        'AVAIL_HOLD_COPY_RATIO_EXCEEDED'
 };
 
 
diff --git a/Open-ILS/src/templates/opac/myopac/circs.tt2 b/Open-ILS/src/templates/opac/myopac/circs.tt2
index 4cd89ab..6ca68a1 100644
--- a/Open-ILS/src/templates/opac/myopac/circs.tt2
+++ b/Open-ILS/src/templates/opac/myopac/circs.tt2
@@ -121,7 +121,19 @@
                     <tr>
                         <td colspan="6">[%# XXX colspan="0" does not work in IE %]
                             <span class="failure-text" title="[% circ.renewal_response.textcode | html %] / [% circ.renewal_response.payload.fail_part | html %]">
-                                [% (circ.renewal_response.desc || circ.renewal_response.payload.fail_part || circ.renewal_response.textcode) | html %]
+                                [%
+                                    renew_fail_msg = '';
+                                    IF circ.renewal_response.textcode == 'TOTAL_HOLD_COPY_RATIO_EXCEEDED' OR
+                                        circ.renewal_response.textcode == 'AVAIL_HOLD_COPY_RATIO_EXCEEDED';
+                                        # the stock hold ratio message may not be patron friendly
+                                        renew_fail_msg = l('Item is needed for a hold');
+                                    ELSE;
+                                        renew_fail_msg = circ.renewal_response.desc || 
+                                            circ.renewal_response.payload.fail_part || 
+                                            circ.renewal_response.textcode;
+                                    END;
+                                    renew_fail_msg | html;
+                                %]
                             </span>
                         </td>
                     </tr>
diff --git a/Open-ILS/src/templates/opac/parts/hold_error_messages.tt2 b/Open-ILS/src/templates/opac/parts/hold_error_messages.tt2
index 50a0ebf..407ea52 100644
--- a/Open-ILS/src/templates/opac/parts/hold_error_messages.tt2
+++ b/Open-ILS/src/templates/opac/parts/hold_error_messages.tt2
@@ -14,9 +14,7 @@
         "asset.copy.status" => l("The item cannot circulate at this time"),
         "circ.holds.target_skip_me" => l("The item's circulation library does not fulfill holds"),
         "config.circ_matrix_circ_mod_test" => l("The patron has too many items of this type checked out"),
-        "config.circ_matrix_test.available_copy_hold_ratio" => l("The available item-to-hold ratio is too low"),
         "config.circ_matrix_test.circulate" => l("Circulation rules reject this item as non-circulatable"),
-        "config.circ_matrix_test.total_copy_hold_ratio" => l("The total item-to-hold ratio is too low"),
         "config.hold_matrix_test.holdable" => l("Hold rules reject this item as unholdable"),
         "config.hold_matrix_test.max_holds" => l("The patron has reached the maximum number of holds"),
         "config.rule_age_hold_protect.prox" => l("The item is too new to transit this far"),
diff --git a/Open-ILS/xul/staff_client/server/circ/util.js b/Open-ILS/xul/staff_client/server/circ/util.js
index d4c48b0..2a94acc 100644
--- a/Open-ILS/xul/staff_client/server/circ/util.js
+++ b/Open-ILS/xul/staff_client/server/circ/util.js
@@ -3657,6 +3657,8 @@ circ.util.renew_via_barcode = function ( params, async ) {
                         case 7009 /* CIRC_CLAIMS_RETURNED */ : break;
                         case 7010 /* COPY_ALERT_MESSAGE */ : break;
                         case 7013 /* PATRON_EXCEEDS_FINES */ : break;
+                        case 11106 /* TOTAL_HOLD_COPY_RATIO_EXCEEDED */ : break;
+                        case 11107 /* AVAIL_HOLD_COPY_RATIO_EXCEEDED */ : break;
                         default:
                             throw(renew);
                         break;
@@ -3736,6 +3738,8 @@ circ.util.renew_via_barcode = function ( params, async ) {
                     7009 /* CIRC_CLAIMS_RETURNED */,
                     7010 /* COPY_ALERT_MESSAGE */,
                     7013 /* PATRON_EXCEEDS_FINES */,
+                    11106 /* TOTAL_HOLD_COPY_RATIO_EXCEEDED */,
+                    11107 /* AVAIL_HOLD_COPY_RATIO_EXCEEDED */
                 ],
                 'text' : {
                     '1212' : function(r) { return document.getElementById('circStrings').getFormattedString('staff.circ.renew.barcode', [params.barcode]); },

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

Summary of changes:
 Open-ILS/src/extras/ils_events.xml                 |    7 +++++
 .../lib/OpenILS/Application/Circ/Circulate.pm      |    4 +++
 Open-ILS/src/sql/Pg/002.schema.config.sql          |    2 +-
 Open-ILS/src/sql/Pg/950.data.seed-values.sql       |    6 +++-
 .../upgrade/0915.data.hold_copy_ratio_override.sql |   29 ++++++++++++++++++++
 Open-ILS/src/templates/opac/myopac/circs.tt2       |   14 +++++++++-
 .../templates/opac/parts/hold_error_messages.tt2   |    2 -
 Open-ILS/xul/staff_client/server/circ/util.js      |    4 +++
 8 files changed, 63 insertions(+), 5 deletions(-)
 create mode 100644 Open-ILS/src/sql/Pg/upgrade/0915.data.hold_copy_ratio_override.sql


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list