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

Evergreen Git git at git.evergreen-ils.org
Tue Feb 14 12:10:08 EST 2012


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  dc6c8c93f4edfc064ccecea7c8e5196180e3aa6d (commit)
       via  7388c413944a7a7586b75caa5c863920ef377158 (commit)
       via  d5d43c28abf6fc7e02a5be142ba1036503deb26c (commit)
      from  7510d7ff71c6cf1f2fc8ba9210a2d7ef34bc52d3 (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 dc6c8c93f4edfc064ccecea7c8e5196180e3aa6d
Author: Dan Scott <dscott at laurentian.ca>
Date:   Tue Feb 14 11:45:18 2012 -0500

    Fix typos in lp820006 that broke clean schema creation
    
    Backslashes to escape single quotes in SQL aren't cool.
    
    Also, lists of rows to insert need commas as delimiters.
    
    Also, needed a trailing "]" on the 90-day lost notice template.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

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 2e1da72..918dce1 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -6315,7 +6315,7 @@ INSERT INTO action_trigger.event_definition (id, active, owner, name, hook, vali
     VALUES (2, 'f', 1, '90 Day Overdue Mark Lost', 'checkout.due', 'CircIsOverdue', 'MarkItemLost', '90 days', 'due_date');
 
 INSERT INTO action_trigger.event_params (event_def, param, value) VALUES
-    (2, 'editor', '\'1\'');
+    (2, 'editor', '''1''');
 
 -- Sample Auto Mark Lost Notice --
 
@@ -6335,7 +6335,7 @@ The following items are 90 days overdue and have been marked LOST.
     [%- copy_details = helpers.get_copy_bib_basics(circ.target_copy.id) -%]
     Title: [% copy_details.title %], by [% copy_details.author %]
     Call Number: [% circ.target_copy.call_number.label %]
-    Shelving Location: [% circ.target_copy.location.name %
+    Shelving Location: [% circ.target_copy.location.name %]
     Barcode: [% circ.target_copy.barcode %]
     Due: [% date.format(helpers.format_date(circ.due_date), '%Y-%m-%d') %]
     Item Cost: [% helpers.get_copy_price(circ.target_copy) %]
@@ -6351,7 +6351,7 @@ INSERT INTO action_trigger.environment (event_def, path) VALUES
     (3, 'target_copy.call_number'),
     (3, 'usr'),
     (3, 'billable_transaction.summary'),
-    (3, 'circ_lib.billing_address')
+    (3, 'circ_lib.billing_address'),
     (3, 'target_copy.location');
 
 

commit 7388c413944a7a7586b75caa5c863920ef377158
Author: Dan Scott <dscott at laurentian.ca>
Date:   Tue Feb 14 11:12:19 2012 -0500

    Fix up 3-day courtesy notice with better title / author too
    
    Use the helper function to get better quality title/author out of the
    target copy for pre-due notices.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

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 703b0f7..2e1da72 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -6341,6 +6341,7 @@ The following items are 90 days overdue and have been marked LOST.
     Item Cost: [% helpers.get_copy_price(circ.target_copy) %]
     Total Owed For Transaction: [% circ.billable_transaction.summary.balance_owed %]
     Library: [% circ.circ_lib.name %]
+
 [% END %]
 
 $$);
@@ -7431,18 +7432,21 @@ Dear [% user.family_name %], [% user.first_given_name %]
 As a reminder, the following items are due in 3 days.
 
 [% FOR circ IN target %]
-    Title: [% circ.target_copy.call_number.record.simple_record.title %] 
+    [%- copy_details = helpers.get_copy_bib_basics(circ.target_copy.id) -%]
+    Title: [% copy_details.title %]
+    Author: [% copy_details.author %]
     Barcode: [% circ.target_copy.barcode %] 
     Due: [% date.format(helpers.format_date(circ.due_date), '%Y-%m-%d') %]
     Item Cost: [% helpers.get_copy_price(circ.target_copy) %]
     Library: [% circ.circ_lib.name %]
     Library Phone: [% circ.circ_lib.phone %]
+
 [% END %]
 
 $$);
 
 INSERT INTO action_trigger.environment (event_def, path) VALUES 
-    (6, 'target_copy.call_number.record.simple_record'),
+    (6, 'target_copy.call_number'),
     (6, 'usr'),
     (6, 'circ_lib.billing_address');
 

commit d5d43c28abf6fc7e02a5be142ba1036503deb26c
Author: Steven Callender <stevecallender at esilibrary.com>
Date:   Tue Aug 2 19:38:42 2011 +0000

    LP#820006: Action trigger notices fixes
    
    Cleaned up action triggers a little bit.
    
    1. Added the editor param to the auto lost, because triggers will fail
    without this.
    
    2. Also removed the use of simple_records in some of the notices and
    changed it to something more efficient.
    
    3. Changed the use of total money owed to balance owed.
    
    Signed-off-by: Steven Callender <stevecallender at esilibrary.com>
    Signed-off-by: Dan Scott <dan at coffeecode.net>

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 4445f86..703b0f7 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -6288,18 +6288,23 @@ Dear [% user.family_name %], [% user.first_given_name %]
 Our records indicate the following items are overdue.
 
 [% FOR circ IN target %]
-    Title: [% circ.target_copy.call_number.record.simple_record.title %] 
-    Barcode: [% circ.target_copy.barcode %] 
+    [%- copy_details = helpers.get_copy_bib_basics(circ.target_copy.id) -%]
+    Title: [% copy_details.title %]
+    Author: [% copy_details.author %]
+    Call Number: [% circ.target_copy.call_number.label %]
+    Barcode: [% circ.target_copy.barcode %]
     Due: [% date.format(helpers.format_date(circ.due_date), '%Y-%m-%d') %]
     Item Cost: [% helpers.get_copy_price(circ.target_copy) %]
-    Total Owed For Transaction: [% circ.billable_transaction.summary.total_owed %]
+    Total Owed For Transaction: [% circ.billable_transaction.summary.balance_owed %]
     Library: [% circ.circ_lib.name %]
+
 [% END %]
 
 $$);
 
 INSERT INTO action_trigger.environment (event_def, path) VALUES 
-    (1, 'target_copy.call_number.record.simple_record'),
+    (1, 'target_copy.call_number'),
+    (1, 'target_copy.location'),
     (1, 'usr'),
     (1, 'billable_transaction.summary'),
     (1, 'circ_lib.billing_address');
@@ -6309,6 +6314,9 @@ INSERT INTO action_trigger.environment (event_def, path) VALUES
 INSERT INTO action_trigger.event_definition (id, active, owner, name, hook, validator, reactor, delay, delay_field) 
     VALUES (2, 'f', 1, '90 Day Overdue Mark Lost', 'checkout.due', 'CircIsOverdue', 'MarkItemLost', '90 days', 'due_date');
 
+INSERT INTO action_trigger.event_params (event_def, param, value) VALUES
+    (2, 'editor', '\'1\'');
+
 -- Sample Auto Mark Lost Notice --
 
 INSERT INTO action_trigger.event_definition (id, active, owner, name, hook, validator, reactor, group_field, template) 
@@ -6324,11 +6332,14 @@ Dear [% user.family_name %], [% user.first_given_name %]
 The following items are 90 days overdue and have been marked LOST.
 
 [% FOR circ IN target %]
-    Title: [% circ.target_copy.call_number.record.simple_record.title %] 
-    Barcode: [% circ.target_copy.barcode %] 
+    [%- copy_details = helpers.get_copy_bib_basics(circ.target_copy.id) -%]
+    Title: [% copy_details.title %], by [% copy_details.author %]
+    Call Number: [% circ.target_copy.call_number.label %]
+    Shelving Location: [% circ.target_copy.location.name %
+    Barcode: [% circ.target_copy.barcode %]
     Due: [% date.format(helpers.format_date(circ.due_date), '%Y-%m-%d') %]
     Item Cost: [% helpers.get_copy_price(circ.target_copy) %]
-    Total Owed For Transaction: [% circ.billable_transaction.summary.total_owed %]
+    Total Owed For Transaction: [% circ.billable_transaction.summary.balance_owed %]
     Library: [% circ.circ_lib.name %]
 [% END %]
 
@@ -6336,10 +6347,12 @@ $$);
 
 
 INSERT INTO action_trigger.environment (event_def, path) VALUES 
-    (3, 'target_copy.call_number.record.simple_record'),
+    (3, 'target_copy.call_number'),
     (3, 'usr'),
     (3, 'billable_transaction.summary'),
-    (3, 'circ_lib.billing_address');
+    (3, 'circ_lib.billing_address')
+    (3, 'target_copy.location');
+
 
 -- Sample Purchase Order HTML Template --
 
@@ -6498,8 +6511,9 @@ Dear [% user.family_name %], [% user.first_given_name %]
 The item(s) you requested are available for pickup from the Library.
 
 [% FOR hold IN target %]
-    Title: [% hold.current_copy.call_number.record.simple_record.title %]
-    Author: [% hold.current_copy.call_number.record.simple_record.author %]
+    [%- copy_details = helpers.get_copy_bib_basics(hold.current_copy.id) -%]
+    Title: [% copy_details.title %]
+    Author: [% copy_details.author %]
     Call Number: [% hold.current_copy.call_number.label %]
     Barcode: [% hold.current_copy.barcode %]
     Library: [% hold.pickup_lib.name %]
@@ -6521,7 +6535,7 @@ INSERT INTO action_trigger.hook (
     );
 
 INSERT INTO action_trigger.environment (event_def, path) VALUES
-    (5, 'current_copy.call_number.record.simple_record'),
+    (5, 'current_copy.call_number'),
     (5, 'usr'),
     (5, 'pickup_lib.billing_address');
 
@@ -6630,17 +6644,18 @@ length of time.  If you would still like to receive these items,
 no action is required.
 
 [% FOR hold IN target %]
-    Title: [% hold.bib_rec.bib_record.simple_record.title %]
-    Author: [% hold.bib_rec.bib_record.simple_record.author %]
+    [%- copy_details = helpers.get_copy_bib_basics(hold.current_copy.id) -%]
+    Title: [% copy_details.title %]
+    Author: [% copy_details.author %]
 [% END %]
 $$
 );
 
 INSERT INTO action_trigger.environment (event_def, path)
     VALUES
-        (9, 'pickup_lib'),
-        (9, 'usr'),
-        (9, 'bib_rec.bib_record.simple_record');
+    (9, 'pickup_lib'),
+    (9, 'usr'),
+    (9, 'current_copy.call_number');
 
 -- trigger data related to acq user requests
 
diff --git a/Open-ILS/src/sql/Pg/version-upgrade/1.6.1-2.0-upgrade-db.sql b/Open-ILS/src/sql/Pg/version-upgrade/1.6.1-2.0-upgrade-db.sql
index 467b7bb..698179f 100644
--- a/Open-ILS/src/sql/Pg/version-upgrade/1.6.1-2.0-upgrade-db.sql
+++ b/Open-ILS/src/sql/Pg/version-upgrade/1.6.1-2.0-upgrade-db.sql
@@ -2589,7 +2589,10 @@ Dear [% user.family_name %], [% user.first_given_name %]
 As a reminder, the following items are due in 3 days.
 
 [% FOR circ IN target %]
-    Title: [% circ.target_copy.call_number.record.simple_record.title %] 
+    [%- copy_details = helpers.get_copy_bib_basics(circ.target_copy.id) -%]
+    Title: [% copy_details.title %]
+    Author: [% copy_details.author %]
+    Call Number: [% circ.target_copy.call_number.label %]
     Barcode: [% circ.target_copy.barcode %] 
     Due: [% date.format(helpers.format_date(circ.due_date), '%Y-%m-%d') %]
     Item Cost: [% helpers.get_copy_price(circ.target_copy) %]
@@ -2600,7 +2603,8 @@ As a reminder, the following items are due in 3 days.
 $$);
 
 INSERT INTO action_trigger.environment (event_def, path) VALUES 
-    (6, 'target_copy.call_number.record.simple_record'),
+    (6, 'target_copy.call_number'),
+    (6, 'target_copy.location'),
     (6, 'usr'),
     (6, 'circ_lib.billing_address');
 
@@ -2728,8 +2732,9 @@ length of time.  If you would still like to receive these items,
 no action is required.
 
 [% FOR hold IN target %]
-    Title: [% hold.bib_rec.bib_record.simple_record.title %]
-    Author: [% hold.bib_rec.bib_record.simple_record.author %]
+    [%- copy_details = helpers.get_copy_bib_basics(hold.current_copy.id) -%]
+    Title: [% copy_details.title %]
+    Author: [% copy_details.author %]
 [% END %]
 $$
 );
@@ -2740,7 +2745,7 @@ INSERT INTO action_trigger.environment (
     ) VALUES
     (9, 'pickup_lib'),
     (9, 'usr'),
-    (9, 'bib_rec.bib_record.simple_record');
+    (9, 'current_copy.call_number');
 
 INSERT INTO action_trigger.hook (key, core_type, description, passive) 
     VALUES (

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

Summary of changes:
 Open-ILS/src/sql/Pg/950.data.seed-values.sql       |   57 +++++++++++++-------
 .../Pg/version-upgrade/1.6.1-2.0-upgrade-db.sql    |   15 ++++--
 2 files changed, 48 insertions(+), 24 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list