Bugzilla – Attachment 122495 Details for
Bug 28263
AUTO_RENEWALS message for 'too_many' is wrong
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28263: Fix too_many auto renewal message
Bug-28263-Fix-toomany-auto-renewal-message.patch (text/plain), 5.08 KB, created by
Lucas Gass
on 2021-06-29 15:19:22 UTC
(
hide
)
Description:
Bug 28263: Fix too_many auto renewal message
Filename:
MIME Type:
Creator:
Lucas Gass
Created:
2021-06-29 15:19:22 UTC
Size:
5.08 KB
patch
obsolete
>From 8e1adc2a0cc31aca6b91d3e8e2bb9e221f6f0ca2 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Thu, 29 Apr 2021 14:36:03 +0000 >Subject: [PATCH] Bug 28263: Fix too_many auto renewal message > >To test: >1. Make an item eligible for auto_renewal. >2. Set circ rule so only 1 auto_renewal is allowd. >3. Run auto_renew once, get a successful message. >4. Run it again and get the too_many error "You have reached the maximum number of checkouts possible." >5. This has nothing to do with the number of checkouts >6. Apply patch and updatedatabase. >7. Do 1-4 again. >8. Message is now "You have reached the maximum number of renewals possible." >--- > .../bug_28263_fix_auto_renewal_message.perl | 10 ++++++++++ > installer/data/mysql/en/mandatory/sample_notices.yml | 4 ++-- > installer/data/mysql/updatedatabase.pl | 6 +++--- > 3 files changed, 15 insertions(+), 5 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_28263_fix_auto_renewal_message.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_28263_fix_auto_renewal_message.perl b/installer/data/mysql/atomicupdate/bug_28263_fix_auto_renewal_message.perl >new file mode 100644 >index 0000000000..cbfa8e846b >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_28263_fix_auto_renewal_message.perl >@@ -0,0 +1,10 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ $dbh->do(q{ >+ UPDATE letter SET >+ content = REPLACE(content, "You have reached the maximum number of checkouts possible." , "You have reached the maximum number of renewals possible.") >+ WHERE ( code = 'AUTO_RENEWALS' OR code = 'AUTO_RENEWALS_DGST' ); >+ }); >+ >+ NewVersion( $DBversion, 28263, "Update AUTO_RENEWAL too_many message"); >+} >diff --git a/installer/data/mysql/en/mandatory/sample_notices.yml b/installer/data/mysql/en/mandatory/sample_notices.yml >index 60635f49a8..d217271336 100644 >--- a/installer/data/mysql/en/mandatory/sample_notices.yml >+++ b/installer/data/mysql/en/mandatory/sample_notices.yml >@@ -1463,7 +1463,7 @@ tables: > - "[% IF checkout.auto_renew_error %]" > - "The following item, [% biblio.title %], has not been renewed because:" > - "[% IF checkout.auto_renew_error == 'too_many' %]" >- - "You have reached the maximum number of checkouts possible." >+ - "You have reached the maximum number of renewals possible." > - "[% ELSIF checkout.auto_renew_error == 'on_reserve' %]" > - "This item is on hold for another patron." > - "[% ELSIF checkout.auto_renew_error == 'restriction' %]" >@@ -1526,7 +1526,7 @@ tables: > - "[% IF !checkout.auto_renew_error %]" > - "was renewed until [% checkout.date_due | $KohaDates as_due_date => 1%]" > - "[% ELSIF checkout.auto_renew_error == 'too_many' %]" >- - "You have reached the maximum number of checkouts possible." >+ - "You have reached the maximum number of renewals possible." > - "[% ELSIF checkout.auto_renew_error == 'on_reserve' %]" > - "This item is on hold for another patron." > - "[% ELSIF checkout.auto_renew_error == 'restriction' %]" >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index d31ec08766..0d1d274afb 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -14439,7 +14439,7 @@ if( CheckVersion( $DBversion ) ) { > [% IF checkout.auto_renew_error %] > The following item, [% biblio.title %], has not been renewed because: > [% IF checkout.auto_renew_error == 'too_many' %] >-You have reached the maximum number of checkouts possible. >+You have reached the maximum number of renewals possible. > [% ELSIF checkout.auto_renew_error == 'on_reserve' %] > This item is on hold for another patron. > [% ELSIF checkout.auto_renew_error == 'restriction' %] >@@ -22107,7 +22107,7 @@ if( CheckVersion( $DBversion ) ) { > UPDATE letter SET > name = REPLACE(name, "notification on auto renewing", "Notification of automatic renewal"), > title = REPLACE(title, "Auto renewals", "Automatic renewal notice"), >- content = REPLACE(content, "You have reach the maximum of checkouts possible.", "You have reached the maximum number of checkouts possible.") >+ content = REPLACE(content, "You have reach the maximum of checkouts possible.", "You have reached the maximum number of renewals possible.") > WHERE code = 'AUTO_RENEWALS'; > }); > $dbh->do(q{ >@@ -23697,7 +23697,7 @@ if( CheckVersion( $DBversion ) ) { > [% IF !checkout.auto_renew_error %] > was renewed until [% checkout.date_due | $KohaDates as_due_date => 1%] > [% ELSIF checkout.auto_renew_error == 'too_many' %] >- You have reached the maximum number of checkouts possible. >+ You have reached the maximum number of renewals possible. > [% ELSIF checkout.auto_renew_error == 'on_reserve' %] > This item is on hold for another patron. > [% ELSIF checkout.auto_renew_error == 'restriction' %] >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 28263
:
120315
|
122495
|
126787
|
127108
|
127110