[open-ils-commits] [GIT] Evergreen ILS branch rel_3_2 updated. 474831f9f2102b6de9fd825a7e1799826f11bc0c

Evergreen Git git at git.evergreen-ils.org
Tue Oct 1 17:26:01 EDT 2019


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_3_2 has been updated
       via  474831f9f2102b6de9fd825a7e1799826f11bc0c (commit)
       via  f42bfe8a993bc91a77ab28346313e841b30407c1 (commit)
       via  f2788c10fff31808d262ec5d25e7e0f216ab7423 (commit)
      from  666e3c5587f4847126c914cdb6aa8b91b8f37234 (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 474831f9f2102b6de9fd825a7e1799826f11bc0c
Author: Galen Charlton <gmc at equinoxinitiative.org>
Date:   Tue Oct 1 17:24:16 2019 -0400

    LP#1835085: stamp DB update
    
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>

diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index aedb45469d..39a9467f28 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -92,7 +92,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 ('1189', :eg_version); -- Dyrcona/gmcharlt
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1190', :eg_version); -- Dyrcona/gmcharlt
 
 CREATE TABLE config.bib_source (
 	id		SERIAL	PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.auto_renewal-not-desk_renewal.sql b/Open-ILS/src/sql/Pg/upgrade/1190.data.auto_renewal-not-desk_renewal.sql
similarity index 73%
rename from Open-ILS/src/sql/Pg/upgrade/XXXX.data.auto_renewal-not-desk_renewal.sql
rename to Open-ILS/src/sql/Pg/upgrade/1190.data.auto_renewal-not-desk_renewal.sql
index 0afb614fa1..fc5cc2d623 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.auto_renewal-not-desk_renewal.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/1190.data.auto_renewal-not-desk_renewal.sql
@@ -1,6 +1,6 @@
 BEGIN;
 
---SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+SELECT evergreen.upgrade_deps_block_check('1190', :eg_version);
 
 UPDATE action.circulation SET desk_renewal = FALSE WHERE auto_renewal IS TRUE;
 

commit f42bfe8a993bc91a77ab28346313e841b30407c1
Author: Jason Stephenson <jason at sigio.com>
Date:   Mon Sep 9 08:47:09 2019 -0400

    Lp 1835085: Update Item Status templates for auto-renewal
    
    Add checks for circ.auto_renewal() == 't' in the circ list and summary
    pane views of the web staff client Item Status interface.
    
    Signed-off-by: Jason Stephenson <jason at sigio.com>
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>

diff --git a/Open-ILS/src/templates/staff/cat/item/t_circ_list_pane.tt2 b/Open-ILS/src/templates/staff/cat/item/t_circ_list_pane.tt2
index f4a3d0f455..5165571b14 100644
--- a/Open-ILS/src/templates/staff/cat/item/t_circ_list_pane.tt2
+++ b/Open-ILS/src/templates/staff/cat/item/t_circ_list_pane.tt2
@@ -57,7 +57,8 @@
     <div class="flex-cell well">{{
       circ.phone_renewal() == 't' ||
       circ.desk_renewal() == 't' ||
-      circ.opac_renewal() == 't'
+      circ.opac_renewal() == 't' ||
+      circ.auto_renewal() == 't'
     }}</div>
     <div class="flex-cell">[% l('Stop Fines Reason') %]</div>
     <div class="flex-cell well">{{circ.stop_fines()}}</div>
diff --git a/Open-ILS/src/templates/staff/cat/item/t_summary_pane.tt2 b/Open-ILS/src/templates/staff/cat/item/t_summary_pane.tt2
index dad5ec94b3..46a6b02f89 100644
--- a/Open-ILS/src/templates/staff/cat/item/t_summary_pane.tt2
+++ b/Open-ILS/src/templates/staff/cat/item/t_summary_pane.tt2
@@ -74,6 +74,7 @@
       <div ng-if="circ.opac_renewal() == 't'">[% l('OPAC') %]</div>
       <div ng-if="circ.desk_renewal() == 't'">[% l('Desk') %]</div>
       <div ng-if="circ.phone_renewal() == 't'">[% l('Phone') %]</div>
+      <div ng-if="circ.auto_renewal() == 't'">[% l('Automatic') %]</div>
     </div>
 
     <div class="flex-cell">[% l('Checkout Workstation') %]</div>

commit f2788c10fff31808d262ec5d25e7e0f216ab7423
Author: Jason Stephenson <jason at sigio.com>
Date:   Fri Aug 30 11:37:24 2019 -0400

    Lp 1835035: Refactor auto_renewal back end code
    
    Refactor the auto_renewal feature so that it works like other renewal
    types: opac_renewal, sip_renewal, etc.  This refactor prevents
    desk_renewal from being set when auto_renewal is set.
    
    Deprecate the newly added open-ils.circ.renew.auto API and ensure that
    it still works as intended.  Add release note indicating the
    deprecation of this API and intent to remove it in Evergreen 3.5.
    
    Modify the AutoRenew action trigger reactor to use the plain
    open-ils.circ.renew API with the auto_renewal option set to 1.
    
    Add database update script to cleanup (i.e. set to FALSE) the
    desk_renewal field on action.circulation and action.aged_circulation
    tables where auto_renewal is TRUE.
    
    Signed-off-by: Jason Stephenson <jason at sigio.com>
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>

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 7a2958a3ad..06050e95fa 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
@@ -128,6 +128,10 @@ __PACKAGE__->register_method(
     method    => "run_method",
     api_name  => "open-ils.circ.renew.auto",
     signature => q/@see open-ils.circ.renew/,
+    notes     => q/
+    The open-ils.circ.renew.auto API is deprecated.  Please use the
+    auto_renew => 1 option to open-ils.circ.renew, instead.
+    /
 );
 
 __PACKAGE__->register_method(
@@ -244,7 +248,7 @@ sub run_method {
     }
 
     $circulator->is_renewal(1) if $api =~ /renew/;
-    $circulator->is_autorenewal(1) if $api =~ /renew.auto/;
+    $circulator->auto_renewal(1) if $api =~ /renew.auto/;
     $circulator->is_checkin(1) if $api =~ /checkin/;
     $circulator->is_checkout(1) if $api =~ /checkout/;
     $circulator->override(1) if $api =~ /override/o;
@@ -435,7 +439,6 @@ my @AUTOLOAD_FIELDS = qw/
     volume
     title
     is_renewal
-    is_autorenewal
     is_checkout
     is_res_checkout
     is_precat
@@ -487,6 +490,7 @@ my @AUTOLOAD_FIELDS = qw/
     phone_renewal
     desk_renewal
     sip_renewal
+    auto_renewal
     retarget
     matrix_test_result
     circ_matrix_matchpoint
@@ -565,8 +569,9 @@ sub new {
         ($self->circ_lib) ? $self->circ_lib : $self->editor->requestor->ws_ou);
 
     # if this is a renewal, default to desk_renewal
-    $self->desk_renewal(1) unless 
-        $self->opac_renewal or $self->phone_renewal or $self->sip_renewal;
+    $self->desk_renewal(1) unless
+        $self->opac_renewal or $self->phone_renewal or $self->sip_renewal
+        or $self->auto_renewal;
 
     $self->capture('') unless $self->capture;
 
@@ -2155,13 +2160,10 @@ sub build_checkout_circ_object {
       $circ->opac_renewal('t') if $self->opac_renewal;
       $circ->phone_renewal('t') if $self->phone_renewal;
       $circ->desk_renewal('t') if $self->desk_renewal;
+      $circ->auto_renewal('t') if $self->auto_renewal;
       $circ->renewal_remaining($self->renewal_remaining);
-      $circ->circ_staff($self->editor->requestor->id);
-   }
-
-   if ( $self->is_autorenewal ){
       $circ->auto_renewal_remaining($self->auto_renewal_remaining);
-      $circ->auto_renewal('t');
+      $circ->circ_staff($self->editor->requestor->id);
    }
 
     # if the user provided an overiding checkout time,
@@ -4055,7 +4057,7 @@ sub do_renew {
         if $circ->renewal_remaining < 1;
 
     $self->push_events(OpenILS::Event->new('MAX_AUTO_RENEWALS_REACHED'))
-        if $api =~ /renew.auto/ and $circ->auto_renewal_remaining < 1;
+        if $self->auto_renewal and $circ->auto_renewal_remaining < 1;
     # -----------------------------------------------------------------
 
     $self->parent_circ($circ->id);
@@ -4064,7 +4066,7 @@ sub do_renew {
     $self->circ($circ);
 
     # Opac renewal - re-use circ library from original circ (unless told not to)
-    if($self->opac_renewal or $api =~ /renew.auto/) {
+    if($self->opac_renewal or $self->auto_renewal) {
         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)) {
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Reactor/Circ/AutoRenew.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Reactor/Circ/AutoRenew.pm
index f06adc85e1..09dc0b18ae 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Reactor/Circ/AutoRenew.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Reactor/Circ/AutoRenew.pm
@@ -53,12 +53,12 @@ sub handler {
         $logger->info( "AUTORENEW: circ.target_copy: " . Dumper($_->target_copy()) );
         my $evt = $AppUtils->simplereq(
             'open-ils.circ',
-            'open-ils.circ.renew.auto',
+            'open-ils.circ.renew',
             $token,
             {
                 patron_id => $_->usr(),
                 copy_id => $_->target_copy(),
-                opac_renewal => 0
+                auto_renewal => 1
             }
         );
 
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.auto_renewal-not-desk_renewal.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.auto_renewal-not-desk_renewal.sql
new file mode 100644
index 0000000000..0afb614fa1
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.auto_renewal-not-desk_renewal.sql
@@ -0,0 +1,9 @@
+BEGIN;
+
+--SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+UPDATE action.circulation SET desk_renewal = FALSE WHERE auto_renewal IS TRUE;
+
+UPDATE action.aged_circulation SET desk_renewal = FALSE WHERE auto_renewal IS TRUE;
+
+COMMIT;
diff --git a/docs/RELEASE_NOTES_NEXT/Circulation/auto-renew-api-deprecation.adoc b/docs/RELEASE_NOTES_NEXT/Circulation/auto-renew-api-deprecation.adoc
new file mode 100644
index 0000000000..8f3ae666ee
--- /dev/null
+++ b/docs/RELEASE_NOTES_NEXT/Circulation/auto-renew-api-deprecation.adoc
@@ -0,0 +1,6 @@
+open-ils.circ.renew.auto API Deprecated
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+The open-ils.circ.renew.auto API added in release 3.2 is deprecated
+and will be removed in Evergreen release 3.5.  Please switch to using
+the open-ils.circ.renew API with the auto_renew option set to 1 in any
+custom code.

-----------------------------------------------------------------------

Summary of changes:
 .../lib/OpenILS/Application/Circ/Circulate.pm      | 24 ++++++++++++----------
 .../Application/Trigger/Reactor/Circ/AutoRenew.pm  |  4 ++--
 Open-ILS/src/sql/Pg/002.schema.config.sql          |  2 +-
 .../1190.data.auto_renewal-not-desk_renewal.sql    |  9 ++++++++
 .../templates/staff/cat/item/t_circ_list_pane.tt2  |  3 ++-
 .../templates/staff/cat/item/t_summary_pane.tt2    |  1 +
 .../Circulation/auto-renew-api-deprecation.adoc    |  6 ++++++
 7 files changed, 34 insertions(+), 15 deletions(-)
 create mode 100644 Open-ILS/src/sql/Pg/upgrade/1190.data.auto_renewal-not-desk_renewal.sql
 create mode 100644 docs/RELEASE_NOTES_NEXT/Circulation/auto-renew-api-deprecation.adoc


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list