[open-ils-commits] [GIT] Evergreen ILS branch rel_2_8 updated. 4873761989a11650bd7d9cc07392ebc76bdcca1b

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_8 has been updated
       via  4873761989a11650bd7d9cc07392ebc76bdcca1b (commit)
       via  50c5382e1a7c2ebc41b861fde7ae2399eb3811d0 (commit)
       via  5dee865c246f3bcb3a2dec556218afab3698c653 (commit)
       via  848e096bbe66dacdc05943057fb7ad7f3af39898 (commit)
      from  ebf68ea90082d2afbc2657b4ef7a89d177490475 (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 4873761989a11650bd7d9cc07392ebc76bdcca1b
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 b56d1c2..759c39e 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 50c5382e1a7c2ebc41b861fde7ae2399eb3811d0
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 5dee865c246f3bcb3a2dec556218afab3698c653
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 184d0df..56f8bcd 100644
--- a/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js
+++ b/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js
@@ -61,7 +61,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).
@@ -764,10 +764,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()) {
@@ -1399,23 +1399,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 848e096bbe66dacdc05943057fb7ad7f3af39898
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 2e0fa4c..a5971ee 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -8496,8 +8496,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 %]
         [%-
@@ -8505,9 +8506,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 0653b9e..184d0df 100644
--- a/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js
+++ b/Open-ILS/web/js/ui/default/circ/selfcheck/selfcheck.js
@@ -61,6 +61,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).
@@ -763,6 +764,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()) {
@@ -1379,7 +1384,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) {
 
@@ -1393,12 +1398,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