[open-ils-commits] [GIT] Evergreen ILS branch rel_2_9 updated. 0e7bb08d991fc55eeb62eef2cf4b636d76af56e7

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_9 has been updated
       via  0e7bb08d991fc55eeb62eef2cf4b636d76af56e7 (commit)
       via  66b92744ec2da55dbc207dc3ea59da00a42719d6 (commit)
       via  7e5fda81ec3dffbc4be3761cd68aea7c0a782741 (commit)
       via  107eac51aa2378515eb92da6c8604466bf045608 (commit)
      from  66f14b6e9d8c1b1ceba9332a37db0d9c2ff3a24e (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 0e7bb08d991fc55eeb62eef2cf4b636d76af56e7
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 f48e18d..bf2df91 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 66b92744ec2da55dbc207dc3ea59da00a42719d6
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 7e5fda81ec3dffbc4be3761cd68aea7c0a782741
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 41acf7c..46203fb 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).
@@ -808,10 +808,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()) {
@@ -1446,23 +1446,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 107eac51aa2378515eb92da6c8604466bf045608
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 00a5721..104c4ef 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -8912,8 +8912,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 %]
         [%-
@@ -8921,9 +8922,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 9a02abe..41acf7c 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).
@@ -807,6 +808,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()) {
@@ -1426,7 +1431,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) {
 
@@ -1440,12 +1445,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