From ec8465eb1021537ca3f09d0db423e605acd868db Mon Sep 17 00:00:00 2001 From: David Nind Date: Mon, 3 Jun 2024 02:01:30 +0000 Subject: [PATCH 01/20] Bug 30715: Terminology for the log viewer - use 'Staff interface' instead of 'Intranet' The log viewer (Tools > Additional tools > Log viewer) uses 'Intranet' as: - an option for filtering what log entries to display. - a value in the log entries interface column, for log entries. Koha's terminology guideline is to use 'Staff interface' instead of 'Interface' (https://wiki.koha-community.org/wiki/Terminology#I). Test plan: 1. Perform some actions that will create log entries when using the staff interface. For example: 1.1 Enable the UseRecalls system preference. 1.2 Edit the title for a record. 1.3 Add an item for a record. 2. Use the log viewer to view the logged changes: 2.1 Go to Tools > Additional tools > Log viewer. 2.2 Select Submit. 2.3 Log entries are displayed for the changes made. 3. Note that: 3.1 For the log viewer 'Interface' filter options, "All" is selected by default, and other options are Intranet, OPAC, SIP, Command-line, REST API, and Cron job. 3.2 For the changes viewed in step 2, the value displayed in the 'Interface' column is 'Intranet'. 4. Apply the patch. 5. Refresh the page. 6. Note that: 5.1 For the interface filter options, 'Intranet' is now changed to 'Staff interface'. 5.2 In the list of log entries, the value in the interface column is now 'Staff interface'. 7. Sign off D: Signed-off-by: David Nind Signed-off-by: Lucas Gass Signed-off-by: Emily Lamancusa Signed-off-by: wainuiwitikapark --- koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt index 7fa381f574..5871e3b249 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt @@ -156,7 +156,7 @@ [% BLOCK translate_log_interface %] [% SWITCH log_interface.upper %] -[% CASE 'INTRANET' %]Intranet +[% CASE 'INTRANET' %]Staff interface [% CASE 'OPAC' %]OPAC [% CASE 'SIP' %]SIP [% CASE 'COMMANDLINE' %]Command-line From 0af87f009f5e66ee82ea33767489ef4158820377 Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Thu, 23 May 2024 09:23:10 +0000 Subject: [PATCH 02/20] Bug 36937: Remove warning from unit tests This patch fixes a warning in the unit tests Test plan: 1) prove t/db_dependent/api/v1/password_validation.t 2) There will be a warning in the output - 'Use of uninitialized value $status in numeric eq (==)' 3) Apply patch 4) Re-run the test 5) The warning will disappear Signed-off-by: Jonathan Druart Signed-off-by: David Nind Signed-off-by: wainuiwitikapark --- Koha/REST/V1/Auth/Password.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/REST/V1/Auth/Password.pm b/Koha/REST/V1/Auth/Password.pm index 189dcc80d5..339229477d 100644 --- a/Koha/REST/V1/Auth/Password.pm +++ b/Koha/REST/V1/Auth/Password.pm @@ -73,7 +73,7 @@ sub validate { return try { my ( $status, $THE_cardnumber, $THE_userid, $patron ) = C4::Auth::checkpw( $identifier, $password ); unless ( $status && $status > 0 ) { - my $error_response = $status == -2 ? 'Password expired' : 'Validation failed'; + my $error_response = ($status && $status == -2) ? 'Password expired' : 'Validation failed'; return $c->render( status => 400, openapi => { error => $error_response } From 2016b650e2a7691f578a59f2ac4b2c852149278b Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 23 May 2024 08:47:50 +0000 Subject: [PATCH 03/20] Bug 36940: Resolve two warnings on undefined branchip If you enabled AutoLocation and have a branch without ip, this triggers warnings. Test plan: Check logs in this situation with/without this patch by logging out and in again on staff. Signed-off-by: Marcel de Rooy Signed-off-by: Nick Clemens Signed-off-by: Martin Renvoize (cherry picked from commit 2f1ffbc6ec088c6c18bad967086db1e51084403f) Signed-off-by: Lucas Gass (cherry picked from commit 2d4537ba124d40201a4a0d164e714479474749ce) Signed-off-by: Fridolin Somers --- C4/Auth.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 42baea8321..7bd2b7bfd0 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -1199,10 +1199,10 @@ sub checkauth { my $branches = { map { $_->branchcode => $_->unblessed } Koha::Libraries->search->as_list }; if ( C4::Context->preference('AutoLocation') ) { # we have to check they are coming from the right ip range - my $domain = $branches->{$branchcode}->{'branchip'}; + my $domain = $branches->{$branchcode}->{'branchip'} // q{}; $domain =~ s|\.\*||g; $domain =~ s/\s+//g; - if ( $ip !~ /^$domain/ ) { + if ( $domain && $ip !~ /^$domain/ ) { $cookie = $cookie_mgr->replace_in_list( $cookie, $query->cookie( -name => 'CGISESSID', -value => '', From fc8c2ac8c1c8cf01d43d7b7363cb53237bd361bf Mon Sep 17 00:00:00 2001 From: Janusz Kaczmarek Date: Wed, 22 May 2024 21:08:35 +0000 Subject: [PATCH 04/20] Bug 36930: Item search gives irrelevant results when using 2+ added filter criteria In the Item search the librarian is allowed, in the first step, to define additional filters like Title, Author, Publisher, Publication date etc. (in the third fieldset). This works fine but only for one criterion. If one adds two or more criteria, the filter does not apply at all. Test plan ========= 1. Make an Item search with the Pulblisher filter. Put %University of California% as the value. You should get 5 rows (with standard ktd test data set), three from 1982, and two from 1988. 2. Edit search -> add the second criterion: AND Publication date is 1982. You would expect three rows but you get 900+ rows. 3. Apply the patch; restart_all. 4. Repeat p. 2. You should get the expected three rows. Signed-off-by: Pedro Amorim Signed-off-by: Martin Renvoize (cherry picked from commit bdc7ac2c93f9af9ac196c77da47758a1078c47d7) Signed-off-by: Lucas Gass (cherry picked from commit dca760d5b24428143a0e0de7b52c131c813488fc) Signed-off-by: Fridolin Somers Signed-off-by: wainuiwitikapark --- catalogue/itemsearch.pl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/catalogue/itemsearch.pl b/catalogue/itemsearch.pl index 7f58423602..14270d5a4f 100755 --- a/catalogue/itemsearch.pl +++ b/catalogue/itemsearch.pl @@ -141,10 +141,11 @@ if ( defined $format ) { } } - my @c = $cgi->multi_param('c'); - my @fields = $cgi->multi_param('f'); - my @q = $cgi->multi_param('q'); - my @op = $cgi->multi_param('op'); + my %param_names = map { $_ => 1 } $cgi->multi_param; + my @c = $param_names{'c[]'} ? $cgi->multi_param('c[]') : $cgi->multi_param('c'); + my @fields = $param_names{'f[]'} ? $cgi->multi_param('f[]') : $cgi->multi_param('f'); + my @q = $param_names{'q[]'} ? $cgi->multi_param('q[]') : $cgi->multi_param('q'); + my @op = $param_names{'op[]'} ? $cgi->multi_param('op[]') : $cgi->multi_param('op'); my $f; for (my $i = 0; $i < @fields; $i++) { From e471583547d42555f73ed2013ebe2883460ef460 Mon Sep 17 00:00:00 2001 From: Brendan Lawlor Date: Thu, 6 Jun 2024 13:14:43 +0000 Subject: [PATCH 05/20] Bug 35294: Fix typos in catalogue code comments Test plan: 1. git grep -n -E 'barocode|preproccess' to find the files and line # of typos 2. Apply the patch 3. git grep -E 'barocode|proccess' 4. See no results Signed-off-by: David Nind Signed-off-by: Matt Blenkinsop Signed-off-by: Martin Renvoize (cherry picked from commit e8ef0f9417588345d6c9f7e2e5986e4e53986f52) Signed-off-by: Lucas Gass (cherry picked from commit 96097d8058f6de34036fc4b26dec83c485ed08d9) Signed-off-by: Fridolin Somers Signed-off-by: wainuiwitikapark --- catalogue/itemsearch.pl | 2 +- catalogue/search.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/catalogue/itemsearch.pl b/catalogue/itemsearch.pl index 14270d5a4f..b56f509513 100755 --- a/catalogue/itemsearch.pl +++ b/catalogue/itemsearch.pl @@ -51,7 +51,7 @@ if (defined $format and $format eq 'json') { my @f = $cgi->multi_param('f'); my @q = $cgi->multi_param('q'); - # If index indicates the value is a barcode, we need to preproccess it before searching + # If index indicates the value is a barcode, we need to preprocess it before searching for ( my $i = 0; $i < @q; $i++ ) { $q[$i] = barcodedecode($q[$i]) if $f[$i] eq 'barcode'; } diff --git a/catalogue/search.pl b/catalogue/search.pl index b5ae390657..462542d070 100755 --- a/catalogue/search.pl +++ b/catalogue/search.pl @@ -459,7 +459,7 @@ my $builder = Koha::SearchEngine::QueryBuilder->new( my $searcher = Koha::SearchEngine::Search->new( { index => $Koha::SearchEngine::BIBLIOS_INDEX } ); -# If index indicates the value is a barocode, we need to preproccess it before searching +# If index indicates the value is a barcode, we need to preprocess it before searching for ( my $i = 0; $i < @operands; $i++ ) { $operands[$i] = barcodedecode($operands[$i]) if (defined($indexes[$i]) && $indexes[$i] eq 'bc'); } From 619db47e3fe3b590f85643840e49770acf2f7149 Mon Sep 17 00:00:00 2001 From: Baptiste Wojtkowski Date: Thu, 13 Jun 2024 15:36:18 +0200 Subject: [PATCH 06/20] Bug 30493: Pending archived suggestions appear on intranet home page If suggestions are archived before their status is changed to something other than "Pending", they still appear on the intranet home page and the acquisitions home page as suggestions to be managed. WITHOUT PATCH: 1. Go to Acquisitions > Suggestions 2. Click on New purchase suggestion 3. Fill in the form (title only is fine) 4. Click on Submit your suggestion 5. Go to the home page (click the Koha logo) --> Notice it says that there is 1 pending suggestion 6. Go to Acquisitions --> Notice it says that there is 1 pending suggestion 7. Go to Suggestions 8. Click on the up arrow to the right of the Edit button and choose Archive --> There are no more pending suggestions 9. Go to the home page (click the Koha logo) --> Notice it says that there is 1 pending suggestion 10. Go to Acquisitions --> Notice it says that there is 1 pending suggestion The search function was fetching suggestions without considering the "archived" field. I now pick only suggestion that are pending AND not archived. WITH PATCH: 9. Go to the home page (click the Koha logo) --> Notice it says that there is no pending suggestion 10. Go to Acquisitions --> Notice it says that there is no pending suggestion Signed-off-by: Lucas Gass Signed-off-by: Emily Lamancusa Signed-off-by: Katrin Fischer (cherry picked from commit e87f4cd550e60d7955551abf44f4dd9c1fd332d5) Signed-off-by: Lucas Gass (cherry picked from commit 5db98bbd65bc0498bbb916c148076b258e5135ad) Signed-off-by: Fridolin Somers Signed-off-by: wainuiwitikapark --- acqui/acqui-home.pl | 2 +- mainpage.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/acqui/acqui-home.pl b/acqui/acqui-home.pl index 8e679727ad..f6ed46c454 100755 --- a/acqui/acqui-home.pl +++ b/acqui/acqui-home.pl @@ -53,7 +53,7 @@ if( C4::Context->only_my_library ){ my $local_pendingsuggestions_count = Koha::Suggestions->search({ status => "ASKED", branchcode => C4::Context->userenv()->{'branch'} })->count(); $template->param( suggestions_count => $local_pendingsuggestions_count ); } else { - my $pendingsuggestions = Koha::Suggestions->search({ status => "ASKED" }); + my $pendingsuggestions = Koha::Suggestions->search({ status => "ASKED", archived => 0 }); my $local_pendingsuggestions_count = $pendingsuggestions->search({ 'me.branchcode' => C4::Context->userenv()->{'branch'} })->count(); my $pendingsuggestions_count = $pendingsuggestions->count(); $template->param( diff --git a/mainpage.pl b/mainpage.pl index e1c033f18a..d51703283d 100755 --- a/mainpage.pl +++ b/mainpage.pl @@ -91,7 +91,7 @@ if( C4::Context->only_my_library ){ my $local_pendingsuggestions_count = Koha::Suggestions->search({ status => "ASKED", branchcode => C4::Context->userenv()->{'branch'} })->count(); $template->param( pendingsuggestions => $local_pendingsuggestions_count ); } else { - my $pendingsuggestions = Koha::Suggestions->search({ status => "ASKED" }); + my $pendingsuggestions = Koha::Suggestions->search({ status => "ASKED", archived => 0 }); my $local_pendingsuggestions_count = $pendingsuggestions->search({ 'me.branchcode' => C4::Context->userenv()->{'branch'} })->count(); my $pendingsuggestions_count = $pendingsuggestions->count(); $template->param( From ba0ea9cd26e6914c10f5a4b0a57ffafb448f3b05 Mon Sep 17 00:00:00 2001 From: Emily Lamancusa Date: Fri, 14 Jun 2024 15:10:24 -0400 Subject: [PATCH 07/20] Bug 30493: (QA follow-up) Fix for the only_my_library case as well Signed-off-by: Emily Lamancusa Signed-off-by: Katrin Fischer (cherry picked from commit 94e1d8ed0c4742f48d23dc0241c0d04f058ee316) Signed-off-by: Lucas Gass (cherry picked from commit bcb520d69e4e65e5278fc8c57d04817d8b816db7) Signed-off-by: Fridolin Somers Signed-off-by: wainuiwitikapark --- acqui/acqui-home.pl | 2 +- mainpage.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/acqui/acqui-home.pl b/acqui/acqui-home.pl index f6ed46c454..07b1cce899 100755 --- a/acqui/acqui-home.pl +++ b/acqui/acqui-home.pl @@ -50,7 +50,7 @@ my $status = $query->param('status') || "ASKED"; # Get current branch count and total viewable count, if they don't match then pass # both to template if( C4::Context->only_my_library ){ - my $local_pendingsuggestions_count = Koha::Suggestions->search({ status => "ASKED", branchcode => C4::Context->userenv()->{'branch'} })->count(); + my $local_pendingsuggestions_count = Koha::Suggestions->search({ status => "ASKED", branchcode => C4::Context->userenv()->{'branch'}, archived => 0 })->count(); $template->param( suggestions_count => $local_pendingsuggestions_count ); } else { my $pendingsuggestions = Koha::Suggestions->search({ status => "ASKED", archived => 0 }); diff --git a/mainpage.pl b/mainpage.pl index d51703283d..1bacb77e16 100755 --- a/mainpage.pl +++ b/mainpage.pl @@ -88,7 +88,7 @@ my $pendingtags = get_count_by_tag_status(0); # both to template if( C4::Context->only_my_library ){ - my $local_pendingsuggestions_count = Koha::Suggestions->search({ status => "ASKED", branchcode => C4::Context->userenv()->{'branch'} })->count(); + my $local_pendingsuggestions_count = Koha::Suggestions->search({ status => "ASKED", branchcode => C4::Context->userenv()->{'branch'}, archived => 0 })->count(); $template->param( pendingsuggestions => $local_pendingsuggestions_count ); } else { my $pendingsuggestions = Koha::Suggestions->search({ status => "ASKED", archived => 0 }); From 73dd7b3de16e814fd0ea56bb6b972b939c307c7f Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 6 Jun 2024 11:27:33 +0100 Subject: [PATCH 08/20] Bug 37003: Add the 24.11 release team This patch updates the teams.yaml to include the voted in 24.11 release team. Test plan 1/ Check against https://wiki.koha-community.org/wiki/Release_Teams Signed-off-by: Chris Cormack Signed-off-by: Kyle M Hall Signed-off-by: Katrin Fischer (cherry picked from commit a2ebd5ad2833a84c67ecf8dbbd8820065013f2e9) Signed-off-by: Lucas Gass (cherry picked from commit a7b870fdfd0245e5b572d94ab11f377d2c26fe5b) Signed-off-by: Fridolin Somers Signed-off-by: wainuiwitikapark --- docs/teams.yaml | 79 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 78 insertions(+), 1 deletion(-) diff --git a/docs/teams.yaml b/docs/teams.yaml index 419767a30d..95cdcc49d0 100644 --- a/docs/teams.yaml +++ b/docs/teams.yaml @@ -1286,7 +1286,7 @@ team: newsletter: name: Michael Kuhn 24.05: - release_date: 1716336000 + release_date: 1716850801 manager: name: Katrin Fischer manager_assistants: @@ -1368,3 +1368,80 @@ team: - name: Liz Rea newsletter: name: Michael Kuhn + 24.11: + release_date: 1732233601 + manager: + name: Katrin Fischer + manager_assistants: + - name: Tomás Cohen Arazi + - name: Martin Renvoize + - name: Jonathan Druart + maintainer: + - version: 24.05 + name: Lucas Gass + - version: 23.11 + name: Fridolin Somers + - version: 23.05 + name: Wainui Witika-Park + - version: 22.11 + name: Fridolin Somers + qa_manager: + name: Martin Renvoize + qa: + - name: Marcel de Rooy + - name: Kyle M Hall + - name: Emily Lamancusa + - name: Nick Clemens + - name: Lucas Gass + - name: Tomás Cohen Arazi + - name: Julian Maurice + - name: Victor Grousset + - name: Aleisha Amohia + - name: David Cook + - name: Laura Escamilla + - name: Jonathan Druart + - name: Pedro Amorim + - name: Matt Blenkinsop + - name: Thomas Klausner + te: + - area: UI Design + name: Owen Leonard + - area: Zebra + name: Fridolin Somers + - area: ERM + name: Matt Blenkinsop + - area: ILL + name: Pedro Amorim + - area: SIP2 + name: Matthias Meusburger + - area: CAS + name: Matthias Meusburger + bugwrangler: + - name: Aleisha Amohia + - name: Jacob O'Mara + documentation: + name: Philip Orr + documentation_team: + - name: Aude Charillon + - name: Caroline Cyr La Rose + - name: Lucy Vaux-Harvey + - name: Emmanuel Bétemps + - name: Marie-Luce Laflamme + - name: Kelly McElligott + - name: Rasa Šatinskienė + - name: Heather Hernandez + meeting_facilitator: + - name: Paul Derscheid + packaging: + - name: Mason James + - name: Tomás Cohen Arazi + ktd: + - name: Tomás Cohen Arazi + - name: Jacob O'Mara + wiki: + - name: Thomas Dukleth + - name: George Williams + website: + - name: Liz Rea + newsletter: + name: Michael Kuhn From d7eee5de10341cc359b2aa36bac1d153bbc87d7c Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 25 Jun 2024 14:14:46 +0100 Subject: [PATCH 09/20] Bug 37003: (follow-up) Amend 22.11 RMaint Signed-off-by: Katrin Fischer (cherry picked from commit 16e35d5f107031e9573f5f565dedfb428b9c5696) Signed-off-by: Lucas Gass (cherry picked from commit 5e69aef19d71c62681a5ebeeab6a0df2fb14fa4e) Signed-off-by: Fridolin Somers Signed-off-by: wainuiwitikapark --- docs/teams.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/teams.yaml b/docs/teams.yaml index 95cdcc49d0..a30dcd0782 100644 --- a/docs/teams.yaml +++ b/docs/teams.yaml @@ -1384,7 +1384,7 @@ team: - version: 23.05 name: Wainui Witika-Park - version: 22.11 - name: Fridolin Somers + name: Frédéric Demians qa_manager: name: Martin Renvoize qa: From 7ea807117eef9b7cfd83036cfe9e66c21e5c6273 Mon Sep 17 00:00:00 2001 From: Marion Durand Date: Wed, 6 Oct 2021 14:49:58 +0200 Subject: [PATCH 10/20] Bug 25387: Warn when merging different authority types Merging two different authorities types can result in the loss of some field. This patch adds a warning when merging different type of authorities and add more display of authorities types during merge. To test: 1- Find two authorities you what to merge. Be sure that these authorities have different type 2- Search for these authorities (be sure to have both results on the results page) 3- For the first authority click on "Actions" then on "Merge", same for the second one 4- Check that koha is asking you to choose a framework and that authority types are not displayed 5- Choose a framework, then click on next 6- Check that the authority type is not displayed in the tabs and that no warning appear 7- Apply the patch 8- Repeat step 1 to 3 again 9- Check that authority type is now displayed next to their ID 10- Repeate setp 5 again 11- Check that the authority types is now displayed in the tabs next to their ID and that a warning appear Signed-off-by: David Nind Signed-off-by: Nick Clemens Signed-off-by: Katrin Fischer (cherry picked from commit b2ae5380b0741e1d2277a58f264df88f243ecadb) Signed-off-by: Lucas Gass (cherry picked from commit 8e7ea9baafcba3e02a4c13ba707b4f45abf5c695) Signed-off-by: Fridolin Somers Signed-off-by: wainuiwitikapark --- authorities/merge.pl | 13 +++++++++++++ .../intranet-tmpl/prog/en/includes/merge-record.inc | 3 ++- .../prog/en/modules/authorities/merge.tt | 6 +++++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/authorities/merge.pl b/authorities/merge.pl index 0799c26b04..37b03fbe7e 100755 --- a/authorities/merge.pl +++ b/authorities/merge.pl @@ -156,6 +156,11 @@ else { ($recordObj1, $recordObj2) = ($recordObj2, $recordObj1); } + # Getting frameworktext + my $frameworktext1 = Koha::Authority::Types->find( $recordObj1->authtypecode ); + my $frameworktext2 = Koha::Authority::Types->find( $recordObj2->authtypecode ); + my $frameworktextdestination = Koha::Authority::Types->find( $framework ); + # Creating a loop for display my @records = ( @@ -163,6 +168,7 @@ else { recordid => $mergereference, record => $recordObj1->record, frameworkcode => $recordObj1->authtypecode, + frameworktext => $frameworktext1->authtypetext, display => $recordObj1->createMergeHash($tagslib), reference => 1, }, @@ -170,6 +176,7 @@ else { recordid => $notreference, record => $recordObj2->record, frameworkcode => $recordObj2->authtypecode, + frameworktext => $frameworktext2->authtypetext, display => $recordObj2->createMergeHash($tagslib), }, ); @@ -180,6 +187,8 @@ else { recordid2 => $notreference, records => \@records, framework => $framework, + frameworktext => $frameworktextdestination->authtypetext, + multipleauthtypes => ( $recordObj1->authtypecode ne $recordObj2->authtypecode ) ? 1 : 0, ); } else { @@ -194,10 +203,14 @@ else { ); if ( $recordObj1->authtypecode ne $recordObj2->authtypecode ) { my $authority_types = Koha::Authority::Types->search( { authtypecode => { '!=' => '' } }, { order_by => ['authtypetext'] } ); + my $frameworktext1 = Koha::Authority::Types->find( $recordObj1->authtypecode ); + my $frameworktext2 = Koha::Authority::Types->find( $recordObj2->authtypecode ); $template->param( frameworkselect => $authority_types->unblessed, frameworkcode1 => $recordObj1->authtypecode, frameworkcode2 => $recordObj2->authtypecode, + frameworklabel1 => $frameworktext1->authtypetext, + frameworklabel2 => $frameworktext2->authtypetext, ); } } diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/merge-record.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/merge-record.inc index cdf3aefb54..d9a9db593d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/merge-record.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/merge-record.inc @@ -51,6 +51,7 @@ [% WRAPPER tab_item tabname= "tabrecord${record.recordid}" %] [% record.recordid | html %] [% IF record.reference %](ref)[% END %] + ([% record.frameworktext | html %]) [% END %] [% END %] [% END # /WRAPPER tabs_nav %] @@ -69,7 +70,7 @@ [% END %] [% BLOCK mergetarget %] -

Destination record

+

Destination record ([% authtypetext | html %])

    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/merge.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/merge.tt index d2fb80baff..3f13ad39f1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/merge.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/merge.tt @@ -102,7 +102,7 @@ div#result { margin-top: 1em; } [% PROCESS mergesource sourcerecords=records %]
    -[% PROCESS mergetarget %] +[% PROCESS mergetarget authtypetext=frameworktext %]
    @@ -111,6 +111,10 @@ div#result { margin-top: 1em; } +[% IF multipleauthtypes %] +
    Multiple authority types are used. There may be a data loss while merging.
    +[% END %] +
    From b084bd374cdb22c5e381c296dc9363a88b35ed17 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Tue, 25 Jun 2024 21:12:39 +0000 Subject: [PATCH 11/20] Bug 25387: (QA follow-up) Tidy Signed-off-by: Nick Clemens Signed-off-by: Katrin Fischer (cherry picked from commit 4c677600f2a3f8b019d54676dcd95faac1784532) Signed-off-by: Lucas Gass (cherry picked from commit 39449c76c46325391e20a169d595094554c8c4a8) Signed-off-by: Fridolin Somers Signed-off-by: wainuiwitikapark --- authorities/merge.pl | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/authorities/merge.pl b/authorities/merge.pl index 37b03fbe7e..607f2c2665 100755 --- a/authorities/merge.pl +++ b/authorities/merge.pl @@ -157,37 +157,37 @@ else { } # Getting frameworktext - my $frameworktext1 = Koha::Authority::Types->find( $recordObj1->authtypecode ); - my $frameworktext2 = Koha::Authority::Types->find( $recordObj2->authtypecode ); - my $frameworktextdestination = Koha::Authority::Types->find( $framework ); + my $frameworktext1 = Koha::Authority::Types->find( $recordObj1->authtypecode ); + my $frameworktext2 = Koha::Authority::Types->find( $recordObj2->authtypecode ); + my $frameworktextdestination = Koha::Authority::Types->find($framework); # Creating a loop for display my @records = ( { - recordid => $mergereference, - record => $recordObj1->record, + recordid => $mergereference, + record => $recordObj1->record, frameworkcode => $recordObj1->authtypecode, frameworktext => $frameworktext1->authtypetext, - display => $recordObj1->createMergeHash($tagslib), - reference => 1, + display => $recordObj1->createMergeHash($tagslib), + reference => 1, }, { - recordid => $notreference, - record => $recordObj2->record, + recordid => $notreference, + record => $recordObj2->record, frameworkcode => $recordObj2->authtypecode, frameworktext => $frameworktext2->authtypetext, - display => $recordObj2->createMergeHash($tagslib), + display => $recordObj2->createMergeHash($tagslib), }, ); # Parameters $template->param( - recordid1 => $mergereference, - recordid2 => $notreference, - records => \@records, - framework => $framework, - frameworktext => $frameworktextdestination->authtypetext, + recordid1 => $mergereference, + recordid2 => $notreference, + records => \@records, + framework => $framework, + frameworktext => $frameworktextdestination->authtypetext, multipleauthtypes => ( $recordObj1->authtypecode ne $recordObj2->authtypecode ) ? 1 : 0, ); } From a6242f8165d3b7d9b8eb677ed0aa05368ec0d8cc Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Thu, 27 Jun 2024 07:03:20 +0000 Subject: [PATCH 12/20] Bug 25387: (follow-up) Slightly change wording of alert Signed-off-by: Katrin Fischer (cherry picked from commit 1004d47d0093bd5a7547fb7d943837df895ae3eb) Signed-off-by: Lucas Gass (cherry picked from commit 3dc5bd07d50bb3ab892407888a4b6e28e8519df4) Signed-off-by: Fridolin Somers Signed-off-by: wainuiwitikapark --- koha-tmpl/intranet-tmpl/prog/en/modules/authorities/merge.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/merge.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/merge.tt index 3f13ad39f1..f9607b9f32 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/merge.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/merge.tt @@ -112,7 +112,7 @@ div#result { margin-top: 1em; } [% IF multipleauthtypes %] -
    Multiple authority types are used. There may be a data loss while merging.
    +
    Multiple authority types are used. There may be data loss when merging.
    [% END %]
    From 5ce0e962d742139110bf3c8b286ad07a70ec55d4 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 8 May 2024 13:22:58 +0000 Subject: [PATCH 13/20] Bug 34444: [22.11.x] Correct handling of sort1 and sort2 values Removed extraneous sort_1 data elements Update selectors to use field names for statistics field Updated code to set the value after finding the correct selector To test: * Make sure you have at least 2 funds with different stat settings, using AV and not * Create a basket with an order line * Close it and receive shipment * Create an invoice and receive the order line * Finish receiving * Click "Modify fund" * Switch fund, verify the stat fields are updated accordingly * Change values for statistical values * Update fund * Edit fund again, pull downs are correct * Change values in form and close, do not update * Click 'Modify fund' - confrim form is filled with the saved values Signed-off-by: wainuiwitikapark --- .../prog/en/modules/acqui/invoice.tt | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt index c2e359abdc..cbc2ce147d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt @@ -382,7 +382,7 @@ [% order.budget_name | html %]
    - Modify fund + Modify fund [% END # /FOREACH order %] @@ -615,16 +615,16 @@ $("#update_fund").data('order_id',$(this).data('order_id')); $("#modify_budget_id").html(disabledBudgetsCopy); $("#modify_budget_id").val(selected).find('option[value="'+selected+'"]').removeClass('b_inactive'); - $("#sort1").val(sort1); - $("#sort2").val(sort2); + $("#updateFund").find('[name="sort1"]').val(sort1); + $("#updateFund").find('[name="sort2"]').val(sort2); $("#modify_budget_id").find('.b_inactive').remove(); $("#modify_budget_id").change(); $("#updateFund").modal('show'); }); $("#update_fund").on('click',function(){ var new_fund = $("#modify_budget_id").val(); - var sort1 = $("#sort1").val(); - var sort2 = $("#sort2").val(); + var sort1 = $("#updateFund").find('[name="sort1"]').val(); + var sort2 = $("#updateFund").find('[name="sort2"]').val(); var new_fund_name = $('#modify_budget_id option[value="'+new_fund+'"]').text(); var order_id = $(this).data('order_id'); let options = { @@ -642,6 +642,8 @@ $("#updateFund").modal('hide'); $('#updateFund .showallfunds').prop('checked',false); $('.modify_fund[data-order_id="'+order_id+'"]').data('budget_id',new_fund); + $('.modify_fund[data-order_id="'+order_id+'"]').data('sort1',sort1); + $('.modify_fund[data-order_id="'+order_id+'"]').data('sort2',sort2); $('.order_name[data-order_id="'+order_id+'"]').text(new_fund_name); humanMsg.displayAlert( _("Order updated"), { className: 'humanError' } ); }) @@ -652,16 +654,16 @@ $("#modify_budget_id").change(function(){ var destination_sort1 = $(this).parents('.modal-body').find('input[name="sort1"]'); var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat'); - var sort1 = $(destination_sort1).val() || ""; if ( destination_sort1.length < 1 ) { destination_sort1 = $(this).parents('.modal-body').find('select[name="sort1"]'); } + var sort1 = $(destination_sort1).val() || ""; var destination_sort2 = $(this).parents('.modal-body').find('input[name="sort2"]'); var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat'); - var sort2 = $(destination_sort2).val() || ""; if ( destination_sort2.length < 1 ) { destination_sort2 = $(this).parents('.modal-body').find('select[name="sort2"]'); } + var sort2 = $(destination_sort2).val() || ""; getAuthValueDropbox( 'sort1', sort1_authcat, destination_sort1, sort1 ); getAuthValueDropbox( 'sort2', sort2_authcat, destination_sort2, sort2 ); }); From 21523840625acf2c0f6dd85630da9561f016cd82 Mon Sep 17 00:00:00 2001 From: Phil Ringnalda Date: Thu, 16 May 2024 17:01:54 -0700 Subject: [PATCH 14/20] Bug 36891: Restore returning 404 from svc/bib when the bib number doesn't exist Changing from GetMarcBiblio to Biblios->find plus metadata->record lost the way that svc/bib used to return 404 when the bib number wasn't found. This patch restores that by checking for undef after the Biblios->find step. Test plan: 1. Load e.g. http://127.0.0.1:8081/cgi-bin/koha/svc/bib/289 which returns an XML bib record 2. Load http://127.0.0.1:8081/cgi-bin/koha/svc/bib/99999999 and get a 500 error 2. Appply patch, restart_all 4. Reload http://127.0.0.1:8081/cgi-bin/koha/svc/bib/289 and get the bib again 5. Reload http://127.0.0.1:8081/cgi-bin/koha/svc/bib/99999999 and get a 404 Signed-off-by: David Nind Signed-off-by: Nick Clemens Signed-off-by: wainuiwitikapark --- svc/bib | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/svc/bib b/svc/bib index 53e6fc753e..da96e01f9a 100755 --- a/svc/bib +++ b/svc/bib @@ -70,14 +70,14 @@ sub fetch_bib { my $record; my $exception; my $invalid_metadata = 0; - eval { $record = $biblio->metadata->record( { embed_items => scalar $query->param('items') } ) }; - if ($@) { - $exception = $@; - $exception->rethrow unless ( $exception->isa('Koha::Exceptions::Metadata::Invalid') ); - $record = $biblio->metadata->record_strip_nonxml( { embed_items => scalar $query->param('items') } ); - $invalid_metadata = 1; - } - if ( defined $record ) { + if ( defined $biblio ) { + eval { $record = $biblio->metadata->record( { embed_items => scalar $query->param('items') } ) }; + if ($@) { + $exception = $@; + $exception->rethrow unless ( $exception->isa('Koha::Exceptions::Metadata::Invalid') ); + $record = $biblio->metadata->record_strip_nonxml( { embed_items => scalar $query->param('items') } ); + $invalid_metadata = 1; + } print $query->header( -type => 'text/xml', -charset => 'utf-8', -invalid_metadata => $invalid_metadata ); print $record->as_xml_record(); } else { From 87a5eb7f17abf5b9c413f27303cba9ed92b0187e Mon Sep 17 00:00:00 2001 From: Eric Garcia Date: Tue, 25 Jun 2024 17:18:13 +0000 Subject: [PATCH 15/20] Bug 35240: Add missing IDs to input 1. Tools -> Rotating collections -> Edit collection 2. Use browser dev tools to notice that the inputs don't have matching IDs 3. Apply patch 4. Do step 2 again and notice IDs are no longer missing. 5. Sign off :) Signed-off-by: Owen Leonard Signed-off-by: Nick Clemens Signed-off-by: Katrin Fischer (cherry picked from commit 21a66bf17c867734271e57c9f06b0b3e619d9ff0) Signed-off-by: Lucas Gass (cherry picked from commit 27cbe1d0cf85a79ac57505452189d025f5841437) Signed-off-by: Fridolin Somers Signed-off-by: wainuiwitikapark --- .../en/modules/rotating_collections/editCollections.tt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/editCollections.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/editCollections.tt index 001558e1f6..e745fb1a4c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/editCollections.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/editCollections.tt @@ -128,19 +128,19 @@
  • [% IF ( editColTitle ) %] - + Required [% ELSE %] - + Required [% END %]
  • [% IF (editColDescription ) %] - + [% ELSE %] - + [% END %]
  • From 021191bfb65bfc174f0385891d0e6ebab0106ca3 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 26 Jun 2024 15:24:01 +0100 Subject: [PATCH 16/20] Bug 37198: Improve GetPreparedLetter documentation Signed-off-by: Katrin Fischer (cherry picked from commit 149412cb62a074ccdef1e1c2bbbd2bee35c48498) Signed-off-by: Lucas Gass (cherry picked from commit 84814bbef33ac9c04b12cb3f063b2a11cfd0b2ce) Signed-off-by: Fridolin Somers Signed-off-by: wainuiwitikapark --- C4/Letters.pm | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/C4/Letters.pm b/C4/Letters.pm index ecfadfbb32..c46ff0769a 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -541,24 +541,30 @@ sub SendAlerts { =head2 GetPreparedLetter( %params ) - %params hash: - module => letter module, mandatory - letter_code => letter code, mandatory - branchcode => for letter selection, if missing default system letter taken - tables => a hashref with table names as keys. Values are either: - - a scalar - primary key value - - an arrayref - primary key values - - a hashref - full record - substitute => custom substitution key/value pairs - repeat => records to be substituted on consecutive lines: - - an arrayref - tries to guess what needs substituting by - taking remaining << >> tokensr; not recommended - - a hashref token => @tables - replaces << >> << >> - subtemplate for each @tables row; table is a hashref as above - want_librarian => boolean, if set to true triggers librarian details - substitution from the userenv - Return value: - letter fields hashref (title & content useful) + my $letter = GetPreparedLetter( + { + module => "letter module", # mandatory + letter_code => "letter code", # mandatory + branchcode => "for letter selection", # if missing default system letter taken + objects => {}, # a hashref with object names as keys and objects as values + tables => {}, # a hashref with table names as keys. Values are either: + # - a scalar - primary key value + # - an arrayref - primary key values + # - a hashref - full record + substitute => {}, # custom substitution key/value pairs + repeat => '', # records to be substituted on consecutive lines, accepts either: + # - an arrayref + # tries to guess what needs substituting by taking remaining + # << >> tokensr; not recommended + # - a hashref token => @tables + # replaces << >> << >> subtemplate for each + # @tables row; table is a hashref as above + want_librarian => '' # boolean, if set to true triggers librarian details substitution + # from the userenv + } + ); + +Return value: letter fields hashref (title & content useful) =cut From b70ac8205a89154565302d76e308b440c060f328 Mon Sep 17 00:00:00 2001 From: Sam Lau Date: Thu, 6 Jun 2024 14:29:54 +0000 Subject: [PATCH 17/20] Bug 37044: Added library branch to SCO OPAC message This patch simply adds the correct branch at the end of an OPAC message on the SCO page. To Test: 1) From the staff interface, click on a patron and add an OPAC message to their account. 2) Log into the SCO with this patron. (http://localhost:8080/cgi-bin/koha/sco/sco-main.pl) 3) Notice how in the "Messages for you" at the top, you will see the message, however, at the timestamp, it says something like "Written on 06/06/2024 by " w/o listing the library that sent it. 4) Apply patch 5) Log back into SCO module 6) Note that now in the message timestamp, it correctly lists the library that sent the message. 7) Sign-off Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer (cherry picked from commit 4801037abe0f8d294eb03503c2b5a275ed06f62a) Signed-off-by: Lucas Gass (cherry picked from commit da490f117af20f4307d2c62e01bc1db7bc0b7695) Signed-off-by: Fridolin Somers Signed-off-by: wainuiwitikapark --- koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt | 1 + 1 file changed, 1 insertion(+) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt index 7fbdd6763c..8651af7d92 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt @@ -5,6 +5,7 @@ [% USE AudioAlerts %] [% USE To %] [% USE Price %] +[% USE Branches %] [% INCLUDE 'doc-head-open.inc' %] Self checkout › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha [% END %] From 4f8e947b683a5aabf3d88cc42ac462b428f6f25d Mon Sep 17 00:00:00 2001 From: Baptiste Wojtkowski Date: Tue, 9 Jul 2024 16:08:39 +0200 Subject: [PATCH 18/20] Bug 37285: Printing lists only prints the ten first results GIVEN koha in a version later than 22.11, a list with more than ten entries WHEN the user tries to print the list THEN only the ten first results are printed EXPECTED THEN all results are printed It looks like it is an undesired effect of BZ36858. Page remains set even while printing, therefore, however the number of rows is not set, default value (10) is used. TEST PLAN 1 - create a list with more than 10 items 2 - print the list -> there is a pagination and that only 10 items are printed Apply patch 3 - print the list again -> every items are being printed Signed-off-by: Owen Leonard Signed-off-by: Martin Renvoize (cherry picked from commit 64027daadcea8c44cb73aae71a48ac64d527ed3f) Signed-off-by: Lucas Gass (cherry picked from commit 0f8f20a01fede0991500bff529d540959fea6251) Signed-off-by: Fridolin Somers Signed-off-by: wainuiwitikapark --- virtualshelves/shelves.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/virtualshelves/shelves.pl b/virtualshelves/shelves.pl index 52cc6d6c9a..4fdc6f0c0b 100755 --- a/virtualshelves/shelves.pl +++ b/virtualshelves/shelves.pl @@ -273,7 +273,9 @@ if ( $op eq 'view' ) { my $direction = $query->param('direction') || 'asc'; $direction = 'asc' if $direction ne 'asc' and $direction ne 'desc'; my $rows; - unless ( $query->param('print') ) { + if ( $query->param('print') ) { + $page=""; + } else { $rows = C4::Context->preference('numSearchResults') || 20; } From 0daebadf0412edbf9c60f957f61b84b522aa49f6 Mon Sep 17 00:00:00 2001 From: Laura_Escamilla Date: Thu, 25 Jul 2024 15:22:00 +0000 Subject: [PATCH 19/20] Bug 37285: (QA follow-up) Perl Tidy Signed-off-by: Martin Renvoize (cherry picked from commit e7a017e663bd0376c626a692a85cda4dc7e68324) Signed-off-by: Lucas Gass (cherry picked from commit 1374290f7a75ecf32d192c8bd5fe82e6286de016) Signed-off-by: Fridolin Somers Signed-off-by: wainuiwitikapark --- virtualshelves/shelves.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virtualshelves/shelves.pl b/virtualshelves/shelves.pl index 4fdc6f0c0b..ce7b628a1c 100755 --- a/virtualshelves/shelves.pl +++ b/virtualshelves/shelves.pl @@ -274,7 +274,7 @@ if ( $op eq 'view' ) { $direction = 'asc' if $direction ne 'asc' and $direction ne 'desc'; my $rows; if ( $query->param('print') ) { - $page=""; + $page = ""; } else { $rows = C4::Context->preference('numSearchResults') || 20; } From 85ae71cfd4226a5af93f5650aae6ced34f1b8136 Mon Sep 17 00:00:00 2001 From: Andreas Jonsson Date: Thu, 16 May 2024 09:38:09 +0200 Subject: [PATCH 20/20] Bug 36879: Spurious warning in QueryBuilder Test plan: With ElasticSearch enabled, * Perform a search using the default sort order (i.e. 'relevance'). * Verify that no warnings are generated in plack-intranet-error.log Signed-off-by: David Nind Signed-off-by: Marcel de Rooy Signed-off-by: wainuiwitikapark --- Koha/SearchEngine/Elasticsearch/QueryBuilder.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm index 35ab4b7f91..0ab397b523 100644 --- a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm +++ b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm @@ -730,10 +730,11 @@ sub _convert_sort_fields { # Convert the fields and orders, drop anything we don't know about. grep { $_->{field} } map { my ( $f, $d ) = /(.+)_(.+)/; + defined $f && defined $d ? { field => $sort_field_convert{$f}, direction => $sort_order_convert{$d} - } + } : { field => undef }; } @sort_by; }