From: Lebbeous Fogle-Weekley Date: Fri, 20 May 2011 19:47:04 +0000 (-0400) Subject: Fix bad seed data in an A/T template X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=726eeea0b2bae4f4057565dca2072c7aee46c323;p=evergreen%2Ftadl.git Fix bad seed data in an A/T template The action_trigger event def template for printing acq invoices was syntatically broken. The collapse filter isn't important per se, but it balances the extra [% END %] at the bottom of the template, and it was there originally, and I see no reason not to put it back. Incidentally, maybe the database upgrade script in the commit will be the first in master to successfully use the new evergreen.upgrade_deps_block_check() function ? Reported by Sally Fortin. Signed-off-by: Lebbeous Fogle-Weekley --- diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index 0a22bc7b94..46533d794f 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -57,7 +57,7 @@ CREATE TABLE config.upgrade_log ( install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW() ); -INSERT INTO config.upgrade_log (version) VALUES ('0535'); -- dbs +INSERT INTO config.upgrade_log (version) VALUES ('0538'); -- senator CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, 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 38b7b71c4f..3c864a3996 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -5404,6 +5404,7 @@ INSERT INTO action_trigger.event_definition ( 'ProcessTemplate', 'print-on-demand', $$ +[% FILTER collapse %] [%- SET invoice = target -%]
diff --git a/Open-ILS/src/sql/Pg/upgrade/0538.data.at-event-def-acq-invoice-print.sql b/Open-ILS/src/sql/Pg/upgrade/0538.data.at-event-def-acq-invoice-print.sql new file mode 100644 index 0000000000..43b5079118 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0538.data.at-event-def-acq-invoice-print.sql @@ -0,0 +1,10 @@ +BEGIN; + +SELECT evergreen.upgrade_deps_block_check('0538', :eg_version); -- senator + +UPDATE action_trigger.event_definition +SET template = '[% FILTER collapse %]' || template +WHERE id = 22 AND + SUBSTR(template, 0, 24) NOT LIKE '%FILTER collapse%'; + +COMMIT;