[open-ils-commits] r14883 - in trunk/Open-ILS/src: perlmods/OpenILS/Application sql/Pg sql/Pg/upgrade (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Nov 12 13:07:09 EST 2009
Author: erickson
Date: 2009-11-12 13:07:05 -0500 (Thu, 12 Nov 2009)
New Revision: 14883
Added:
trunk/Open-ILS/src/sql/Pg/upgrade/0078.data.claims_return_copy_status.sql
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm
trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
Log:
instead of an explicit put-copy-into-missing status operation when an item is marked claims returned, allow for a configurable status
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm 2009-11-12 17:03:58 UTC (rev 14882)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm 2009-11-12 18:07:05 UTC (rev 14883)
@@ -356,18 +356,16 @@
}
$e->update_action_circulation($circ) or return $e->die_event;
- $e->commit;
-
- # see if we need to also mark the copy as missing
- if($U->ou_ancestor_setting_value($circ->circ_lib, 'circ.claim_return.mark_missing')) {
- return $apputils->simplereq(
- 'open-ils.circ',
- 'open-ils.circ.mark_item_missing',
- $auth, $copy->id
- );
+ # see if there is a configured post-claims-return copy status
+ if(my $stat = $U->ou_ancestor_setting_value($circ->circ_lib, 'circ.claim_return.copy_status')) {
+ $copy->status($stat);
+ $copy->edit_date('now');
+ $copy->editor($e->requestor->id);
+ $e->update_asset_copy($copy) or return $e->die_event;
}
+ $e->commit;
return 1;
}
Modified: trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2009-11-12 17:03:58 UTC (rev 14882)
+++ trunk/Open-ILS/src/sql/Pg/002.schema.config.sql 2009-11-12 18:07:05 UTC (rev 14883)
@@ -51,7 +51,7 @@
install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
-INSERT INTO config.upgrade_log (version) VALUES ('0077'); -- atz
+INSERT INTO config.upgrade_log (version) VALUES ('0078'); -- berick
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
Modified: trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql 2009-11-12 17:03:58 UTC (rev 14882)
+++ trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql 2009-11-12 18:07:05 UTC (rev 14883)
@@ -2383,3 +2383,12 @@
INSERT INTO action_trigger.reactor (module,description) VALUES ('ApplyPatronPenalty','Applies the conifigured penalty to a patron. Required named environment variables are "user", which refers to the user object, and "context_org", which refers to the org_unit object that acts as the focus for the penalty.');
+INSERT INTO config.org_unit_setting_type (name, label, description, datatype, fm_class)
+ VALUES (
+ 'circ.claim_return.copy_status',
+ 'Claim Return Copy Status',
+ 'Claims returned copies are put into this status. Default is to leave the copy in the Checked Out status'
+ 'link',
+ 'ccs',
+ );
+
Added: trunk/Open-ILS/src/sql/Pg/upgrade/0078.data.claims_return_copy_status.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/upgrade/0078.data.claims_return_copy_status.sql (rev 0)
+++ trunk/Open-ILS/src/sql/Pg/upgrade/0078.data.claims_return_copy_status.sql 2009-11-12 18:07:05 UTC (rev 14883)
@@ -0,0 +1,16 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0078');
+
+UPDATE config.org_unit_setting_type
+ SET
+ name = 'circ.claim_return.copy_status',
+ fm_class = 'ccs',
+ datatype = 'link',
+ label = 'Claim Return Copy Status',
+ description = 'Claims returned copies are put into this status. Default is to leave the copy in the Checked Out status'
+ WHERE
+ name = 'circ.claim_return.mark_missing';
+
+COMMIT;
+
More information about the open-ils-commits
mailing list