[open-ils-commits] [GIT] Evergreen ILS branch rel_2_10 updated. 24daa710d9047cdedcc5f74bedebb5d1aaf1f36d

Evergreen Git git at git.evergreen-ils.org
Mon Mar 14 17:37:13 EDT 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, rel_2_10 has been updated
       via  24daa710d9047cdedcc5f74bedebb5d1aaf1f36d (commit)
       via  8f95d0b0382a2e3e6f2e46f0610e2a73fdd9f7c3 (commit)
       via  3bc0c7ada0d1da2b6a6a73e0a002aa316ae92bd1 (commit)
       via  e5c2d239951815b569e058aa3ac5c7016e105fca (commit)
      from  bfdd5924587d3fa1ac42121374ee5e047848023c (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 24daa710d9047cdedcc5f74bedebb5d1aaf1f36d
Author: Galen Charlton <gmc at esilibrary.com>
Date:   Mon Mar 14 17:35:59 2016 -0400

    LP#1370694: stamp database update
    
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>

diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index 533c306..1b27f60 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 ('0973', :eg_version); -- tmccanna/gmcharlt
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0974', :eg_version); -- tmccanna/gmcharlt
 
 CREATE TABLE config.bib_source (
 	id		SERIAL	PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.selfcheck_holds_printing.sql b/Open-ILS/src/sql/Pg/upgrade/0974.data.selfcheck_holds_printing.sql
similarity index 95%
rename from Open-ILS/src/sql/Pg/upgrade/XXXX.data.selfcheck_holds_printing.sql
rename to Open-ILS/src/sql/Pg/upgrade/0974.data.selfcheck_holds_printing.sql
index e254c24..496a874 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.selfcheck_holds_printing.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/0974.data.selfcheck_holds_printing.sql
@@ -1,6 +1,6 @@
 BEGIN;
 
--- SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+SELECT evergreen.upgrade_deps_block_check('0974', :eg_version); -- tmccanna/gmcharlt
 
 UPDATE action_trigger.event_definition SET template = 
 $$

commit 8f95d0b0382a2e3e6f2e46f0610e2a73fdd9f7c3
Author: Galen Charlton <gmc at esilibrary.com>
Date:   Mon Mar 14 17:33:49 2016 -0400

    LP#1370694: don't update already-customized format.selfcheck.holds
    
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>

diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.selfcheck_holds_printing.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.selfcheck_holds_printing.sql
index 9481302..e254c24 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.selfcheck_holds_printing.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.selfcheck_holds_printing.sql
@@ -1,6 +1,6 @@
 BEGIN;
 
-SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+-- SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
 
 UPDATE action_trigger.event_definition SET template = 
 $$
@@ -36,6 +36,39 @@ $$
     </ol>
 </div>
 
-$$ WHERE id=12;
+$$ WHERE id=12
+AND template = 
+$$
+[%- USE date -%]
+[%- SET user = target.0.usr -%]
+<div>
+    <style> li { padding: 8px; margin 5px; }</style>
+    <div>[% date.format %]</div>
+    <br/>
+
+    [% user.family_name %], [% user.first_given_name %]
+    <ol>
+    [% FOR hold IN target %]
+        [%-
+            SET idx = loop.count - 1;
+            SET udata =  user_data.$idx
+        -%]
+        <li>
+            <div>Title: [% hold.bib_rec.bib_record.simple_record.title %]</div>
+            <div>Author: [% hold.bib_rec.bib_record.simple_record.author %]</div>
+            <div>Pickup Location: [% hold.pickup_lib.name %]</div>
+            <div>Status: 
+                [%- IF udata.ready -%]
+                    Ready for pickup
+                [% ELSE %]
+                    #[% udata.queue_position %] of [% udata.potential_copies %] copies.
+                [% END %]
+            </div>
+        </li>
+    [% END %]
+    </ol>
+</div>
+$$
+;
 
-COMMIT;
\ No newline at end of file
+COMMIT;

commit 3bc0c7ada0d1da2b6a6a73e0a002aa316ae92bd1
Author: Galen Charlton <gmc at esilibrary.com>
Date:   Mon Mar 14 17:09:53 2016 -0400

    LP#1370694: clean up whitespace
    
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>

diff --git a/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js b/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js
index 9fbd548..03f9dfa 100644
--- a/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js
+++ b/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js
@@ -100,7 +100,7 @@ function SelfCheckManager() {
 
     this.checkouts = [];
     this.itemsOut = [];
-	this.holds = []; 
+    this.holds = []; 
 
     // During renewals, keep track of the ID of the previous circulation. 
     // Previous circ is used for tracking failed renewals (for receipts).
@@ -809,10 +809,10 @@ SelfCheckManager.prototype.drawHoldsPage = function() {
 }
 
 SelfCheckManager.prototype.insertHold = function(data) {
-	
-	// store hold data to pass along to receipt printing function
-    this.holds.push(data);	
-	
+
+    // store hold data to pass along to receipt printing function
+    this.holds.push(data);
+
     var row = this.holdTemplate.cloneNode(true);
 
     if(data.mvr.isbn()) {
@@ -1447,23 +1447,23 @@ SelfCheckManager.prototype.printHoldsReceipt = function(callback) {
         function(data) {
             holdIds.push(data.hold.id());
 
-			//get pickup library info
+            //get pickup library info
             var pu = fieldmapper.standardRequest(['open-ils.actor','open-ils.actor.org_unit.retrieve'],[null,data.hold.pickup_lib()]);
-			
+            
             if(data.status == 4) {
                 holdData.push({
-					ready : true,
+                    ready : true,
                     item_title : data.mvr.title(),
-					item_author : data.mvr.author(),
-					pickup_lib : pu.name()
-				});
+                    item_author : data.mvr.author(),
+                    pickup_lib : pu.name()
+                });
             } else {
                 holdData.push({
                     queue_position : data.queue_position, 
                     potential_copies : data.potential_copies,
                     item_title : data.mvr.title(),
-					item_author : data.mvr.author(),
-					pickup_lib : pu.name()
+                    item_author : data.mvr.author(),
+                    pickup_lib : pu.name()
                 });
             }
         }

commit e5c2d239951815b569e058aa3ac5c7016e105fca
Author: Terran McCanna <tmccanna at georgialibraries.org>
Date:   Tue Mar 1 16:47:20 2016 -0500

    LP#1370694 Selfcheck: "Print List" for Holds view does not work
    
    Prior to this change, the holds data was not getting passed to the
    print function. Now, it is being captured and passed to the print
    function. Because of some sorting discrepancies between the order of
    the information being passed from here to the action trigger and the
    order that the information is presented when pulled directly out of the
    database by the action trigger (which led to data mismatches between the
    title/author and the hold status/pickup locations for each printed item),
    I modified this script to pass all of the hold information together in the
    desired order to the action trigger rather than relying on the template
    to match the data coming from the script with the data from the database.
    
    This change requires the action trigger printing template to be updated in
    order to work. I've included an upgrade script as well as an update to the
    seed data script.
    
    Signed-off-by: Terran McCanna <tmccanna at georgialibraries.org>
    Signed-off-by: Jennifer Pringle <jennifer.pringle at bc.libraries.coop>
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>

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 b69d9dc..eae5327 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -10332,8 +10332,9 @@ $$
     <style> li { padding: 8px; margin 5px; }</style>
     <div>[% date.format %]</div>
     <br/>
-
-    [% user.family_name %], [% user.first_given_name %]
+    Holds for:<br/>
+	[% user.family_name %], [% user.first_given_name %]
+	
     <ol>
     [% FOR hold IN target %]
         [%-
@@ -10341,9 +10342,9 @@ $$
             SET udata =  user_data.$idx
         -%]
         <li>
-            <div>Title: [% hold.bib_rec.bib_record.simple_record.title %]</div>
-            <div>Author: [% hold.bib_rec.bib_record.simple_record.author %]</div>
-            <div>Pickup Location: [% hold.pickup_lib.name %]</div>
+            <div>Title: [% udata.item_title %]</div>
+            <div>Author: [% udata.item_author %]</div>
+            <div>Pickup Location: [% udata.pickup_lib %]</b></div>
             <div>Status: 
                 [%- IF udata.ready -%]
                     Ready for pickup
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.selfcheck_holds_printing.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.selfcheck_holds_printing.sql
new file mode 100644
index 0000000..9481302
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.selfcheck_holds_printing.sql
@@ -0,0 +1,41 @@
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+UPDATE action_trigger.event_definition SET template = 
+$$
+[%- USE date -%]
+[%- SET user = target.0.usr -%]
+<div>
+    <style> li { padding: 8px; margin 5px; }</style>
+    <div>[% date.format %]</div>
+    <br/>
+    Holds for:<br/>
+	[% user.family_name %], [% user.first_given_name %]
+	
+    <ol>
+    [% FOR hold IN target %]
+        [%-
+            SET idx = loop.count - 1;
+            SET udata =  user_data.$idx;
+        -%]
+        <li>
+            <div>Title: [% udata.item_title %]</div>
+            <div>Author: [% udata.item_author %]</div>
+            <div>Pickup Location: [% udata.pickup_lib %]</b></div>
+            <div>Status: 
+                [%- IF udata.ready -%]
+                    Ready for pickup
+                [% ELSE %]
+                    #[% udata.queue_position %] of 
+                      [% udata.potential_copies %] copies.
+                [% END %]
+            </div>
+        </li>
+    [% END %]
+    </ol>
+</div>
+
+$$ WHERE id=12;
+
+COMMIT;
\ No newline at end of file
diff --git a/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js b/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js
index 62f78d2..9fbd548 100644
--- a/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js
+++ b/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js
@@ -100,6 +100,7 @@ function SelfCheckManager() {
 
     this.checkouts = [];
     this.itemsOut = [];
+	this.holds = []; 
 
     // During renewals, keep track of the ID of the previous circulation. 
     // Previous circ is used for tracking failed renewals (for receipts).
@@ -808,6 +809,10 @@ SelfCheckManager.prototype.drawHoldsPage = function() {
 }
 
 SelfCheckManager.prototype.insertHold = function(data) {
+	
+	// store hold data to pass along to receipt printing function
+    this.holds.push(data);	
+	
     var row = this.holdTemplate.cloneNode(true);
 
     if(data.mvr.isbn()) {
@@ -1427,7 +1432,7 @@ SelfCheckManager.prototype.printItemsOutReceipt = function(callback) {
 }
 
 /**
- * Print a receipt for this user's items out
+ * Print a receipt for this user's holds
  */
 SelfCheckManager.prototype.printHoldsReceipt = function(callback) {
 
@@ -1441,12 +1446,24 @@ SelfCheckManager.prototype.printHoldsReceipt = function(callback) {
     dojo.forEach(this.holds,
         function(data) {
             holdIds.push(data.hold.id());
+
+			//get pickup library info
+            var pu = fieldmapper.standardRequest(['open-ils.actor','open-ils.actor.org_unit.retrieve'],[null,data.hold.pickup_lib()]);
+			
             if(data.status == 4) {
-                holdData.push({ready : true});
+                holdData.push({
+					ready : true,
+                    item_title : data.mvr.title(),
+					item_author : data.mvr.author(),
+					pickup_lib : pu.name()
+				});
             } else {
                 holdData.push({
                     queue_position : data.queue_position, 
-                    potential_copies : data.potential_copies
+                    potential_copies : data.potential_copies,
+                    item_title : data.mvr.title(),
+					item_author : data.mvr.author(),
+					pickup_lib : pu.name()
                 });
             }
         }
diff --git a/docs/RELEASE_NOTES_NEXT/Circulation/selfcheck_printing_holds.adoc b/docs/RELEASE_NOTES_NEXT/Circulation/selfcheck_printing_holds.adoc
new file mode 100644
index 0000000..483a329
--- /dev/null
+++ b/docs/RELEASE_NOTES_NEXT/Circulation/selfcheck_printing_holds.adoc
@@ -0,0 +1,5 @@
+Self-Check Printing
+^^^^^^^^^^^^^
+Corrections were made to the Self-Check Holds functionality to allow 
+printing. The change requires that the Self-Checkout Holds Receipt 
+action trigger template be updated in order to work properly. 

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

Summary of changes:
 Open-ILS/src/sql/Pg/002.schema.config.sql          |    2 +-
 Open-ILS/src/sql/Pg/950.data.seed-values.sql       |   11 ++--
 .../upgrade/0974.data.selfcheck_holds_printing.sql |   74 ++++++++++++++++++++
 .../web/js/ui/default/circ/selfcheck/selfcheck.js  |   23 +++++-
 .../Circulation/selfcheck_printing_holds.adoc      |    5 ++
 5 files changed, 106 insertions(+), 9 deletions(-)
 create mode 100644 Open-ILS/src/sql/Pg/upgrade/0974.data.selfcheck_holds_printing.sql
 create mode 100644 docs/RELEASE_NOTES_NEXT/Circulation/selfcheck_printing_holds.adoc


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list