Bugzilla – Attachment 111854 Details for
Bug 24083
Koha should support "seen" vs "unseen" renewals
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24083: (follow-up) Respond to QA feedback
Bug-24083-follow-up-Respond-to-QA-feedback.patch (text/plain), 9.26 KB, created by
Andrew Isherwood
on 2020-10-16 11:20:15 UTC
(
hide
)
Description:
Bug 24083: (follow-up) Respond to QA feedback
Filename:
MIME Type:
Creator:
Andrew Isherwood
Created:
2020-10-16 11:20:15 UTC
Size:
9.26 KB
patch
obsolete
>From 1c5c8a77953ff1717b858ddc322fc69aab42f1ec Mon Sep 17 00:00:00 2001 >From: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> >Date: Fri, 2 Oct 2020 13:39:12 +0100 >Subject: [PATCH] Bug 24083: (follow-up) Respond to QA feedback > >This patch implements changes requested by Katrin in QA feedback >(comment #38): > >- Fix QA script failures >- Remove notice text database update >- Fix alter table column order mismatch >- Use new convention for JS strings >- Fix terminology >--- > C4/Circulation.pm | 2 +- > ...bug_24083_update_auto_renewals_letter.perl | 30 ------------------- > installer/data/mysql/kohastructure.sql | 4 +-- > installer/data/mysql/mandatory/sysprefs.sql | 2 +- > .../admin/preferences/circulation.pref | 2 +- > t/db_dependent/Circulation/issue.t | 1 - > 6 files changed, 5 insertions(+), 36 deletions(-) > delete mode 100644 installer/data/mysql/atomicupdate/bug_24083_update_auto_renewals_letter.perl > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 40baf3e28c..7a872ed3b1 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2962,7 +2962,7 @@ sub CanBookBeRenewed { > $soonestrenewal->truncate( to => 'day' ); > } > >- if ( $soonestrenewal > DateTime->now( time_zone => C4::Context->tz() ) ) >+ if ( $soonestrenewal > dt_from_string() ) > { > return ( 0, "auto_too_soon" ) if $issue->auto_renew; > return ( 0, "too_soon" ); >diff --git a/installer/data/mysql/atomicupdate/bug_24083_update_auto_renewals_letter.perl b/installer/data/mysql/atomicupdate/bug_24083_update_auto_renewals_letter.perl >deleted file mode 100644 >index 4a0d2e79ec..0000000000 >--- a/installer/data/mysql/atomicupdate/bug_24083_update_auto_renewals_letter.perl >+++ /dev/null >@@ -1,30 +0,0 @@ >-$DBversion = 'XXX'; # will be replaced by the RM >-if( CheckVersion( $DBversion ) ) { >- my ($text) = $dbh->selectrow_array('SELECT content FROM letter WHERE module = "circulation" AND code = "AUTO_RENEWALS" AND content NOT LIKE "%too_unseen%"'); >- >- if ($text) { >- my $find = qr/^\[\% (IF|ELSIF) checkout.auto_renew_error == 'too_many' \%\]$/; >- my @lines_in = split /^/, $text; >- my @lines_out = (); >- foreach my $line(@lines_in) { >- chomp($line); >- if ($line =~ $find) { >- if ($1) { >- my $newline_test = $1 eq 'IF' ? 'IF' : 'ELSIF'; >- $line =~ s/\bIF\b/ELSIF/; >- push @lines_out, "[% $newline_test checkout.auto_renew_error == 'too_unseen' %]"; >- push @lines_out, "You have reach the maximum of consecutive renewals without visiting the library."; >- } >- } >- push @lines_out, $line; >- } >- if (scalar @lines_out > 0) { >- my $joined = join "\n", @lines_out; >- $dbh->do(q{UPDATE letter SET content = ? WHERE module = "circulation" AND code = "AUTO_RENEWALS"}, undef, ($joined)); >- } >- } >- >- >- SetVersion( $DBversion ); >- print "Upgrade to $DBversion done (Bug 24083 - Update auto renewals letter)\n"; >-} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 246519fc8b..7d5eed162d 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -1623,8 +1623,8 @@ CREATE TABLE `issues` ( -- information related to check outs or issues > `returndate` datetime default NULL, -- date the item was returned, will be NULL until moved to old_issues > `lastreneweddate` datetime default NULL, -- date the item was last renewed > `renewals` tinyint(4) NOT NULL default 0, -- lists the number of times the item was renewed >- `auto_renew` tinyint(1) default FALSE, -- automatic renewal > `unseen_renewals` tinyint(4) NOT NULL default 0, -- lists the number of consecutive times the item was renewed without being seen >+ `auto_renew` tinyint(1) default FALSE, -- automatic renewal > `auto_renew_error` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL, -- automatic renewal error > `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched > `issuedate` datetime default NULL, -- date the item was checked out or issued >@@ -1656,8 +1656,8 @@ CREATE TABLE `old_issues` ( -- lists items that were checked out and have been r > `returndate` datetime default NULL, -- date the item was returned > `lastreneweddate` datetime default NULL, -- date the item was last renewed > `renewals` tinyint(4) NOT NULL default 0, -- lists the number of times the item was renewed >- `auto_renew` tinyint(1) default FALSE, -- automatic renewal > `unseen_renewals` tinyint(4) NOT NULL default 0, -- lists the number of consecutive times the item was renewed without being seen >+ `auto_renew` tinyint(1) default FALSE, -- automatic renewal > `auto_renew_error` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL, -- automatic renewal error > `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time this record was last touched > `issuedate` datetime default NULL, -- date the item was checked out or issued >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index 282997cb57..e9b79af260 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -671,7 +671,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('UNIMARCField100Language','fre',NULL,'UNIMARC field 100 default language','short'), > ('UpdateItemWhenLostFromHoldList','',NULL,'This is a list of values to update an item when it is marked as lost from the holds to pull screen','Free'), > ('UniqueItemFields','barcode','','Pipe-separated list of fields that should be unique (used in acquisition module for item creation). Fields must be valid SQL column names of items table','Free'), >-('UnseenRenewals','0','','Allow renewals to be recorded as "unseen" by the library, and count against the borrowers unseen renewals limit','YesNo'), >+('UnseenRenewals','0','','Allow renewals to be recorded as "unseen" by the library, and count against the patrons unseen renewals limit.','YesNo'), > ('UnsubscribeReflectionDelay','',NULL,'Delay for locking unsubscribers', 'Integer'), > ('UpdateItemLocationOnCheckin', '', 'NULL', 'This is a list of value pairs.\n Examples:\n\nPROC: FIC - causes an item in the Processing Center location to be updated into the Fiction location on check in.\nFIC: GEN - causes an item in the Fiction location to be updated into the General stacks location on check in.\n_BLANK_:FIC - causes an item that has no location to be updated into the Fiction location on check in.\nFIC: _BLANK_ - causes an item in location FIC to be updated to a blank location on check in.\n_ALL_:FIC - causes all items to be updated into the Fiction location on check in.\nPROC: _PERM_ - causes an item that is in the Processing Center to be updated to it''s permanent location.\n\nGeneral rule: if the location value on the left matches the item''s current location, it will be updated to match the location value on the right.\nNote: PROC and CART are special values, for these locations only can location and permanent_location differ, in all other cases an update will affect both. Items in the CART location will be returned to their permanent location on checkout.\n\nThe special term _BLANK_ may be used on either side of a value pair to update or remove the location from items with no location assigned.\nThe special term _ALL_ is used on the left side of the colon (:) to affect all items.\nThe special term _PERM_ is used on the right side of the colon (:) to return items to their permanent location.', 'Free'), > ('UpdateNotForLoanStatusOnCheckin', '', 'NULL', 'This is a list of value pairs. When an item is checked in, if the not for loan value on the left matches the items not for loan value it will be updated to the right-hand value. E.g. ''-1: 0'' will cause an item that was set to ''Ordered'' to now be available for loan. Each pair of values should be on a separate line.', 'Free'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >index 7d03ce69ea..6b3c1953c7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >@@ -324,7 +324,7 @@ Circulation: > choices: > yes: Allow > no: "Don't allow" >- - renewals to be recorded as "unseen" by the library, and count against the borrowers unseen renewals limit >+ - renewals to be recorded as "unseen" by the library, and count against the patrons unseen renewals limit. > - > - Prevent patrons from making holds on the OPAC if they owe more than > - pref: maxoutstanding >diff --git a/t/db_dependent/Circulation/issue.t b/t/db_dependent/Circulation/issue.t >index 665d0c3f5e..6c8c9ba30b 100755 >--- a/t/db_dependent/Circulation/issue.t >+++ b/t/db_dependent/Circulation/issue.t >@@ -32,7 +32,6 @@ use Koha::Checkouts; > use Koha::Database; > use Koha::DateUtils; > use Koha::Holds; >-use Koha::IssuingRules; > use Koha::Items; > use Koha::Library; > use Koha::Patrons; >-- >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 24083
:
95861
|
95862
|
95863
|
95864
|
95865
|
95866
|
95867
|
95868
|
98749
|
98750
|
98751
|
98752
|
98765
|
98766
|
98767
|
98768
|
100244
|
100245
|
100246
|
100247
|
100380
|
100381
|
100382
|
100383
|
100392
|
110607
|
110608
|
110609
|
110610
|
110611
|
111147
|
111148
|
111149
|
111150
|
111151
|
111152
|
111283
|
111284
|
111285
|
111286
|
111287
|
111288
|
111289
|
111290
|
111291
|
111292
|
111293
|
111849
|
111850
|
111851
|
111852
|
111853
|
111854
|
111855
|
111856
|
111857
|
111858
|
111859
|
111860
|
112230
|
112231
|
112232
|
112233
|
112234
|
112235
|
112236
|
112237
|
112238
|
112239
|
112240
|
112241
|
112242
|
112243
|
112410
|
112411
|
112412
|
112413
|
112414
|
112415
|
112416
|
112417
|
112418
|
112419
|
112420
|
112421
|
112422
|
112423
|
113073
|
113074
|
113075
|
113076
|
113077
|
113078
|
113079
|
113080
|
113314
|
113315
|
113484
|
113485
|
113486
|
113487
|
113488
|
113489
|
113490
|
113491
|
113492
|
113493
|
113494
|
113546
|
113556
|
113557
|
113814