[open-ils-commits] [GIT] Evergreen ILS branch master updated. 14504ab4e9f534776ab373c9bd69938fa97a5392
Evergreen Git
git at git.evergreen-ils.org
Sat Jul 16 10:28:33 EDT 2011
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 14504ab4e9f534776ab373c9bd69938fa97a5392 (commit)
via 708d632c06f72b9a0779af15f82c358d1d523c09 (commit)
via 50af22a63e3e4f6f20c2ed7aac6c334bcd22065c (commit)
via 19996728d1cab952a32c839323051769376effde (commit)
via 8823e4060bbc825c859327b018c5f8cb29b9ac2a (commit)
from 7f25c35f3242baef8306577ebe13785f2b1b472d (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 14504ab4e9f534776ab373c9bd69938fa97a5392
Author: Mike Rylander <mrylander at gmail.com>
Date: Sat Jul 16 10:25:44 2011 -0400
Stamping upgrade script for "Opac Renewal at original circ library"
Signed-off-by: Mike Rylander <mrylander at gmail.com>
diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index 5adb855..da9bebb 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -86,7 +86,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 ('0580', :eg_version); -- tsbere via miker
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0581', :eg_version); -- tsbere via miker
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/0581.schema.opac_renewal_reuse_circ_lib.sql b/Open-ILS/src/sql/Pg/upgrade/0581.schema.opac_renewal_reuse_circ_lib.sql
new file mode 100644
index 0000000..d05998e
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/0581.schema.opac_renewal_reuse_circ_lib.sql
@@ -0,0 +1,23 @@
+-- Evergreen DB patch 0581.schema.opac_renewal_reuse_circ_lib.sql
+--
+--
+BEGIN;
+
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('0581', :eg_version);
+
+INSERT INTO config.global_flag (name, label, enabled)
+ VALUES (
+ 'circ.opac_renewal.use_original_circ_lib',
+ oils_i18n_gettext(
+ 'circ.opac_renewal.use_original_circ_lib',
+ 'Circ: Use original circulation library on opac renewal instead of user home library',
+ 'cgf',
+ 'label'
+ ),
+ FALSE
+ );
+
+
+COMMIT;
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.opac_renewal_reuse_circ_lib.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.opac_renewal_reuse_circ_lib.sql
deleted file mode 100644
index 92f8592..0000000
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.opac_renewal_reuse_circ_lib.sql
+++ /dev/null
@@ -1,11 +0,0 @@
-INSERT INTO config.global_flag (name, label, enabled)
- VALUES (
- 'circ.opac_renewal.use_original_circ_lib',
- oils_i18n_gettext(
- 'circ.opac_renewal.use_original_circ_lib',
- 'Circ: Use original circulation library on opac renewal instead of user home library',
- 'cgf',
- 'label'
- ),
- FALSE
- );
commit 708d632c06f72b9a0779af15f82c358d1d523c09
Author: Mike Rylander <mrylander at gmail.com>
Date: Sat Jul 16 10:22:51 2011 -0400
Default to existing behaviour for the new circ-behaviour global flag
Signed-off-by: Mike Rylander <mrylander at gmail.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 6ffacb0..d53e057 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -7938,7 +7938,7 @@ INSERT INTO config.global_flag (name, label, enabled)
'cgf',
'label'
),
- TRUE
+ FALSE
);
INSERT INTO config.usr_setting_type (name,opac_visible,label,description,datatype)
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.opac_renewal_reuse_circ_lib.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.opac_renewal_reuse_circ_lib.sql
index 2423e2b..92f8592 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.opac_renewal_reuse_circ_lib.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.opac_renewal_reuse_circ_lib.sql
@@ -7,5 +7,5 @@ INSERT INTO config.global_flag (name, label, enabled)
'cgf',
'label'
),
- TRUE
+ FALSE
);
commit 50af22a63e3e4f6f20c2ed7aac6c334bcd22065c
Author: Thomas Berezansky <tsbere at mvlc.org>
Date: Tue Jul 5 16:33:41 2011 -0400
Cache global flag at first use
This way only the first opac renewal per backend has to ask the database for the global flag.
Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
Signed-off-by: Mike Rylander <mrylander at gmail.com>
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
index 5da8ada..793b7fd 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
@@ -14,6 +14,7 @@ my %scripts;
my $script_libs;
my $legacy_script_support = 0;
my $booking_status;
+my $opac_renewal_use_circ_lib;
sub determine_booking_status {
unless (defined $booking_status) {
@@ -3318,10 +3319,16 @@ sub do_renew {
# Opac renewal - re-use circ library from original circ (unless told not to)
if($self->opac_renewal) {
- my $use_circ_lib = $self->editor->retrieve_config_global_flag('circ.opac_renewal.use_original_circ_lib');
- if($use_circ_lib and $U->is_true($use_circ_lib->enabled)) {
- $self->circ_lib($circ->circ_lib);
+ unless(defined($opac_renewal_use_circ_lib)) {
+ my $use_circ_lib = $self->editor->retrieve_config_global_flag('circ.opac_renewal.use_original_circ_lib');
+ if($use_circ_lib and $U->is_true($use_circ_lib->enabled)) {
+ $opac_renewal_use_circ_lib = 1;
+ }
+ else {
+ $opac_renewal_use_circ_lib = 0;
+ }
}
+ $self->circ_lib($circ->circ_lib) if($opac_renewal_use_circ_lib);
}
# Run the fine generator against the old circ
commit 19996728d1cab952a32c839323051769376effde
Author: Thomas Berezansky <tsbere at mvlc.org>
Date: Tue Jul 5 12:15:19 2011 -0400
Unwrapped upgrade script
Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
Signed-off-by: Mike Rylander <mrylander at gmail.com>
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.opac_renewal_reuse_circ_lib.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.opac_renewal_reuse_circ_lib.sql
new file mode 100644
index 0000000..2423e2b
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.opac_renewal_reuse_circ_lib.sql
@@ -0,0 +1,11 @@
+INSERT INTO config.global_flag (name, label, enabled)
+ VALUES (
+ 'circ.opac_renewal.use_original_circ_lib',
+ oils_i18n_gettext(
+ 'circ.opac_renewal.use_original_circ_lib',
+ 'Circ: Use original circulation library on opac renewal instead of user home library',
+ 'cgf',
+ 'label'
+ ),
+ TRUE
+ );
commit 8823e4060bbc825c859327b018c5f8cb29b9ac2a
Author: Thomas Berezansky <tsbere at mvlc.org>
Date: Sat Jul 2 12:50:36 2011 -0400
Opac Renewal at original circ library
Fixes multiple potential issues:
1 - Bad home ou on patron breaks circ rules
Ex. Patron edited while editor would let you pick bad home ou
2 - Item not allowed to circ at patron home ou
Ex. Patron went to where they were allowed to pick it up
3 - Fines change to patron home ou fine rules
Ex. Patron's home ou doesn't charge fines but circ lib does
Ex. Circ lib doesn't charge fines but Patron's home ou does
Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
Signed-off-by: Mike Rylander <mrylander at gmail.com>
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
index cbdb4fc..5da8ada 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
@@ -3316,6 +3316,14 @@ sub do_renew {
$self->renewal_remaining( $circ->renewal_remaining - 1 );
$self->circ($circ);
+ # Opac renewal - re-use circ library from original circ (unless told not to)
+ if($self->opac_renewal) {
+ my $use_circ_lib = $self->editor->retrieve_config_global_flag('circ.opac_renewal.use_original_circ_lib');
+ if($use_circ_lib and $U->is_true($use_circ_lib->enabled)) {
+ $self->circ_lib($circ->circ_lib);
+ }
+ }
+
# Run the fine generator against the old circ
$self->generate_fines_start;
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 0082b83..6ffacb0 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -7929,6 +7929,18 @@ INSERT INTO config.global_flag (name, label, enabled)
TRUE
);
+INSERT INTO config.global_flag (name, label, enabled)
+ VALUES (
+ 'circ.opac_renewal.use_original_circ_lib',
+ oils_i18n_gettext(
+ 'circ.opac_renewal.use_original_circ_lib',
+ 'Circ: Use original circulation library on opac renewal instead of user home library',
+ 'cgf',
+ 'label'
+ ),
+ TRUE
+ );
+
INSERT INTO config.usr_setting_type (name,opac_visible,label,description,datatype)
VALUES (
'history.circ.retention_age',
-----------------------------------------------------------------------
Summary of changes:
.../lib/OpenILS/Application/Circ/Circulate.pm | 15 +++++++++++++
Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +-
Open-ILS/src/sql/Pg/950.data.seed-values.sql | 12 ++++++++++
.../0581.schema.opac_renewal_reuse_circ_lib.sql | 23 ++++++++++++++++++++
4 files changed, 51 insertions(+), 1 deletions(-)
create mode 100644 Open-ILS/src/sql/Pg/upgrade/0581.schema.opac_renewal_reuse_circ_lib.sql
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list