Commit Graph

45112 Commits

Author SHA1 Message Date
David Cook 6bc5310c44
Bug 33375: Quote reserved keyword 'rank' in advanced editor
This change quotes the 'rank' keyword in the advanced editor,
so that it doesn't cause fatal crashes when using MySQL 8

Test plan:
0. Apply patch and koha-plack --restart kohadev
1. Enable advanced editor
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=EnableAdvancedCatalogingEditor
2. Go to http://localhost:8081/cgi-bin/koha/cataloguing/editor.pl#new/
3. Click on "Advanced" on the left nav
4. Note that "LIBRARY OF CONGRESS" is ordered before "NATIONAL LIBRARY OF FRANCE"
5. Rejoice!

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 99f8273673)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 30260ece2f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d7b5cbf075)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-05-23 20:43:31 +02:00
Fridolin Somers 01ce75498b
Bug 33088: Remove background-job-progressbar.js in batch_record_modification.tt
It must be removed, we don't need it since bug 22417

Test plan :
Play with batch record modification and check there is no JS error

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 668252503d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 397354e4bb)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4eef647480)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-05-23 20:43:31 +02:00
Galen Charlton 617eab9d39
Bug 32716: larger proxy_buffer_size in NGINX example config
This patch updates the example NGINX config to increase the
proxy_buffer_size to 16k. The default value of 4k (on some platforms)
has empirically been shown to be a bit too small for the Link
headers emitted by the REST API when pagination is requested.

To test
-------
[1] Set up a Koha system with NGINX as a reverse proxy in
    front of it (either in front of Apache or in front of
    of Starman).
[2] Perform a patron search that returns at least two pages
    of results and navigate to the second page.
[3] Note that the navigation can fail with a 502 HTTP error
    and an "upstream sent too big header while reading response
    header from upstream" error in the NGINX log.

    The problem is most likely when the pagesize of the server
    running NGINX is 4096 bytes.
[4] Update the NGINX configuration per this patch and restart
    NGINX.
[5] This time, repeating step 2 should work.

Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a29964778a)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 18c75b9bf9)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0783245882)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-05-23 20:43:31 +02:00
Owen Leonard abd52f343d
Bug 33077: Improve ease of translating template title tags
This patch uses the cities administration page as a proof-of-concept for
using the [% t() %] construction to wrap translatable string in template
<title> tags. This should result in a significant improvement in
translatability.

To test, apply the patch and run the translation script to update the
.po files, e.g.

perl misc/translator/translate update fr-FR

Check the updated .po files:

 - In fr-FR-staff-prog.po you should no longer see a reference to
   cities.tt line 6, "#: koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt:6"
 - In fr-FR-messages.po you should see several strings which have been
   pulled individually from the <title> tag:
   - cities.tt:9, msgid "Modify city"
   - cities.tt:11, msgid "New city"
   - cities.tt:15, msgid "Confirm deletion of city"
   - cities.tt:19, msgid "Administration", msgid "Cities", msgid "Koha",
     and msgid "Administration"

Translate the strings in fr-FR-messages.po and install the updated
translation:

perl misc/translator/translate install fr-FR

Swith to the update language in the staff interface and confirm that the
Cities page title is translated correctly.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7020b90f30)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 66b7de2ec2)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f9d5bcfbfe)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-05-23 20:43:30 +02:00
Jonathan Druart 44f9c4c0cf
Bug 33367: Remove tmp/modified_authorities/README.txt
This does not seem to be useful anymore.

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit c3a40d3801)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit bc2c8b16f8)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d2f1205355)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-05-23 20:43:30 +02:00
Nick Clemens 3985fc7014
Bug 32301: Fix default search sorting in advanced search when not editing a search
Bug 22605 changed the sorting to expect the passed parameter from the
previous search, this broke default when the search page was loaded
fresh.

We should simply fallback from the edited search to the default if it is
not set

To test:
1) Go to staff client
2) Go to Advanced Search
3) Notice the default Sort By value is "Relevance"
4) Go to system preferences
5) Go to "defaultSortField"
6) Change the value of the system preference
7) Go back to Advanced Search and refresh the page
8) Notice that there are no changes, the default Sort By is still
"Relevance"
9) Apply patch
10) Notice that changing the system preference now changes the default
Sort By in Advanced Search
11) Perform a search, change the sorting, then edit the search
12) Confirm the correct sorting from the search is preserved

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 3489cdca1f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 38d615959c)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9383c5242d)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-05-23 20:43:30 +02:00
Katrin Fischer 03fa06bdcb
Bug 29311: (follow-up) Fix t/db_dependent/selenium/regressions.t
The test was checking for the value of an input field.
But with this patch set, there is no longer an input, but
a link element with the title. This adjusts the patch to look
for the correct element.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 307df8f1af)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit babebab0cb)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6a5b7e974c)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-05-23 20:43:30 +02:00
Katrin Fischer 409a724bd4
Bug 29311: (follow-up) Add id to span elements
The input fields in the form have ids, these are useful
for styling, but also for the Selenium tests. This patch
adds the ids from the former inputs to the now spans.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 2fc06098d2)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit f88186b345)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d453bb9c5d)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-05-23 20:43:30 +02:00
Nick Clemens aedb249075
Bug 29311: (QA follow-up) Fix filter
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 69a1c4a53a)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit 1362b0335d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 360e48a95a)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-05-23 20:43:30 +02:00
Nick Clemens 14cf6efd36
Bug 29311: (QA follow-up) Fix an existing spelling typo
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9b231d0d5b)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit 52056bf4ea)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f5964148d3)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-05-23 20:43:30 +02:00
jeremy breuillard 2b0eb34e8a
Bug 29311: Forbid editing biblio info when creating suggestion for biblio
When creating a suggestion for an existing biblio, biblio info like
title or author should not be editable.

Test plan:
1. Enable system preference 'suggestion'
2. Log in at OPAC
3. Go to a biblio record detail page
4. Click 'suggest for purchase'
5. Notice that all fields can be modified (title, author, ...)
6. Apply patch
7. Repeat steps 2 and 3 or refresh the page
8. Verify that the biblio fields cannot be modified now. The only fields
   that should be editable are: quantity, item type, library, reason for
   suggestion, and notes

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit d96393a52a)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit ca33ff04d6)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b7e86347e6)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-05-23 20:43:30 +02:00
Kyle Hall 5231d0dda4
Bug 33040: Add "Date published (text)" to serials tab on record view (detail.pl)
Some libraries would like to see the "Date published (text)" in the serials tab on the "Normal" record view ( aka catalogue/detail.pl ).

Test Plan:
1) View the serials tab on detail.pl for a subscription where the latest
   serial has a "Date published (text)" field populated.
2) Apply this patch
3) Restart all the thigns!
4) Browse to detail.pl for that record
5) View the Subscriptions tab
6) Note the "Date published (text)" column exists now!

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b3b33960da)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit e640ddc20e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit da2c777737)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-05-23 20:43:30 +02:00
Philip Orr 8a15fb8dbb
Bug 27513: Add notes to variables for report parameters template
This patch adds the TT variable 'notes' to the variables
that guided_reports.pl passes to the template guided_reports_start.tt
during SQL parameters entry in the phase 'Run this report'.

To test:
1. apply the patch
2. navigate to Reports -> Guided Reports -> Create from SQL
3. create an SQL report that includes at least one parameter, e.g.:
   SELECT barcode FROM items WHERE homebranch=<<Select library|branches>>
   the actual SQL and name of the report doesn't matter much, just make
   sure that you also put a note e.g. "Test text for display" in the
   field "Notes:" before you save the report.
4. run the report
5. the note you entered should now be displayed below the heading
   "Enter parameters for report..."

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fa534d464c)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit 5de9cb41df)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit fab0b24d24)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-05-23 20:43:30 +02:00
Mason James 50aaed773b Update debian/control file: 21.11.16 on deb9 (09f26f0d)
https://bugs.koha-community.org/show_bug.cgi?id=32668
2023-05-23 09:05:19 +00:00
Mason James eb937cd43c Update debian/changelog file: 21.11.16
https://bugs.koha-community.org/show_bug.cgi?id=32668
2023-05-23 09:05:19 +00:00
Arthur Suzuki fa0dc07b26
Update release notes for 21.11.20 release
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-05-11 15:06:39 +02:00
Arthur Suzuki d16f3a74d5
Increment version for Koha 21.11.20 release
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-05-11 15:00:49 +02:00
Arthur Suzuki 70317e2f90
Fix translations for Koha 21.11.20
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-05-11 14:57:30 +02:00
Koha translators 3f7716a9ba Translation updates for Koha 21.11.20 2023-05-04 03:36:27 -03:00
Fridolin Somers 0101bbd4cc Bug 33285: (QA follow-up) add POD and fix some code style
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 6221538b6d)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit 4a1c87fe36)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit be2a56a4b7)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-05-03 21:14:49 +02:00
Nick Clemens d209b1a788 Bug 33285: Allow specifying the delimeter for runreport.pl
To test:
1 - Write a report in koha
2 - perl misc/cronjobs/runreport.pl --format csv 1 (or correct report number)
3 - Note you get commas
4 - Apply patch
5 - Repeat #2 - no change
6 - perl misc/cronjobs/runreport.pl --format csv --separator "|" 1
7 - Now it is pipe delimited
8 - perl misc/cronjobs/runreport.pl --format tsv --separator "|" 1
9 - Error is reported, you cannot set separator unless csv
10 - Try other separators

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bad0d52245)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit 94077abab8)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit dc7fb83485)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-05-03 21:14:49 +02:00
Fridolin Somers a00019c180 Bug 32279: Add GetAuthorizedHeading method export C4::AuthoritiesMarc
C4::AuthoritiesMarc method GetAuthorizedHeading is not exported thus it is called in other modules :
 > git grep GetAuthorizedHeading
C4/AuthoritiesMarc.pm:=head2 GetAuthorizedHeading
C4/AuthoritiesMarc.pm:  $heading = &GetAuthorizedHeading({ record => $record, authid => $authid })
C4/AuthoritiesMarc.pm:sub GetAuthorizedHeading {
C4/Breeding.pm:                            $heading = C4::AuthoritiesMarc::GetAuthorizedHeading({ record => $marcrecord });
C4/ImportBatch.pm:            $row->{'authorized_heading'} = C4::AuthoritiesMarc::GetAuthorizedHeading( { authid => $row->{'candidate_match_id'} } );
C4/ImportBatch.pm:    my $authorized_heading = C4::AuthoritiesMarc::GetAuthorizedHeading({ record => $marc_record });

This patch adds it to be exported.
For example for use in Koha plugins.

Test plan :
Check import of authorities from a file is OK

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2d0eca8a0d)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit 6833e1b3f7)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6a67b16baa)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-05-03 21:14:00 +02:00
Fridolin Somers 4b895359da Bug 32280: Export method ImportBreedingAuth from C4::Breeding
In C4::Breeding method ImportBreedingAuth() should be exported to be used for example by plugins.

No test plan needed i bet.

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Looks like a harmless and useful enhancement.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 97a100d19d)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit e28fd04eff)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 63bb8229e1)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-05-03 21:12:04 +02:00
Nick Clemens c7cf11deb3 Bug 31259: Escape infinite loop when lime cannot wrap enough
It seems the wrapping here works with words, not characters. If a line is too long,
or too far over, we can't trim it enough. We need to escape if successive loops are
not changing the line

To test:
 1 - Using sample data, edit the layout to match picture in comment 9
 2 - Add some borrowers to a batch
 3 - Attempt to export batch and save PDF
 4 - Staff client waits
 5 - ps aux | grep card
 6 - Note the job keeps running
 7 - Kill it
 8 - Apply patch
 9 - Restart_all
10 - Export batch again
11 - Success, you get a badly formatted PDF, rather than nothing
12 - Note the PDF does not show "Yakama Nation Library"
13 - Edit layout, male "Lower left X" 20 instead of 220
14 - Export again and note text field 1 shows correctly

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a18f65cdcc)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit f1010ee062)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit dda7ff90bd)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-05-03 21:09:45 +02:00
Nick Clemens c4ccac2bc3 Bug 13976: Sort popularity numerically in Zebra
To test:
1 - Create a new template at Tools->Marc modification template
2 - Add action: Copy 999$c to 942$0
3 - Create a report:
    SELECT biblionuber FROM biblios
4 - Run report, show all, do a batch modification to all records using template above
5 - Search for 'a' (make sure you are using Zebra)
6 - Sort by popularity
7 - Note records are sorted wrong
8 - Apply patch
9 - Restart all
10 - Reload search results
11 - Success! Sorted correctly

Signed-off-by: Anke <anke.bruns@gwdg.de>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 45cea7c7ba)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit feea08b03c)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9fb9e29c1e)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-05-03 21:08:50 +02:00
Pedro Amorim 0b18e0b07e Bug 28641: ILLHiddenRequestStatuses does not consider custom statuses
This patch adds the status_alias column to the ILLHiddenRequestStatuses sys pref check.
Because requests will have status_alias NULL by default, we also check for that.

Test plan:
Create multiple ILL requests of different backends and place them in different status (NEW, COMP, REQ, etc)
Create multiple ILLSTATUS entries
Add and remove a mix of both status and status_alias codes in ILLHiddenRequestStatuses and refresh the ILL requests page to confirm the result is according to expectation.

Sponsored-by: PTFS Europe

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit aaa5bcd16b)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit feea30d42b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3735277be4)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-05-03 21:07:24 +02:00
Mason James feab77882c Bug 33168: (follow-up) Swap spaces for tabs
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f74a353097)
Signed-off-by: Jacob O'Mara <jacobomara901@gmail.com>
(cherry picked from commit cff59f18d5)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit deb2371d4b)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-05-03 21:05:32 +02:00
David Cook fe7b53fede Bug 33168: Prevent debhelper from renaming history.txt to changelog
This change prevents debhelper from renaming history.txt to changelog,
since that renaming was breaking the Timeline feature in Koha.

Another option would've been to rename history.txt to something else
but that filename is already embedded in Koha and the Koha release
tools, so this seems the safer option.

Test plan:
0. Apply patch
1. Build Debian package
2. Confirm that /usr/share/doc/koha-common/history.txt is created
and /usr/share/doc/koha-common/changelog.gz is not created

Signed-off-by: Mason James <mtj@kohaaloha.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b6f9241d66)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 3b6aac190c)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 09d1416ad3)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-05-03 21:05:32 +02:00
Tomas Cohen Arazi 92ad549936 Bug 33341: Address some perlcritic errors in 5.36
Some old-style code is making our tests fail when run in Debian Testing.

This patch addresses this.

To test:
1. Launch bookworm KTD:
   $ KOHA_IMAGE=master-bookworm ktd up -d
2. Run:
   $ ktd --shell
  k$ prove t/00-testcritic.t
=> FAIL: It fails!
3. Apply the patch
4. Repeat 2
=> SUCCESS: Tests now pass!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 10d12f999f)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit c1c5420afa)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 548a3325ba)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-05-03 21:03:35 +02:00
Nick Clemens 5402be60e2 Bug 33198: Don't calculate pickup locations per bib unless placing multiple holds
For single bibs we use an ajax select2 dropdown, and we don't use this
value

To test:
1 - Place some holds on single bibs
2 - Confirm dropdowns for pickup location work as expected
3 - Do the same for multiple bibs selected from search results
4 - Apply patch
5 - Confirm there is no change after the patch

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 63772a9cb2)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit dd7b6e528a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d98074a747)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-05-03 20:39:47 +02:00
Johanna Raisa b3b187b576 Bug 30966: Record Overlay Rules - can't use Z39.50 filter
This patch fixes overlay rules on z39.50 import

Test plan:
1) Create protection overlay rule to some fields for z39.50.
2) Import a record via z39.50.
3) See that the protected fields are replaced on the editor.
4) Apply the patch.
5) Import a record again.
6) See that the protected fields are in place on the editor.

Sponsored-by: Koha-Suomi Oy

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0970eef56d)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 207349be3a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 487a6e9f80)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-05-03 20:39:09 +02:00
Nick Clemens 4a2ef7f1b3 Bug 33309: Index items after renewal transaction completes
This patch ensures a record is indexed only after the renewal transaction
has completed successfully. Otherwise the job cannot be found by the background process
worker, becaue it was not yet in the DB

To test:
1 - Make sure you are using ES, and the es indexer is running
2 - tail -f /var/log/koha/kohadev/*.log
3 - Issue an item to a patron and renew it
4 - Note error in es-indexer-output.log like:
    [2023/03/21 12:22:36] [WARN] No job found for id=157 main:: /kohadevbox/koha/misc/workers/es_indexer_daemon.pl (129)
5 - Apply patch
6 - Renew again
7  There should be no error
8 - Search for the record and confirm items info displays correctly
9 - View the background jobs in admin, confirm the most recent job has completed

Signed-off-by: Janusz Kaczmarek <januszop@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a63b0d0030)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit ff03813f9f)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0081194b40)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-05-03 20:37:34 +02:00
Lucas Gass bff83318fb Bug 33137: Add Home library to pay-fines-table and table settings
To test:
1. Apply patch and restart_All
2. From a patron's Accounting tab add some invoices that are related to an item.
3. From the 'Make a payemnt' notice the new Home library column. Make sure it displays correctly and is the same as what you see on the 'Transactions' tab.
4. Using Table settings, make sure you can properly hide the column.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit eae0a7e065)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 656a179adb)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3ec34be53a)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-05-03 20:36:31 +02:00
Owen Leonard 0e7d872620 Bug 33151: Improve translation of string in cities.tt and desks.tt
This patch adds a <span> tag around a string in both cities.tt and
desks.tt in order to improve translatability.

To test apply the patch and run the translation script to update the .po
files, e.g.

perl misc/translator/translate update fr-FR

Check the updated .po files:
 - Before the patch you would have found 'msgid "%s Searching: %s %s %s'
 - After the patch you should find 'msgid "Searching: %s'

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2894003792)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit fdc10bcbf8)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e2121f5b5e)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-05-03 20:35:16 +02:00
Tomas Cohen Arazi f5570ef483 Bug 33100: (QA follow-up) Trivial QA fixes
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 057e6c2bc8)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 656969e79a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 92a17f03a4)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-05-03 20:32:35 +02:00
Nick Clemens 2e17e39c0f Bug 33100: Remove all punctuation at end of record
This could potentially be overkill - if you have two records that only
differ in ending punctuation, you might get a false result - I don't
know how likely that is ( as I have mentioned before '!!!' is a band )

This seems a reasonable fix

To test:
1 - Set sysprefs as in bug 33159
2 - Edit a record, biblionumebr 3 is fine
3 - Add a comma to end of author subfield a
4 - Save and note relinked
5 - Apply patch, restart all
6 - Save again
7 - Linked to original record

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 928a4cb465)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit c2f2c68a07)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 37f4355e43)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-05-03 20:32:35 +02:00
Nick Clemens 2ebb59e42f Bug 33100: Unit test
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7490453663)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 39d6ee4399)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8d08cd6122)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-05-03 20:32:35 +02:00
Kyle Hall 9425cc79ec
Bug 33183: Error inserting matchpoint_components when creating record matching rules with MariaDB 10.6
The word "offset" is now a keyword. At the very least we need to escape the fieldname with backticks.
It would be nice to switch to Koha::Objects for this module eventually.

C4::Matcher::_store_matchpoint(): DBI Exception: DBD::mysql::st execute failed: You have an error in
your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax
to use near 'offset, length) VALUES ('27', '1', '999'...' at line 2 at /usr/share/koha/lib/C4/Matcher.pm
line 314

Test Plan:
1) Set up Koha with MariaDB 10.6
2) Attempt to create a matching rule
3) Note the error screen
4) Apply this patch
5) Restart all the things!
6) Attempt to create another matching rule
7) No errors this time

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 4628d2e81c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit ece005da13)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 021a11f111)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-04-20 11:18:22 +02:00
Andreas Jonsson 23d1e5d008
Bug 33150: Add specific message for informing about too_soon for renewal.
The message "No renewals allowed" is incorrect when it is too soon for renewal,
this patch adds a specific error message.

To test:
- Make sure the system preference  SCOAllowCheckin is set to "allow"
- Go to Koha administration -> Circulation and fine rules
- Edit the rule for all items and change "No renewal before" to 1 and save.
- Check out an item to a borrower (for instance barcode 39999000000719 to the user koha with cardnumber 42).
- Go to self checkout (http://localhost:8080/cgi-bin/koha/sco/sco-main.pl)
- Log in as the user (koha/koha)
- Verify that the error message in the Renew column is "This item cannot yet be renewed."

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7f3a35a917)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit a0fc430b48)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6da1fc8cc2)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-04-20 11:17:09 +02:00
Phil Ringnalda 3918909d64
Bug 33144: Unescape text from authority lookup for advanced editor
While the basic editor is happy with an array of subfields it can
stuff into separate fields, the advanced editor needs to get a JS
string back from the authority lookup plugin, because it is going
to just add the whole thing as text. The string has to be HTML
entity encoded, both to not allow XSS and just to not break the
window, but it needs to then be unencoded before being inserted
into the editor.

Test plan:
1. Set the system preference EnableAdvancedCatalogingEditor to
   Enable
2. Edit any Topical Term authority, and at the end of tag 150
   subfield a, add & </script>
3. Cataloging - Advanced editor
4. Press return in the editor to get a new blank line, type 650
   and press tab three times, then type Ctrl-Shift-L
5. Search for your modified authority, and click Choose
6. Verify that the tiny popup opened by the search window finished
   its job and closed itself
7. Verify that your 650 now shows as "‡aAbduction &
   </script>‡vDrama" rather than "‡aAbduction  &amp;
   &lt;/script&gt;‡vDrama."

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit e171d5fdd3)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
(cherry picked from commit 2f1d407d4e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 738d97e59d)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-04-20 11:15:45 +02:00
Nick Clemens c0435b9056
Bug 33211: Fix failing test
This patch updates the selector to use the full class and find the text
type as well

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 587615fd9f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 730f4e1500)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f702d225e3)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-04-20 11:11:48 +02:00
Fridolin Somers 6d57ca1ea8
Bug 32519: In Elasticsearch mappings table use of search field name and label
In Elasticsearch mappings table, in tabs for mappings we should add search field name in addition to label ; in order to find them when searching using DataTable search field. This is very useful when debugging.

Also the lines are sorting alphabetically by search field name.
So I propose to display name and label between parenthesis.
And also add label to the form in last line.

By default label equals name so I display label only if different from name.

Test plan :
1) Go to : Administration > Search engine configuration (Elasticsearch)
2) In first tabe edit a line to change label, for example : author => Auteur
3) Save
4) Go to second tab
5) Check you see a line with 'author (Auteur)' and lines with only name when label equals name
6) Look at last line (addition form)
7) Check you see in combobox : 'author (Auteur)' and lines with only name when label equals name

Signed-off-by: Solene Ngamga <solene.ngamga@inLibro.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 14a2cc60a4)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit c654d8b51e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 27e430325e)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-04-20 10:59:12 +02:00
Katrin Fischer 65a19e8e8d
Bug 33063: Make sure correct subgroup is pre-selected when duplicating reports
When the 'Duplicate' option for reports was used, the all options
would be copied correctly to the new report, but the report sub group.

In this case the templates were created correctly, but the JavaScript
to create the correct pull downs for each group, overwrote the
the selection.

To test:
* Create a some reports with different groups and subgroups and without
* 'Duplicate' your reports and verify that the sub group will always stay empty
* Apply patch
* Verify the correct sub group is now always selected
* Edit/Add some reports to make sure the group/subgroup controls still
  work as expected

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a651ff50a6)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 36df529064)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b54b0fddcd)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-04-20 10:50:06 +02:00
Christophe TORIN 9a1f544ca3
Bug 29607: Store the discount amount correctly when importing and order from a file
This bug fixes how the discount amount for an order is stored, when an order is added to a basket using "From staged MARC records".

Test plan:
1. Export a record (without the items) (Tools > Catalog > Export data).
2. Delete the record from the catalog (including any items).
3. Stage the record for import (Tools > Catalog > Stage MARC records for import).
4. Create a new vendor with a discount of 25%. (Or select and existing vendor that has a discount). (Acquisitions > New vendor)
5. Create a new basket for the vendor. (Acquisitions > Manage orders > search for vendors > New > Basket).
6. Add to the basket using "From a staged file":
   . select "Add orders" next to the staged file
   . select the record to add to the order
   . enter a price
   . leave the discount field blank
   . select a fund
   . select "Save"
   ==> The order is created!
7. Modify the order - note that the discount is showing on the form as .25% instead of 25%, also note that the discount amount is calculated correctly.
8. Check what is recorded in the database:
   . koha-mysql kohadev
   . select * from aqorders;
   ==> discount field for the basket item shows as 0.2500
9. Change the discount to 25%. Run step 8 again - discount amount will be correctly shown as 25.0000
10. Apply the patch.
11. Repeat steps 1-9 - discount amount is shown and calculated correctly.
12. Test modifying the discount amount - should be calculated and shown correctly.
13. Sign off!

See additional comments in the bug description.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f72b8cbd3e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a5f31c6e2e)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-04-05 12:06:03 +02:00
Arthur Suzuki cc447be32d
Update release notes for 21.11.19 release
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-04-03 13:53:06 +02:00
Arthur Suzuki 2308522200
Increment version for 21.11.19 release
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-04-03 12:21:36 +02:00
Arthur Suzuki 968a026972
Fix translation errors for 21.11.19
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-04-03 11:56:43 +02:00
Koha translators 1ec3563cad Translation updates for Koha 21.11.19 2023-03-30 06:13:05 -03:00
David Cook dc1858dcd8
Bug 33189: Make plugin upload look for .kpz files in file picker
This change configures the file picker to look for *.kpz files instead
of *.* files, which makes it more convenient to locate .kpz files
for upload when uploading plugins.

Test plan:
0. Apply patch
1. Go to http://localhost:8081/cgi-bin/koha/plugins/plugins-upload.pl
2. Click on "Choose file"
3. Note that the file type in the box at the bottom right of the screen
defaults to "KPZ File (*.kpz)
4. If you navigate to a directory that contains .kpz files (like Downloads),
you'll now see directory folders and .kpz files.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit bb3fecd046)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit c4c77251a2)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ab71ea7e30)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-03-30 09:47:20 +02:00
Nick Clemens 57d2657d28
Bug 33173: Save and continue button in standard cataloging module broken
To test:
1 - Edit a record in the standard editor
2 - Click on to tab 2
3 - Click 'Save and continue'
4 - Error: tab is not defined
5 - Apply patch
6 - Reload page and try again
7 - Fixed!

Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 35e117fb91)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit b0d758cf2d)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit dcf364beba)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
2023-03-30 09:47:20 +02:00