From 3cd9d847f7316302e545e38d2579eaeac4f88dc8 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 4 Mar 2020 11:52:11 +0000 Subject: [PATCH] Bug 23112: (QA follow-up) Fix database update, add filters, remove tabs Looks like the atomicupdate and sysprefs.sql changes were lost at some point. Don't forget to run QA tools on your patches before submitting Signed-off-by: Nick Clemens Signed-off-by: Martin Renvoize --- C4/Circulation.pm | 16 ++++++++-------- Koha/Illrequest.pm | 18 +++++++++--------- .../bug_23112_add_CirculateILL_syspref.perl | 6 ++++++ installer/data/mysql/sysprefs.sql | 1 + .../modules/admin/preferences/circulation.pref | 14 +++++++------- .../prog/en/modules/ill/ill-requests.tt | 14 +++++++------- 6 files changed, 38 insertions(+), 31 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug_23112_add_CirculateILL_syspref.perl diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 2046c3f202..8037101086 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2131,14 +2131,14 @@ sub AddReturn { DelUniqueDebarment({ borrowernumber => $borrowernumber, type => 'OVERDUES' }); } - # Check if this item belongs to a biblio record that is attached to an - # ILL request, if it is we need to update the ILL request's status - if (C4::Context->preference('CirculateILL')) { - my $request = Koha::Illrequests->find( - { biblio_id => $item->biblio->biblionumber } - ); - $request->status('RET') if $request; - } + # Check if this item belongs to a biblio record that is attached to an + # ILL request, if it is we need to update the ILL request's status + if (C4::Context->preference('CirculateILL')) { + my $request = Koha::Illrequests->find( + { biblio_id => $item->biblio->biblionumber } + ); + $request->status('RET') if $request; + } # Transfer to returnbranch if Automatic transfer set or append message NeedsTransfer if (!$is_in_rotating_collection && ($doreturn or $messages->{'NotIssued'}) and !$resfound and ($branch ne $returnbranch) and not $messages->{'WrongTransfer'}){ diff --git a/Koha/Illrequest.pm b/Koha/Illrequest.pm index e81997f8ce..c6280d2057 100644 --- a/Koha/Illrequest.pm +++ b/Koha/Illrequest.pm @@ -499,15 +499,15 @@ sub _core_status_graph { next_actions => [ ], ui_method_icon => 'fa-upload', }, - RET => { - prev_actions => [ 'CHK' ], - id => 'RET', - name => 'Returned to library', - ui_method_name => 'Check in', - method => 'check_in', - next_actions => [ 'COMP' ], - ui_method_icon => 'fa-download', - } + RET => { + prev_actions => [ 'CHK' ], + id => 'RET', + name => 'Returned to library', + ui_method_name => 'Check in', + method => 'check_in', + next_actions => [ 'COMP' ], + ui_method_icon => 'fa-download', + } }; } diff --git a/installer/data/mysql/atomicupdate/bug_23112_add_CirculateILL_syspref.perl b/installer/data/mysql/atomicupdate/bug_23112_add_CirculateILL_syspref.perl new file mode 100644 index 0000000000..075e9142d2 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_23112_add_CirculateILL_syspref.perl @@ -0,0 +1,6 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + $dbh->do( q| INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) VALUES ('CirculateILL', '0', 'If enabled, it is possible to circulate ILL requested items from within ILL', '', 'YesNo'); | ); + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 23112 - Add CirculateILL syspref)\n"; +} diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 8724681fe9..3e513fd0db 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -120,6 +120,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('CircAutoPrintQuickSlip','qslip',NULL,'Choose what should happen when an empty barcode field is submitted in circulation: Display a print quick slip window, Display a print slip window or Clear the screen.','Choice'), ('CircControl','ItemHomeLibrary','PickupLibrary|PatronLibrary|ItemHomeLibrary','Specify the agency that controls the circulation and fines policy','Choice'), ('CircSidebar','0',NULL,'Activate or deactivate the navigation sidebar on all Circulation pages','YesNo'), +('CirculateILL','0','','If enabled, it is possible to circulate ILL items from within ILL','YesNo'), ('ClaimsBccCopy','0','','Bcc the ClaimAcquisition and ClaimIssues alerts','YesNo'), ('ClaimReturnedChargeFee', 'ask', 'ask|charge|no_charge', 'Controls whether or not a lost item fee is charged for return claims', 'Choice'), ('ClaimReturnedLostValue', '', '', 'Sets the LOST AV value that represents "Claims returned" as a lost value', '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 71abe8ab64..bb03bd5ebf 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 @@ -855,13 +855,13 @@ Circulation: yes: Enable no: Disable - unmediated Interlibrary loan requests. If enabled and the ILL backend supports it, the newly created requests are immediately requested by backend. - - - - pref: CirculateILL - default: 0 - choices: - yes: Enable - no: Disable - - the circulation of ILL requested items + - + - pref: CirculateILL + default: 0 + choices: + yes: Enable + no: Disable + - the circulation of ILL requested items Fines Policy: - - pref: finesCalendar diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt index b6d736e127..413e4a190a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt @@ -133,7 +133,7 @@ [% ELSE %]
- There was a problem checking this item out, please check for problems with the patron's account + There was a problem checking this item out, please check for problems with the patron's account
[% END %] [% END %] @@ -154,9 +154,9 @@ [% FOREACH stat IN whole.value.statistical %] [% IF stat.borrowernumber == params.inhouse %] - + [% ELSE %] - + [% END %] [% END %] @@ -193,7 +193,7 @@ [% IF items.size == 1 %]
  • - [% items.0.barcode %] + [% items.0.barcode | html %]
  • [% END %]
  • @@ -206,7 +206,7 @@ [% ELSE %] [% FOREACH branch IN whole.value.libraries.unblessed %] [% IF branch.branchcode == branchcode %] - [% branch.branchname %] + [% branch.branchname | html %] [% END %] [% END %] [% END %] @@ -225,8 +225,8 @@ [% IF items.size == 1 %] - - + + [% END %] -- 2.39.5