[open-ils-commits] [GIT] Evergreen ILS branch rel_2_1 updated. a007508bf759f624c2dd82c83c7300ce6b91a738
Evergreen Git
git at git.evergreen-ils.org
Sat Jul 16 10:35:23 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, rel_2_1 has been updated
via a007508bf759f624c2dd82c83c7300ce6b91a738 (commit)
via 86c26ab2b9aebd19237d418d438fcb7d692510bd (commit)
via 9c083213f3b8189e751073e546a969d0182a90a7 (commit)
via 01cfea29c585e566f76bfdcf9f6724d48a302f33 (commit)
via 367102ae7cdad33b0784db05c671b57d41e706be (commit)
from 10b2c746745779dd34fcdd6956d6aa929dd586be (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 a007508bf759f624c2dd82c83c7300ce6b91a738
Author: Mike Rylander <mrylander at gmail.com>
Date: Sat Jul 16 10:30:29 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 bca10d8..ba19cb4 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 ('0580'); -- tsbere via miker
+INSERT INTO config.upgrade_log (version) VALUES ('0581'); -- tsbere via miker
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.opac_renewal_reuse_circ_lib.sql b/Open-ILS/src/sql/Pg/upgrade/0581.data.opac_renewal_reuse_circ_lib.sql
similarity index 79%
rename from Open-ILS/src/sql/Pg/upgrade/XXXX.opac_renewal_reuse_circ_lib.sql
rename to Open-ILS/src/sql/Pg/upgrade/0581.data.opac_renewal_reuse_circ_lib.sql
index 92f8592..9bff356 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.opac_renewal_reuse_circ_lib.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/0581.data.opac_renewal_reuse_circ_lib.sql
@@ -1,3 +1,7 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0581'); -- tsbere via miker
+
INSERT INTO config.global_flag (name, label, enabled)
VALUES (
'circ.opac_renewal.use_original_circ_lib',
@@ -9,3 +13,6 @@ INSERT INTO config.global_flag (name, label, enabled)
),
FALSE
);
+
+COMMIT;
+
commit 86c26ab2b9aebd19237d418d438fcb7d692510bd
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 799c4cd..9d85859 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -7891,7 +7891,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 9c083213f3b8189e751073e546a969d0182a90a7
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 e184b28..7cd8125 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) {
@@ -3274,10 +3275,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 01cfea29c585e566f76bfdcf9f6724d48a302f33
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 367102ae7cdad33b0784db05c671b57d41e706be
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 566a168..e184b28 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
@@ -3272,6 +3272,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 6f1a071..799c4cd 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -7882,6 +7882,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.data.opac_renewal_reuse_circ_lib.sql | 18 ++++++++++++++++++
4 files changed, 46 insertions(+), 1 deletions(-)
create mode 100644 Open-ILS/src/sql/Pg/upgrade/0581.data.opac_renewal_reuse_circ_lib.sql
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list