[open-ils-commits] r17867 - in trunk/Open-ILS/src: perlmods/OpenILS/Application/Trigger sql/Pg sql/Pg/upgrade (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Sep 21 12:19:08 EDT 2010
Author: phasefx
Date: 2010-09-21 12:19:04 -0400 (Tue, 21 Sep 2010)
New Revision: 17867
Added:
trunk/Open-ILS/src/sql/Pg/upgrade/0412.data.trigger.validator.HoldIsCancelled.sql
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Validator.pm
trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
trunk/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql
trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
Log:
HoldIsCancelled action_trigger validator
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Validator.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Validator.pm 2010-09-21 15:40:23 UTC (rev 17866)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Validator.pm 2010-09-21 16:19:04 UTC (rev 17867)
@@ -82,4 +82,13 @@
return 0;
}
+sub HoldIsCancelled {
+ my $self = shift;
+ my $env = shift;
+
+ my $hold = $env->{target};
+
+ return ($hold->cancel_time) ? 1 : 0;
+}
+
1;
Modified: trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2010-09-21 15:40:23 UTC (rev 17866)
+++ trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2010-09-21 16:19:04 UTC (rev 17867)
@@ -70,7 +70,7 @@
install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
-INSERT INTO config.upgrade_log (version) VALUES ('0411'); -- gmc
+INSERT INTO config.upgrade_log (version) VALUES ('0412'); -- phasefx
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
Modified: trunk/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql 2010-09-21 15:40:23 UTC (rev 17866)
+++ trunk/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql 2010-09-21 16:19:04 UTC (rev 17867)
@@ -4619,6 +4619,16 @@
(35, 'pickup_lib')
;
+INSERT INTO action_trigger.validator (module, description) VALUES (
+ 'HoldIsCancelled',
+ oils_i18n_gettext(
+ 'HoldIsCancelled',
+ 'Check whether a hold request is cancelled.',
+ 'atval',
+ 'description'
+ )
+);
+
-- Create the query schema, and the tables and views therein
DROP SCHEMA IF EXISTS sql CASCADE;
Modified: trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql 2010-09-21 15:40:23 UTC (rev 17866)
+++ trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql 2010-09-21 16:19:04 UTC (rev 17867)
@@ -6998,3 +6998,16 @@
'bool'
);
+-- 0412.data.trigger.validator.HoldIsCancelled.sql
+
+INSERT INTO action_trigger.validator (module, description) VALUES (
+ 'HoldIsCancelled',
+ oils_i18n_gettext(
+ 'HoldIsCancelled',
+ 'Check whether a hold request is cancelled.',
+ 'atval',
+ 'description'
+ )
+);
+
+
Added: trunk/Open-ILS/src/sql/Pg/upgrade/0412.data.trigger.validator.HoldIsCancelled.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/upgrade/0412.data.trigger.validator.HoldIsCancelled.sql (rev 0)
+++ trunk/Open-ILS/src/sql/Pg/upgrade/0412.data.trigger.validator.HoldIsCancelled.sql 2010-09-21 16:19:04 UTC (rev 17867)
@@ -0,0 +1,16 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0412'); -- phasefx
+
+INSERT INTO action_trigger.validator (module, description) VALUES (
+ 'HoldIsCancelled',
+ oils_i18n_gettext(
+ 'HoldIsCancelled',
+ 'Check whether a hold request is cancelled.',
+ 'atval',
+ 'description'
+ )
+);
+
+COMMIT;
+
More information about the open-ils-commits
mailing list