Bugzilla – Attachment 179698 Details for
Bug 35604
ILL - Allow for automatic backend selection
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35604: Multiple QA followups
Bug-35604-Multiple-QA-followups.patch (text/plain), 7.63 KB, created by
Pedro Amorim
on 2025-03-25 17:12:05 UTC
(
hide
)
Description:
Bug 35604: Multiple QA followups
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2025-03-25 17:12:05 UTC
Size:
7.63 KB
patch
obsolete
>From 55850d03a7c5795705faecc8af31ecf04bdd1c40 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Tue, 25 Mar 2025 16:43:11 +0000 >Subject: [PATCH] Bug 35604: Multiple QA followups > >Multiple fixes: >- File permmissions >- Capitalization >- Translatability >- Use of console.log >- Atomic update description typo fix >--- > installer/data/mysql/atomicupdate/bug_35604.pl | 4 ++-- > installer/data/mysql/mandatory/sysprefs.sql | 2 +- > koha-tmpl/intranet-tmpl/prog/js/ill-autobackend.js | 10 +++------- > .../opac-tmpl/bootstrap/en/modules/opac-results.tt | 4 ++-- > koha-tmpl/opac-tmpl/bootstrap/js/ill-autobackend.js | 10 +++------- > t/db_dependent/Koha/ILL/Backends.t | 0 > t/db_dependent/Koha/ILL/Request/Workflow/ConfirmAuto.t | 0 > 7 files changed, 11 insertions(+), 19 deletions(-) > mode change 100644 => 100755 installer/data/mysql/atomicupdate/bug_35604.pl > mode change 100644 => 100755 t/db_dependent/Koha/ILL/Backends.t > mode change 100644 => 100755 t/db_dependent/Koha/ILL/Request/Workflow/ConfirmAuto.t > >diff --git a/installer/data/mysql/atomicupdate/bug_35604.pl b/installer/data/mysql/atomicupdate/bug_35604.pl >old mode 100644 >new mode 100755 >index cd347bcac85..2979ea49514 >--- a/installer/data/mysql/atomicupdate/bug_35604.pl >+++ b/installer/data/mysql/atomicupdate/bug_35604.pl >@@ -3,13 +3,13 @@ use Koha::Installer::Output qw(say_warning say_success say_info); > > return { > bug_number => "35604", >- description => "Add new AutoILLBackendPriority system preferences", >+ description => "Add new AutoILLBackendPriority system preference", > up => sub { > my ($args) = @_; > my ( $dbh, $out ) = @$args{qw(dbh out)}; > > $dbh->do( >- q{ INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('AutoILLBackendPriority','',NULL,'Set the automatic backend selection priority','ILLBackends'); } >+ q{ INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('AutoILLBackendPriority','',NULL,'Set the automatic backend selection priority','ill-backends'); } > ); > say_success( $out, "Added new system preference 'AutoILLBackendPriority'" ); > }, >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index b64d88a6d09..7f35027dc54 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -93,7 +93,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('AutoCreateAuthorities','0',NULL,'Automatically create authorities that do not exist when cataloging records.','YesNo'), > ('AutoCreditNumber', '', '', 'Automatically generate a number for account credits', 'Choice'), > ('AutoEmailNewUser','0',NULL,'Send an email to newly created patrons.','YesNo'), >-('AutoILLBackendPriority','',NULL,'Set the automatic backend selection priority','ILLBackends'), >+('AutoILLBackendPriority','',NULL,'Set the automatic backend selection priority','ill-backends'), > ('AutoLinkBiblios','0',NULL,'If enabled, link biblio to authorities on creation and edit','YesNo'), > ('AutomaticCheckinAutoFill','0',NULL,'Automatically fill the next hold with an automatic check in.','YesNo'), > ('AutomaticConfirmTransfer','0',NULL,'Defines whether transfers should be automatically confirmed at checkin if modal dismissed','YesNo'), >diff --git a/koha-tmpl/intranet-tmpl/prog/js/ill-autobackend.js b/koha-tmpl/intranet-tmpl/prog/js/ill-autobackend.js >index 04461b15806..a66bf03b77e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/ill-autobackend.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/ill-autobackend.js >@@ -34,7 +34,7 @@ $(document).ready(function () { > __("Verification timed out.") > ); > } else { >- let message = "Error"; >+ let message = __("Error"); > if (request.hasOwnProperty("responseJSON")) { > if (request.responseJSON.error) { > message = request.responseJSON.error; >@@ -61,12 +61,8 @@ $(document).ready(function () { > function getBackendsAvailability(auto_backends, metadata) { > let promises = []; > for (const auto_backend of auto_backends) { >- try { >- const prom = getBackendAvailability(auto_backend, metadata); >- promises.push(prom); >- } catch (e) { >- console.log(e); >- } >+ const prom = getBackendAvailability(auto_backend, metadata); >+ promises.push(prom); > } > Promise.allSettled(promises).then(() => { > let auto_backend = auto_backends.find(backend => backend.available); >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >index da505b965e6..be7e0af8898 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >@@ -445,9 +445,9 @@ > [% END %] > [% IF Koha.Preference( 'ILLModule' ) == 1 && loggedinusername %] > [% IF Koha.Preference( 'AutoILLBackendPriority' ) %] >- <li>Make an automatic <a href="/cgi-bin/koha/opac-illrequests.pl?op=create&backend=Standard">Interlibrary loan request</a></li> >+ <li>Make an <a href="/cgi-bin/koha/opac-illrequests.pl?op=create&backend=Standard">interlibrary loan request</a></li> > [% ELSE %] >- <li>Make an <a href="/cgi-bin/koha/opac-illrequests.pl?op=create">Interlibrary loan request</a></li> >+ <li>Make an <a href="/cgi-bin/koha/opac-illrequests.pl?op=create">interlibrary loan request</a></li> > [% END %] > [% END %] > </ul> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/ill-autobackend.js b/koha-tmpl/opac-tmpl/bootstrap/js/ill-autobackend.js >index cc258854731..7c59e3d185e 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/js/ill-autobackend.js >+++ b/koha-tmpl/opac-tmpl/bootstrap/js/ill-autobackend.js >@@ -34,7 +34,7 @@ $(document).ready(function () { > __("Verification timed out.") > ); > } else { >- let message = "Error"; >+ let message = __("Error"); > if (request.hasOwnProperty("responseJSON")) { > if (request.responseJSON.error) { > message = request.responseJSON.error; >@@ -61,12 +61,8 @@ $(document).ready(function () { > function getBackendsAvailability(auto_backends, metadata) { > let promises = []; > for (const auto_backend of auto_backends) { >- try { >- const prom = getBackendAvailability(auto_backend, metadata); >- promises.push(prom); >- } catch (e) { >- console.log(e); >- } >+ const prom = getBackendAvailability(auto_backend, metadata); >+ promises.push(prom); > } > Promise.allSettled(promises).then(() => { > let auto_backend = auto_backends.find(backend => backend.available); >diff --git a/t/db_dependent/Koha/ILL/Backends.t b/t/db_dependent/Koha/ILL/Backends.t >old mode 100644 >new mode 100755 >diff --git a/t/db_dependent/Koha/ILL/Request/Workflow/ConfirmAuto.t b/t/db_dependent/Koha/ILL/Request/Workflow/ConfirmAuto.t >old mode 100644 >new mode 100755 >-- >2.39.5
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 35604
:
160035
|
164883
|
164884
|
164885
|
164886
|
164887
|
164888
|
165135
|
165164
|
165165
|
165294
|
165295
|
165296
|
165297
|
165298
|
165299
|
165300
|
166897
|
166898
|
166899
|
166900
|
166901
|
166902
|
166903
|
166995
|
166996
|
166997
|
166998
|
166999
|
167000
|
167001
|
171326
|
171327
|
171328
|
171329
|
171330
|
171331
|
171332
|
174515
|
174516
|
174517
|
174518
|
174519
|
174520
|
174521
|
174522
|
174524
|
174792
|
175828
|
175829
|
175830
|
175831
|
175832
|
175833
|
175834
|
175835
|
175836
|
176036
|
176261
|
176262
|
176263
|
176264
|
176265
|
176266
|
176267
|
176268
|
176269
|
176270
|
176572
|
176662
|
176681
|
176682
|
176683
|
176684
|
176685
|
176686
|
176687
|
176688
|
176689
|
176690
|
176691
|
176692
|
178305
|
178306
|
178307
|
178308
|
178309
|
178310
|
178311
|
178312
|
178313
|
178314
|
178315
|
178316
|
178707
|
178708
|
178709
|
178710
|
178711
|
178712
|
178713
|
178714
|
178715
|
178716
|
178717
|
178718
|
179698
|
179699
|
179720
|
179721
|
180335
|
180451
|
180452
|
180453
|
180454
|
180455
|
180456
|
180457
|
180458
|
180459
|
180460
|
180461
|
180462
|
180463
|
180464
|
180465
|
180956