koha.git
5 months agoBug 35912: Corretc field name form itemprice to price in addorderiso2709 template
Nick Clemens [Thu, 25 Jan 2024 19:37:45 +0000 (19:37 +0000)]
Bug 35912: Corretc field name form itemprice to price in addorderiso2709 template

To test:
Setup -- Set systempreferences below

MarcFieldsToOrder:
price: 949$g
quantity: 949$k
budget_code: 949$l
discount: 949$m
sort1: 949$n
sort2: 949$q

MarcItemFieldsToOrder:
homebranch: 949$a
holdingbranch: 949$b
itype: 949$y
nonpublic_note: 949$x
public_note: 949$z
loc: 949$c
ccode: 949$8
notforloan: 949$7
uri: 949$u
copyno: 949$t
price: 949$g
replacementprice: 949$v
itemcallnumber: 949$o
quantity: 949$k
budget_code: 949$l

Stage the attached bib-303.marcxml file
Add to basket from the staged file
Select the biblio
Note items do no have prices
Cancel
Apply patch
Add to basket from file again
Note prices, and other fields, come through as expected

Signed-off-by: Michelle Spinney <mspinney@clamsnet.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 11b91272f97e3f480b01c6b455e72a59597f2c22)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35843: Correct invalid exception
Marcel de Rooy [Fri, 19 Jan 2024 09:36:23 +0000 (09:36 +0000)]
Bug 35843: Correct invalid exception

Test plan:
Run background job tests. Especially the changed one.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
All test pass when running this:
prove t/db_dependent/Koha/BackgroundJobs*
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 291268f3185cb48b6498a9d9121d9567bc0d3419)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 34913: Fix perlcritic for VirtualShelves.pm
Jonathan Druart [Mon, 29 Jan 2024 09:41:56 +0000 (10:41 +0100)]
Bug 34913: Fix perlcritic for VirtualShelves.pm

C4/Utils/DataTables/VirtualShelves.pm: "@order_by" is declared but not used at line 86, column 9.  Unused variables clutter code and make it harder to read.  (Severity: 3)

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0c96e57b0c6986f5bffc7530bd2eaf25ea7e994e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35260: Revise structure of the batch checkout page
Owen Leonard [Mon, 6 Nov 2023 17:21:59 +0000 (17:21 +0000)]
Bug 35260: Revise structure of the batch checkout page

This patch makes some changes to the style and structure of the batch
checkout page in order to make it more usable.

To test, apply the patch and rebuild the staff interface CSS. Clear
your browser cache if necessary.

- Make sure the BatchCheckouts preference is enabled and that the
  BatchCheckoutsValidCategories has some categories selected.
- Locate a patron and open the batch checkout page.
- Test the process of checking out to the patron both by entering
  barcodes into the textarea and by uploading a file.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b54da05c73c9ea5b04d3552b34fcc636b0a71851)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35356: Show SMS labels only when data exists
Lucas Gass [Fri, 17 Nov 2023 21:39:02 +0000 (21:39 +0000)]
Bug 35356: Show SMS labels only when data exists

To test:
APPLY PATCH
1. Set SMSSendDriver = Email
2. Admin > SMS cellular providers, have at least 1.
3. Go to the members/moremember.pl
4. If the patron has no SMSnumber or SMS provider then niether of the labels should appear.
5. Add both a SMSnumber and SMS provider, make sure the data appears correctly on members/moremember.pl.

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 756a9311a15c2748d0c330540e1e3d38a43448e5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 34854: (follow-up) Param name change + POD
Martin Renvoize [Mon, 20 Nov 2023 14:21:58 +0000 (14:21 +0000)]
Bug 34854: (follow-up) Param name change + POD

This patch updates the parameter name to more clearly define what it's
used for and also adds missing documentation.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 78d1093cb597d22cb53e96b971ceed0b3d08a303)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 34854: Add ability to skip Talking Tech Itiva notifications for a patron if a...
Kyle M Hall [Wed, 20 Sep 2023 17:18:54 +0000 (13:18 -0400)]
Bug 34854: Add ability to skip Talking Tech Itiva notifications for a patron if a given field matches a given value

Because some notices are mandatory, some libraries would like to allow patrons to opt-in to phone notices. The request is to be able to decide if a patron should get a notice based on the value of a given field ( usually sort1 or sort2 ).

Test Plan:
1) Apply this patch
2) Enable TalkingTechItivaPhoneNotification
3) Set up some overdue items for a patron
4) Enable phone notices for overdues in the notice status triggers
5) Run the outbound script for OVERDUE with -t OVERDUE
6) Note the output the output contains a line for that patron
7) Set the sort1 field for that patron to TEST
8) Run the script again, adding in the option "-i sort1:TEST"
9) Note the ouput no longer contains that patron!

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit efd932ad42a9c9cc6f422f5286a278de49b76f60)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35893: Add missing </li> in opac.pref
Tomas Cohen Arazi [Wed, 24 Jan 2024 13:46:55 +0000 (10:46 -0300)]
Bug 35893: Add missing </li> in opac.pref

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 1f5d1beddd0a9732110aac3cd194ed3f4a179cba)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 26831: DBRev 23.11.02.001
Katrin Fischer [Tue, 16 Jan 2024 16:38:07 +0000 (16:38 +0000)]
Bug 26831: DBRev 23.11.02.001

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 325980b43f56454a456e8e833c5d4cad0fc84f40)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 26831: (follow-up) Tidy cleanup_database.pl
Kyle M Hall [Fri, 17 Nov 2023 17:26:56 +0000 (12:26 -0500)]
Bug 26831: (follow-up) Tidy cleanup_database.pl

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b4a94459719a0f9c31874eb3b238fa408d636cba)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 26831: (follow-up) Tidy code for qa script
Kyle M Hall [Fri, 17 Nov 2023 17:25:58 +0000 (17:25 +0000)]
Bug 26831: (follow-up) Tidy code for qa script

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2f26de8746576c65fb289f7344dc4507f1e64bca)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 26831: (follow-up) Update system preference description
David Nind [Mon, 23 Oct 2023 23:28:16 +0000 (23:28 +0000)]
Bug 26831: (follow-up) Update system preference description

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2004ba747d553d9876a615d046de5c84557873f8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 26831: Attempting to clarify prioritising of options
Alex Buckley [Mon, 19 Sep 2022 00:39:13 +0000 (00:39 +0000)]
Bug 26831: Attempting to clarify prioritising of options

Sponsored-by: Catalyst IT, New Zealand
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 250b7ce55471f36c2bd8e1f25caf03bb2b8aca8a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 26831: Use new PurgeListShareInvitesOlderThan syspref
Alex Buckley [Tue, 13 Sep 2022 00:09:14 +0000 (12:09 +1200)]
Bug 26831: Use new PurgeListShareInvitesOlderThan syspref

Enable librarians in the staff client to control when unaccepted list
invites will be removed from the database.

Test plan:
1. Apply patches

2. Update database
sudo koha-shell <instance>
cd installer/data/mysql
./updatedatabase.pl

3. Confirm the PurgeListShareInvitesOlderThan syspref = 14

4. Run cleanup_database.pl with --list-invites parameter defined:
sudo koha-shell <instance>
cd misc/cronjobs
./cleanup_database.pl --list-invites 10 -v

5. Confirm the output contains:
"Purging unaccepted list share invites older than 10 days."

6. Set PurgeListShareInvitesOlderThan syspref = 15

7. Run cleanup_database.pl without the --list-invites parameter:
sudo koha-shell <instance>
cd misc/cronjobs
./cleanup_database.pl -v

8. Confirm the output contains:
"Purging unaccepted list share invites older than 15 days."

9. Empty PurgeListShareInvitesOlderThan syspref

10. Run cleanup_database without the --list-invites parameter:
sudo koha-shell <instance.
cd misc/cronjobs
./cleanup_database.pl

11. Observe you get the following output (along with documentation on all
parameters of the script):
"You did not specify any cleanup work for the script to do."

12. Run the cleanup_database with no days defined for the --list-invites
parameter:
sudo koha-shell <instance>
cd misc/cronjobs
./cleanup_database.pl --list-invites -v

13. Confirm the output contains:
"Purging unaccepted list share invites older than 14 days."

Sponsored-by: Catalyst IT, New Zealand
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 428f6d5b17007da312250a5502c748c1f237fb2d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 26831: Add new system preference PurgeListShareInvitesOlderThan
Alex Buckley [Sun, 11 Sep 2022 23:17:01 +0000 (11:17 +1200)]
Bug 26831: Add new system preference PurgeListShareInvitesOlderThan

Sponsored-by: Catalyst IT, New Zealand
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2fbd03fdc70cba27818b7aa8304bcb10c696b294)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35663: Reword default privacy option in opac-privacy.pl
Owen Leonard [Tue, 2 Jan 2024 13:50:54 +0000 (13:50 +0000)]
Bug 35663: Reword default privacy option in opac-privacy.pl

This patch updates the description of the OPAC privacy page, replacing:

"Default: keep my history according to local laws. This is the default
option : the library will keep your history for the duration permitted
by local laws."

...with:

"Default: keep my history according to library policy. This is the
default option : the library will keep your history for the duration set
by library policy."

This correctly reflects the fact that privacy is managed according to a
Koha cron configuration.

To test, apply the patch and make sure the OPACPrivacy and related
preferences are enabled.

- Log in to the OPAC and click the "Privacy" tab in the left-hand
  sidebar.
- Confirm that the description of the default privacy option is correct.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8e8d4aaef71040a90b1052cc3970ff4ccb36a0ae)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35379: Rename tx() parameter to ease translation
Tomas Cohen Arazi [Tue, 21 Nov 2023 18:08:16 +0000 (15:08 -0300)]
Bug 35379: Rename tx() parameter to ease translation

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 71a881c4d6f7ed4a4f004dc08a34721cd801b763)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35419: Update page title for bookings
Owen Leonard [Tue, 28 Nov 2023 17:40:54 +0000 (17:40 +0000)]
Bug 35419: Update page title for bookings

This patch updates the structure of the Bookings list page so that the
title can be better translated.

To test, apply the patch and locate a bibliographic record in the
staff interface catalog.

- View the detail page.
- If you don't see a "Place booking" button in the toolbar,
  click "Items" in the sidebar menu.
  - Locate the "Priority" heading, and change the "Bookable" setting to
    "Yes."
- Click the "Bookings" menu item in the left-hand sidebar.
- Check that the page title looks correct and consistent with
  breadcrumbs.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 660b4fc218c93001e66507f7ac0ac81b3cca0bb2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 34479: Update syntax for translatable string
Katrin Fischer [Tue, 16 Jan 2024 14:11:48 +0000 (14:11 +0000)]
Bug 34479: Update syntax for translatable string

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 63ec52160879b789e206d8bff533910d9b5abe91)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 34479: Fix string for translatability
Katrin Fischer [Tue, 16 Jan 2024 11:00:30 +0000 (11:00 +0000)]
Bug 34479: Fix string for translatability

When moved from .tt to .js we need to convert the single
underscore into a double underscore.

Also uses format() to better deal with the variable.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 066e34956112c5e370ed804fbafd50fc29be0e34)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 34479: Move patron selection history to a re-useable file
Matt Blenkinsop [Mon, 27 Nov 2023 10:35:15 +0000 (10:35 +0000)]
Bug 34479: Move patron selection history to a re-useable file

This patch takes some of the functionality for maintaining patron selections and moves it to a new file that can be used in other template files. It also introduces a new method for determining whether to delete the history after an operation is complete, along with an .inc file containing the checkbox that manages this

Test plan:
1) Navigate to Patrons and run a search
2) Use the checkboxes to select some patrons and run the three different options in the menu bar: Add to patron list, Merge selected patrons, Batch patron modification.
3) For each operation, you should see a checkbox asking if you want to "Keep patrons selected for anew operation". N.B. For adding patrons to a list, you will only see this when selecting to add them to a new list
4) When you run the operations, if you select the checkbox to keep the patrons then when you return tho the patron search, those patrons should all be still selected.
5) If you don't check the box, when you return to the search, your patron selection history should be empty and no patrons should be selected
N.B. If you have run a merge operation and elected to keep the patron history, you will only keep the patron who was kept

Signed-off-by: Sharon Dugdale <sharon.dugdale@cumberland.gov.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Michael Adamyk <madamyk@ckls.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 21e2ee11fba6230b77e8b6376b0a903951170646)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 34479: Add new files to templates
Matt Blenkinsop [Mon, 27 Nov 2023 10:42:09 +0000 (10:42 +0000)]
Bug 34479: Add new files to templates

This patch adds two newly created files to the templates to allow the patron selection history to be wiped or persisted as appropriate

Test plan as per previous commit

Signed-off-by: Sharon Dugdale <sharon.dugdale@cumberland.gov.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2de99d0b028fea2b78fed3a8cd9e44c207e92603)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoUpdate release notes for 23.11.02 release v23.11.02
Fridolin Somers [Wed, 24 Jan 2024 09:25:22 +0000 (10:25 +0100)]
Update release notes for 23.11.02 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoIncrement version for 23.11.02 release
Fridolin Somers [Wed, 24 Jan 2024 09:16:07 +0000 (10:16 +0100)]
Increment version for 23.11.02 release

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 34913: Fix Activate/Deactive filters with table_filters.js
David Cook [Thu, 2 Nov 2023 01:37:35 +0000 (01:37 +0000)]
Bug 34913: Fix Activate/Deactive filters with table_filters.js

This change prevents columnFilter from being called twice. If it's
called twice, it compromises the formatting of the filters.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5804de2463e924dd660b4dc84caaa394f111a139)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 34913: Adjust item search
Jonathan Druart [Tue, 24 Oct 2023 09:12:56 +0000 (11:12 +0200)]
Bug 34913: Adjust item search

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 25f4a5070aef0f3c3ca9d32ee93fc1ba36f36e64)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 34913: Upgrade dataTables.columFilters.js
Jonathan Druart [Thu, 26 Oct 2023 05:31:05 +0000 (07:31 +0200)]
Bug 34913: Upgrade dataTables.columFilters.js

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5cb31b58a52143b41967f369bdd8ab2fb06183bd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 34913: Adjust "Manage staged MARC records"
Jonathan Druart [Tue, 24 Oct 2023 08:32:07 +0000 (10:32 +0200)]
Bug 34913: Adjust "Manage staged MARC records"

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 3f0715ef0a73eea69258b807590419a9091619ad)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 34913: Adjust C4::Utils::DataTables::VirtualShelves
Jonathan Druart [Tue, 24 Oct 2023 08:20:39 +0000 (10:20 +0200)]
Bug 34913: Adjust C4::Utils::DataTables::VirtualShelves

And remove C4::Utils::DataTables, which should no longer be reused
anyway.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 4a65c417f8bfeefe9299981b415f3fbfca5cb5a4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 34913: (follow-up) Make sure default DataTables sorting style is always overridden
Owen Leonard [Fri, 20 Oct 2023 17:15:25 +0000 (17:15 +0000)]
Bug 34913: (follow-up) Make sure default DataTables sorting style is always overridden

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit dbe91a59e8e884b12599ab381513bac8c3751283)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 34913: Move item groups table to kohaTable
Jonathan Druart [Fri, 20 Oct 2023 12:53:13 +0000 (14:53 +0200)]
Bug 34913: Move item groups table to kohaTable

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit f9687f28c018075758364ffb3d859d2477defdae)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 34913: Fix a selenium test
Jonathan Druart [Tue, 3 Oct 2023 07:21:35 +0000 (09:21 +0200)]
Bug 34913: Fix a selenium test

t/db_dependent/selenium/administration_tasks.t ....... 3/3 Cannot show all entries from table //div[@id="libraries_wrapper"] at /kohadevbox/koha/t/lib/Selenium.pm line 247.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 204a840a4d71c677d49378588f4ed529cdc83fea)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 34913: DataTables upgrade: Update CSS and option names
Owen Leonard [Thu, 28 Sep 2023 17:43:32 +0000 (17:43 +0000)]
Bug 34913: DataTables upgrade: Update CSS and option names

This patch makes two categories of changes:

1. CSS changes to accommodate changes in DataTables default CSS and
   markup structure. I've tried to make sure all of our Koha-specific
   styles are still applying.

   This change necessitates a rebuild of staff interface CSS.

2. DataTables option names: In this version of DataTables you can't
   override a default which uses CamelCase (e.g. "pagingType") with one
   in "Hungarian" notation, e.g. "sPaginationType." Since we define many
   default options in prog/js/datatables.js in camel case, any template
   which previously used a Hungarian notation option to override the
   default has now been updated to use the CamelCase version.

   See https://datatables.net/upgrade/1.10-convert#Options for a summary
   of the different option name changes.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 60e3f1024ba485573e53488575afd605a364a8bb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 34913: Upgrade staff interface DataTables from 1.10.18 to 1.13.6
Owen Leonard [Thu, 28 Sep 2023 13:46:34 +0000 (13:46 +0000)]
Bug 34913: Upgrade staff interface DataTables from 1.10.18 to 1.13.6

This patch replaces 1.10.18 DataTables assets in the staff interface
with 1.13.6 versions.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 7e6221209cb83a2ad9d0c86e6a3b26a83b667ab0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 34893: Unit tests for C4::Auth::checkpw
Tomas Cohen Arazi [Fri, 15 Dec 2023 13:54:11 +0000 (10:54 -0300)]
Bug 34893: Unit tests for C4::Auth::checkpw

This patch introduces some tests on the current (and new) behavior for
the `checkpw` function.

I needed it to better understand if an edge case was actually possible
(it wasn't).

Found a really minor annoyance for the internal check with expired
password not returning the $patron object for consistency with the other
use cases.

I think this method deserves (at least) changing the return value to a
sane data structure. But that's not target for backporting to stable
releases. So a separate bug.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5476b18e7ea34e08d9dd163e2c446d5b223cf032)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 34893: (QA follow-up) Tidy code for qa script
Kyle M Hall [Fri, 1 Dec 2023 11:29:19 +0000 (06:29 -0500)]
Bug 34893: (QA follow-up) Tidy code for qa script

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a19a1d2079e562d62d766aa9f996a7586d73882d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 34893: Add checkpw change to REST API
David Cook [Tue, 28 Nov 2023 22:57:39 +0000 (22:57 +0000)]
Bug 34893: Add checkpw change to REST API

This patch adds the checkpw return value change to the REST API
route for validating user identifiers and password.

Test plan:
0. Apply patch
1. prove t/db_dependent/api/v1/password_validation.t

Bonus points:
1. koha-plack --reload kohadev
2. Enable syspref RESTBasicAuth
3. curl -XPOST -H "Content-Type: application/json" \
-u <staff_userid>:<staff_password> \
-d '{"identifier":"<cardnumber>","password":"<password>"}' \
http://localhost:8081/api/v1/auth/password/validation
4. Validation doesn't fail. It gives you cardnumber, patron_id, userid

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit fc1ea85ed024a9789827a1c17376bfc18f19cef0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 34893: ILS-DI can return the wrong patron for AuthenticatePatron
Kyle M Hall [Fri, 22 Sep 2023 18:20:59 +0000 (14:20 -0400)]
Bug 34893: ILS-DI can return the wrong patron for AuthenticatePatron

Imagine we have a set of users. Some of those users have a NULL userid. We then call AuthenticatePatron from ILS-DI for a patron with a NULL userid, but a valid cardnumber. We call checkpw, which returns the cardnumber and userid. We then call Koha::Patrons->find on the userid *which is null*, meaning the borrowernumber returned is not the correct one, but instead the earliest patron inserted into the database that has a NULL userid.

Test Plan:
1) Give three patrons a userid and a password
2) From the database cli, set all patrons's userid to null
   Run this query: update borrowers set userid = null;
3) Call AuthenticatePatron with username being the 1st patron cardnumber,
   and password being the password you set for that patron
   http://localhost:8080/cgi-bin/koha/ilsdi.pl?service=AuthenticatePatron&username=kohacard&password=koha
4) Note you get back a borrowernumber for a different patron. Refresh the page and the number is correct.
5) Do the same with the 2nd patron. Same issue at 1st and correct number after.
6) Apply this patch
7) Restart all the things!
8) Do the same with the 3rd patron.
9) Note you get the correct borrowernumber! :D
10) prove t/Auth.t t/db_dependent/Auth_with_ldap.t t/Auth_with_shibboleth.t t/db_dependent/Auth_with_cas.t

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 9ba199c2acc33873154c167e73e86a5e786084cb)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 34893: Add unit tests
Kyle M Hall [Wed, 29 Nov 2023 17:18:32 +0000 (17:18 +0000)]
Bug 34893: Add unit tests

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 29782174570a331c1b9f1ac8196ce06364f8f691)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35687: DBRev 23.11.01.003
Katrin Fischer [Fri, 26 Jan 2024 13:16:01 +0000 (13:16 +0000)]
Bug 35687: DBRev 23.11.01.003

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ff2318865e56a8d4fe8aff937b6308403d8eeb22)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35687: Upgrade to 23.06.00.013 may fail
Kyle M Hall [Wed, 3 Jan 2024 14:07:49 +0000 (14:07 +0000)]
Bug 35687: Upgrade to 23.06.00.013 may fail

There are reports that this update triggers the error Cannot change column 'itemnumber': used in a foreign key constraint 'tmp_holdsqueue_ibfk_1'

Test Plan:
1) Upgrade to post 23.06.00.013
2) Note the failure
3) Apply this patch set
4) Run updatedatabase.pl
5) Update should succeed!

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a644f41a924ba40254f6c7ef073d33c7eb7d383b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35687: Fix db rev for 23.06.00.013
Kyle M Hall [Wed, 3 Jan 2024 14:31:59 +0000 (09:31 -0500)]
Bug 35687: Fix db rev for 23.06.00.013

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit aadb6172352c7e1dcdbfd6607d2ca9d3da4af090)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35474: Add icon for protected patrons
Owen Leonard [Mon, 4 Dec 2023 14:21:08 +0000 (14:21 +0000)]
Bug 35474: Add icon for protected patrons

This patch adds a "protected" icon (fa-lock) to the patron information
in the sidebar of patron-related pages in the staff interface.

To test, apply the patch and perform a patron search in the staff
interface.

- Edit a patron and go to the "Library management" section.
- Set "Protected" to "Yes."
- Save the record and view the information in the sidebar. You should
  see the lock icon by the patron's name.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 272056791fdb10a6ca1b4fe1aad4933a385ead03)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35341: Improve processing hard due date and auto renewal date
Marcel de Rooy [Fri, 17 Nov 2023 10:18:01 +0000 (10:18 +0000)]
Bug 35341: Improve processing hard due date and auto renewal date

After quite a struggle, came up with this approach using
flatpickr's parseDate and setDate. Seems to be the best.
The dateformat variable is set in calendar.inc.

Test plan:
Test edit, save, clear rules, focus on both dates.
Toggle all I18N preference date formats.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 35341: Do not reinstantiate flatpickr

We do not need to reinstantiate flatpickr, we need to retrieve the
existing instance.

Test plan:
See previous patch.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
12-01-2024 Squashed both patches. Removed the unused hidden inputs for
hardduedatecompare and added a data attribute for the duedate.
The check with is_valid_date seems no longer needed here. Normally
date is empty or valid. A js warning from parseDate should be
exceptional. Made code for both dates a bit more consistent.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 963a3a47155cf313d25af6ba10781f4e7922f4dc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35322: (QA follow-up) Perltidy
Emily Lamancusa [Thu, 11 Jan 2024 20:43:49 +0000 (15:43 -0500)]
Bug 35322: (QA follow-up) Perltidy

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9e168686cc7de610275c51c161d02b3bc307a9bd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35322: Add unit tests
Kyle M Hall [Wed, 29 Nov 2023 14:33:55 +0000 (09:33 -0500)]
Bug 35322: Add unit tests

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 77f045e9a5b9068a335a71bf2de9b4852783a446)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35322: Fix the logic for checking for holds in CanBookBeIssued
Kyle M Hall [Mon, 13 Nov 2023 15:37:43 +0000 (10:37 -0500)]
Bug 35322: Fix the logic for checking for holds in CanBookBeIssued

We are having reports that AllowItemsOnHoldCheckoutSCO and AllowItemsOnHoldCheckoutSIP no longer work. It appreas that in CanBookBeIssued, the ignore reserves check was changed from "check reserves unless the ignore reserves flag was passed" to "check reserves unless the ignore reserves flag was passed *and* we have a recall". I think this was a logic mistake and we want to check reserves unless we have an ignore flag *or* there is a recall.

Test Plan:
1) Enable AllowItemsOnHoldCheckoutSCO
2) Place a hold on an item
3) Attempt to check that item out to another patron
4) Note the checkout is blocked
5) Apply this patch
6) Restart all the things!
7) Attempt the checkout again
8) The checkout now succeeds!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9b10f69ee318c6fe3fa1ffb6de82c0f9888cac71)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35651: Add check to make sure user has advanced_editor permission
Lucas Gass [Wed, 27 Dec 2023 17:52:57 +0000 (17:52 +0000)]
Bug 35651: Add check to make sure user has advanced_editor permission

To test:
1. Turn on the system preference 'EnableAdvancedCatalogingEditor'.
2. Set up a staff user with permissions to editcatlouge but make sure "Use the advanced cataloging editor (requires edit_catalogue)" if OFF.
3. Log in as that patron.
4. Go to a record or create a new one in the basic editor and see the toggle advanced editor button.
5. Try toggling it and you are logged out.
6. APPLY PATCH
7. Try 3 & 4 again, this time there should be no toggle button.
8. Log in as a patron who does havbe the "Use the advanced cataloging editor (requires edit_catalogue)" permission on. They should be able to toggle between editors.

Signed-off-by: Kelly <kelly@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8f13f74e39a93314abc814735b6fcd1504e49373)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 34950: Add availability statuses for in transit and on hold items.
Laura Escamilla [Tue, 19 Dec 2023 18:31:54 +0000 (18:31 +0000)]
Bug 34950: Add availability statuses for in transit and on hold items.

To test:
1. Enable the ILS-DI system preference.
2. Place a hold for a patron and put it in transit.
   Place another hold for a patron that is available for pickup at the local branch.
   And then select an item that is available for checkout but don’t change the status for it.
3. Go to your testing OPAC and make an ILS-DI “Get Availability” call using
   the item ids of the three items you worked with in step 2.
   (i.e. http://localhost:8080/cgi-bin/koha/ilsdi.pl?service=GetAvailability&id=321+323+214&id_type=item)
4. Notice that the availability status for all three items is showing as available.
   The item in transit and the item with a local hold should have a status
   of not available and a message of why they are not available.
5. Apply the patch
6. Use restart_all.
7. Refresh the page and notice that the statuses are now correct.
   The item in transit has a status of not available and an availability
   message of “In transit”.
   The item with the local hold has an availability status of not
   available with an availability message of “On hold”.
   Finally the available item is correctly showing up as available.
8. Sign off and have a wonderful day. :)

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 122f29cd8f4d1067e8ccaf64ecb0f13cc7b85d9a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35510: Non-patron guarantor missing from CollapseFieldsPatronAddForm options
Owen Leonard [Wed, 6 Dec 2023 17:25:39 +0000 (17:25 +0000)]
Bug 35510: Non-patron guarantor missing from CollapseFieldsPatronAddForm options

This patch adds a missing option to the CollapseFieldsPatronAddForm
system preference so that the "Non-patron guarantor" section can be
collapsed by default.

To test, apply the patch and go to Administration -> System preferences.

- Search for CollapseFieldsPatronAddForm.
- In the dropdown of options you should see an entry for "Non-patron
  guarantor."
- Click "Select all" and save your changes.
- Go to Patrons -> New patron and choose a patron category which can
  have a guarantor (for example J - Juvenile)
- The patron entry page should load with all sections collapsed,
  including the Non-patron guarantor section.
- Uncheck  all options in the CollapseFieldsPatronAddForm
  preference and return to the patron entry form. All sections should
  now appear.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e97dac3cbe43c7a8c2d5b340b29354bf112f3a36)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35641: Reduce DB lookups when sending a list of barcodes to inventory
Nick Clemens [Fri, 22 Dec 2023 13:35:06 +0000 (13:35 +0000)]
Bug 35641: Reduce DB lookups when sending a list of barcodes to inventory

This patch does three things:
1 - Removes a specific query for withdrawn status of each item scanned - we can use the withdrawn field
2 - Removes a specific query for checkouts on each item scanned - we can use the onloan field
    a - additionally we don't need to fetch the checkout as we check it in to the homebranch,
    this is likely incorrect - we should use the current branch, but I preserve behavior for now
3 - Fetches the items ahead of time and builds a hash based on barcode, reduces DB lookups, may raise memory usage

To test:
1 - Checkout some items
2 - Withdraw some items
3 - Generate a lsit of barcodes including some checked out items and some withdrawn items
4 - Enter that list of barcodes into inventory tool
5 - Note your results
6 - Apply patch
7 - Issue the items again
8 - Repeat inventory
9 - Confirm results are the same as before patch

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5ae5e4367b96cd5685c40197f391ca3c4063c407)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35676: Fix DidYouMean when not configured
Jonathan Druart [Fri, 12 Jan 2024 12:46:50 +0000 (13:46 +0100)]
Bug 35676: Fix DidYouMean when not configured

When DidYouMean is not configured, there is the following message
displayed:
  "Not what you expected? Check for suggestions"
suggestions is a link to svc/suggestion which does not return content if
the feature is displayed
 90 unless ( @plugins ) {
 91     print $query->header;
 92     exit;
 93 }

We should not see this text, it is supposed to be replaced when the ft
is enabled.

However
  commit 79bf4485c1b2ae8059e2ee15ea1e67bba9961c34
  Bug 34866: Use template wrapper for breadcrumbs: OPAC part 4
made this change:
-                    [% IF ( DidYouMean ) %]
+                    [% #IF ( DidYouMean ) %]
                         <div id="didyoumean">Not what you expected? Check for <a href="/cgi-bin/koha/svc/suggestion?render=standalone&amp;q=[% querystring | uri %]">suggestions</a></div>
-                    [% END %]
+                    [% #END %]

Which is obviously wrong.

Test plan:
Do not have the ft configured and launch a search (OPAC) that will not
return any results.
=> Without this patch there is the message
=> With this patch applied it is no longer displayed

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ae8c96f387997b70b32809f30dedb44d0e170711)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35772: Remove double escaping
Jonathan Druart [Thu, 11 Jan 2024 11:20:55 +0000 (11:20 +0000)]
Bug 35772: Remove double escaping

Patch as proposed by Jonathan in a comment on bug 29002

If a patron has HTML character in surname or firstname, Select2 will escapeHtml twice.

To test:
* Edit a patron, set firstname: <span>test</span>
* Place booking, search for test
* It shows correctly in the result, but when you select it you will see "&lt;", etc.
* Apply patch
* Verify the display is now corrected.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 96681cfa07de61ca28b9e0f1d572e1ee03f5a655)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 25691: (follow-up) Update control file with wiki link
Katrin Fischer [Sat, 6 Jan 2024 19:29:06 +0000 (19:29 +0000)]
Bug 25691: (follow-up) Update control file with wiki link

This is in case it's needed anyway (see comment on previous patch)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 328c5dcdfab66bc6833347796ab292b2c58e57f8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 25691: Replace link to non-existing README with wiki link
Katrin Fischer [Sat, 6 Jan 2024 19:24:33 +0000 (19:24 +0000)]
Bug 25691: Replace link to non-existing README with wiki link

This doesn't update the occurrence in the control file
as it says in control.in:

To test:
* Verify all occurrences of the README file have been updated. Exceptions:
  * control (see above)
  * changelog

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0a49f71e8f0bad53dbdfd48bfc2beddbff89a6cc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35438: Remove skip_intermediate_commit parameter
Kyle M Hall [Fri, 1 Dec 2023 11:53:21 +0000 (06:53 -0500)]
Bug 35438: Remove skip_intermediate_commit parameter

It no longer does anything.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 067034f9e0585738df564a555194c76cb5b082be)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35438: Transact each record import separately
Kyle M Hall [Thu, 30 Nov 2023 17:10:41 +0000 (12:10 -0500)]
Bug 35438: Transact each record import separately

When importing a staged file we commit every 50 records
For an authority import we are also merging, which can affect many more biblios, and these all end up in the transaction.
This can cause tables locks and issues across Koha

Test Plan:
1) Apply this patch
2) prove t/db_dependent/ImportBatch.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 74bbb89e9941aab7bf3f946d663d0d66b9df4021)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 32477: Fix hiding all columns in item batch mod tools
Emmi Takkinen [Fri, 22 Dec 2023 11:05:37 +0000 (13:05 +0200)]
Bug 32477: Fix hiding all columns in item batch mod tools

If one hides all columns in batch item modification tool
and then reloads the page or launches tool again, "Holds"
column isn't displayed and "Itemtype" column is. Also
"Itemtype" columns checkbox remains checked. This happens
because "Itemtype" columns id is out of scope of list of column
numbers set in cookies. This patch adds 3 to number of columns
in variable "allColums" to take account all 3 columns we don't
want to hide.

To test:
1. Find items to modify and modify them with batch item
modification tool.
2. Use "Hide all columns" checkbox to hide all columns.
3. Confirm all columns expect checkbox, "Title" and "Holds"
columns are hidden correctly.
4. Reload the page.
=> Note that "Holds" column is now hidden and "Itemtype"
column is displayed. Also "Itemtype" checkbox is checked.
5. Apply this patch.
6. Repeat steps 1 to 4.
=> "Holds" column should now be displayed and "Itemtype"
hidden. None of the checkbox should be checked.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit deed5233b785be05f6e30ec9077b252edd2c6d35)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 32477: Launch function hideColumns after changing datatables settings
Emmi Takkinen [Thu, 23 Nov 2023 11:15:57 +0000 (13:15 +0200)]
Bug 32477: Launch function hideColumns after changing datatables settings

Hiding columns in batch item modification breaks if page is
loaded again. If one hides e.g. column "Collection" and then loads
the page column "Holds" disappears. Also behaviour of checbox
changes for "Collection" column. This happens because we launch
function "hideColumns" before changing datatables settings and
"hidden" column with class "sorting_1" is still present.

To test:
1. Find items to modify and modify them with batch item
modification tool.
2. In modification page, hide column "Collection". Confirm
correct column is hidden.
3. Reload the page or modify items again.
=> Note that column "Holds" is now hidden and checking checkbox
for column "Collection" behaves incorrectly (unchecked checkbox
shows column, checked hides it)
4. Apply this patch.
5. Repeat steps 1, 2 and 3.
=> Confirm correct column is now hidden when page is loaded again
and checkbox works correctly.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 71a7aa1cdce3a3d52dbb421c3ca5d3cf58fcd9c0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35702: Fetch biblios at once and loop
Nick Clemens [Thu, 4 Jan 2024 14:07:11 +0000 (14:07 +0000)]
Bug 35702: Fetch biblios at once and loop

Test plan:
prove -v t/db_dependent/Authority/Merge.t

Signed-off-by: David Nind <david@davidnind.com>
Amended-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Replace $biblio->id with $biblio->biblionumber

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 1847e2ab565243a9e8fcaf8ddbfe48136041e61b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35702: Use framework code from biblio object
Nick Clemens [Thu, 4 Jan 2024 14:03:45 +0000 (14:03 +0000)]
Bug 35702: Use framework code from biblio object

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c703bb2c1cdefa85843a1c04ff659f49cbe30497)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35086: (follow-up) Use 5000 as example in conf file
Nick Clemens [Fri, 5 Jan 2024 13:03:36 +0000 (13:03 +0000)]
Bug 35086: (follow-up) Use 5000 as example in conf file

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ed23bc1364ef0d80cfcd9df4e9dd38b009d52827)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35086: Tidy tests
Nick Clemens [Thu, 4 Jan 2024 12:55:03 +0000 (12:55 +0000)]
Bug 35086: Tidy tests

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ddbd00de72ac11f7a0cf8fccd9d720e84d85f4ea)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35086: Also split chunks when indexing from background job
Nick Clemens [Wed, 3 Jan 2024 18:54:25 +0000 (18:54 +0000)]
Bug 35086: Also split chunks when indexing from background job

The es background indexer is designed to combine background jobs when started based on the 'batch_size' option.

While this is helpful for combining individual updates, it can be problematic when there are several large batch modifications, or when worker has stopped and is restarted.

This patch uses the same logic as in the indexer to split the chunks that are sent directly for indexing.

To test:
1 - Follow test plan on previous patch
2 - Confirm items are correctly indexed and jobs marked

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7496a603cda7832bcf1bdb606843bd88f18af4f3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35086: Add chunk_size option to elasticsearch configuration
Nick Clemens [Fri, 22 Dec 2023 20:11:34 +0000 (20:11 +0000)]
Bug 35086: Add chunk_size option to elasticsearch configuration

Whne performing batch operations we can send a large numebr of records for reindexing at once.
Currently this can create requetss that are too large for Elasticsearch to process. We need
to break these requests into chunks/

This patch adds a chunk_size configuration to the elasticsearch stanza in koha-conf.xml

If blank we default to 5000.

To test:
0 - Have Koha using Elasticsearch
1 - Create and download a report of all barcodes:
    SELECT barcode FROM items
2 - Batch modify these items
3 - Note a single ESindexing job is created
4 - Create and download a report of all authority ids:
    SELECT auth_header.authid FROM auth_header
5 - Setup a marc modification template, and batch modify all the authorities
6 - Again note a single ES backgorund job is created
7 - Apply patch
8 - Repeat the modifications above - you still get a single job
9 - Edit koha-conf.xml and add <chunk_size>250</chunk_size> to elasticsearch stanza
10 - Repeat modifications - you now get several background ES jobs
11 - prove -v t/db_dependent/Koha/SearchEngine/Elasticsearch/Indexer.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9951e230e43d08dc6a2fb635877d0db5c1e245ff)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 34999: Add unit test
Marcel de Rooy [Thu, 11 Jan 2024 10:09:57 +0000 (10:09 +0000)]
Bug 34999: Add unit test

Test plan:
Run t/db_dependent/api/v1/auth.t
[Bonus] Run prove t/db_dependent/api/v1

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b8d9cce6645b913c57410a855986b76c84d2346b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 34999: Throw exception for public routes if OPACMaintenance is enabled
Marcel de Rooy [Fri, 24 Nov 2023 10:50:54 +0000 (10:50 +0000)]
Bug 34999: Throw exception for public routes if OPACMaintenance is enabled

Test plan:
[1] Try public endpoint like /api/v1/public/biblios/X/items.
    * Replace X by an existing biblionumber.
    You should receive a 200.
[2] Enable OPACMaintenance. Set to Show.
[3] Try same endpoint. You should get a 503 with a json error.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 1fc82dd827ad298bead46583ada08c549afe8d8e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35756: Correctly serialize patron's data in patron search popup/modal
Jonathan Druart [Wed, 10 Jan 2024 08:36:43 +0000 (09:36 +0100)]
Bug 35756: Correctly serialize patron's data in patron search popup/modal

We are incorrectly using encodeURIComponent in patron-search.inc.
When a new patron is selected, the info message is showing "Patron %s is already in the list"
or "Patron %s added". If the patron has space in their name, they will be substituted with %20.

We are using JSON for select, we can reuse it for add.

Test plan:
Have a patron with spaces in their name
Add users to a fund
Notice that the name is correctly displayed.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6779e64d955f6e90e05eba19fd4d7d3606ae15ec)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35475: Improve concatenated string and fix error in JS file
Katrin Fischer [Sat, 23 Dec 2023 16:19:45 +0000 (16:19 +0000)]
Bug 35475: Improve concatenated string and fix error in JS file

Fixes 2 problems noted in comment#2 and comment#3 on the bug
report.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f0e7260a29ec2768b442490921d74b8ee267f15c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35475: Makes strings in booking JS file translatable
Katrin Fischer [Sun, 10 Dec 2023 16:56:29 +0000 (16:56 +0000)]
Bug 35475: Makes strings in booking JS file translatable

This makes several strings in the booking specific JS file
translatable.

To test:
* Make an item bookable:
  * Find a record with items in your catalog or create one
  * From the details page, switch to the items tab
  * Mark items as bookable
* Add a booking, verify the modal works as expected
* Check the bookings tab
* Verify the column headings of the bookings table show correctly
* Verify the "Biblio level" and "Item" in the calendar show
  Note: Months don't translate, this will be a separate bug
* Cancel a booking, edit a booking... make sure everything works
  as expected
* If you can: Install a translation and verify strings show up
  in po files as expected

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 573d2a3ba86aa0e805975a4d224d341b775eaebd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35759: (bug 30708 follow-up) Generated dist file not installed for preservation...
Jonathan Druart [Wed, 10 Jan 2024 14:01:45 +0000 (15:01 +0100)]
Bug 35759: (bug 30708 follow-up) Generated dist file not installed for preservation module

It's missing from the Makefile.PL!

Same as erm.js when need to install it.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit bd9e3145d7188867db9bf31bdf6ab980c0f01c70)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35504: Distinguish different RMaint and Topic Expert roles
Martin Renvoize [Wed, 10 Jan 2024 13:46:58 +0000 (13:46 +0000)]
Bug 35504: Distinguish different RMaint and Topic Expert roles

This patch further splits up release maintanence and topic expert roles
so that they display with further, more accurate, detail in the
development team section.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2ce83fc784ad8bc716bd65f14845141097c72b69)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35504: Split list of ERM Topic experts
Martin Renvoize [Wed, 10 Jan 2024 13:48:53 +0000 (13:48 +0000)]
Bug 35504: Split list of ERM Topic experts

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 73809ff846e7c0c4e18a48c1831acc7ccfcf3b8d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35504: Add full maintainers list into development branch
Martin Renvoize [Wed, 10 Jan 2024 11:39:15 +0000 (11:39 +0000)]
Bug 35504: Add full maintainers list into development branch

On a stable branch the current maintainer of your running version is
listed at the top of the current maintanence team.. however when you're
on a development branch the RM is responsible for your branch and the
maintainers were missing from display.

This patch adds the maintainers list back to the bottom of the current
maintanence team section, just for the development branch.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7fd998c1e7355aeb5635a94d25382125d192cd10)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35504: Change 'Jenkins' to 'Continuous integration'
Martin Renvoize [Wed, 10 Jan 2024 11:38:14 +0000 (11:38 +0000)]
Bug 35504: Change 'Jenkins' to 'Continuous integration'

We were naming these roles differently between the 'current team' and
'past roles' display.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a26d4bdf9521ca4fad85741b9fddbb540823d4e0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35504: Corrections to wiki team
Martin Renvoize [Wed, 10 Jan 2024 11:37:51 +0000 (11:37 +0000)]
Bug 35504: Corrections to wiki team

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a4061c3f146a41e2fdb41f4be15239a61a04b46d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35504: Add ktd maintainer
Martin Renvoize [Tue, 12 Dec 2023 12:04:56 +0000 (12:04 +0000)]
Bug 35504: Add ktd maintainer

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 29c1225bf8ee789a6f03d35e8af93a953b8733fa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35504: Corrections to team
Martin Renvoize [Tue, 12 Dec 2023 11:48:47 +0000 (11:48 +0000)]
Bug 35504: Corrections to team

Correction of 'advocate' to 'advocates' to ensure they appear in the
team.

Addition of 'website' and 'wiki' handling to ensure they also appear
in the team.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8190fdb5bda236d762eb6f9e42e8c733c2408a14)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35504: Typo fix
Pedro Amorim [Tue, 12 Dec 2023 11:10:47 +0000 (11:10 +0000)]
Bug 35504: Typo fix

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b9da22b490e676b3781cb7f1439a4cbf420f52ab)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35504: New cycle, new team :)
Martin Renvoize [Wed, 6 Dec 2023 16:03:55 +0000 (16:03 +0000)]
Bug 35504: New cycle, new team :)

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b6cfef878bfdaa48b36c37c6415293d23042c774)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35634: (bug 33105 follow-up) fix typo issues_manage vs issue_manage
Jonathan Druart [Wed, 3 Jan 2024 13:52:25 +0000 (14:52 +0100)]
Bug 35634: (bug 33105 follow-up) fix typo issues_manage vs issue_manage

issue_manage inserted into the DB but issues_manage is tested in the
controller script.

Test plan:
  git grep issues_manage
should no longer return any results

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2fbd47fdd68678f8f12307b6f5bda1cbcac0ca9a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 33639: Make add item to item group work from additem.pl
Lucas Gass [Tue, 2 Jan 2024 17:49:45 +0000 (17:49 +0000)]
Bug 33639: Make add item to item group work from additem.pl

To test:

1, Create one or more item groups for a bib if needed
2. Create a new item, and at the bottom of the 'Add item' screen, select the item group to which you want this item added. Save.
3. On the Normal tab, see that the item has not been added to the item group you selected.
4. APPLY PATCH, restart_all
5. Try 1-3 again but this time the item should succesffuly be added to the item group.
6. Add a new item and to the same record and this time try the 'Create a new item group' from the dropdown.
7. Name the new item group.
8. Make sure it is correctly added to the item group.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5b14f8b11a57a83b5863e32121243c7b133d5c90)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35265: Remove drag and drop in Elasticsearch mappings
Fridolin Somers [Mon, 6 Nov 2023 06:53:43 +0000 (20:53 -1000)]
Bug 35265: Remove drag and drop in Elasticsearch mappings

Bug 18827 says ordering search fields in Elasticsearch mappings is useless.

This patch removes it.
Drag and drop is kept for facets.

Test plan :
1) Enable Elasticsearch
2) Go to Administration > Search engine configuration (Elasticsearch)
3) Go to tab 'Bibliographic records'
4) Check there is no Javscript error
5) Check you can't drag and drop lines anymore

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Barbara Petritsch <barbara.petritsch@wienmuseum.at>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c5f28855ad5870457b5cd8a2171e5bb23c054f2f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 25835: Include overdues with fines in overdues_report permission
Andrew Fuerste Henry [Wed, 29 Nov 2023 18:02:52 +0000 (18:02 +0000)]
Bug 25835: Include overdues with fines in overdues_report permission

To test:
1 - have a user with circulate_remaining_permissions but not
    overdues_report
2 - confirm user can see and run Overdues with Fines
3 - apply patch
4 - confirm user can no longer see links to Overdues with Fines or load
    the page directly by entering the url
5 - confirm a user with overdues_report or greate permission can see and
    use the tool

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 23de67a7e4d3701f9a665ec0fee38e22128c5fa3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 32551: HTTP_ACCEPT_LANGUAGE legacy CGI variable not set in Mojolicious
Tomas Cohen Arazi [Thu, 28 Dec 2023 14:41:39 +0000 (14:41 +0000)]
Bug 32551: HTTP_ACCEPT_LANGUAGE legacy CGI variable not set in Mojolicious

This patch addresses the fact some of our code still relies on those CGI-era ENV variables.
In particular, C4::Laguages::getlanguage expects it to calculate the most suitable language.

As this is reported as required, I provide a fix.

I did a `git grep HTTP_` on the codebase, and the only other occurences are:

* C4::Output (HTTP_X_REQUESTED_WITH)
* C4::Context (HTTP_USER_AGENT, HTTP_X_FORWARDED_FOR)
* C4::Auth_with_shibboleth (using HTTP_ variables for matchpoints)
* Some handling on the 'Koha as a Mojo app' code
* Some .pl script not relevant to this report

I decided to limit this patch to the requested header which seems harmless. I leave the
other cases.

To test:
1. Apply the regression tests patch
2. Run:
   $ ktd --shell
  k$ qa -c 1
=> FAIL: Tests fail!
3. Apply this patch
4. Run:
  k$ qa -c 2
=> SUCCESS: Tests pass! All green!
5. Sign off :-D

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit d6e072fb5f2a0cd47661e759142e59e887724cc6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 32551: Regression tests
Tomas Cohen Arazi [Thu, 28 Dec 2023 14:40:11 +0000 (14:40 +0000)]
Bug 32551: Regression tests

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5292903dc19191b265e5b2c6a1cdce99ed9e447c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35567: Prevent translation of Host-item in "Show analytics" link
Kevin Carnes [Thu, 14 Dec 2023 09:47:40 +0000 (10:47 +0100)]
Bug 35567: Prevent translation of Host-item in "Show analytics" link

The "Show analytics" link is built using text which can be translated.

The following languages have already translated Host-item:
fa-Arab, fi-FI, nl-NL, pt-BR, ru-RU, sv-SE

To test:
 1. Install one of the affected languages:
    koha-translate --install sv-SE --dev kohadev
 2. Modify and save the following system preferences:
    language: enable the language
    OPACLanguages: enable the language
    opaclanguagesdisplay: Allow
    EasyAnalyticalRecords: Show
 3. View a record with holdings and copy the barcode of one the items
 4. Select the Edit dropdown menu above the record details and click
    "Link to host record"
 5. Paste the barcode, click Select, and click OK
 6. Return to Normal view of the record and reload the page
 7. There should now be a "Show analytics" link
 8. Hover over the link and note that the link contains "Host-item"
 9. Switch to one of the affected languages and note that "Host-item" is
    translated
10. View the record in the OPAC and confirm that the link is also translated
11. Apply the patch
12. Update the affected language:
    koha-translate --update sv-SE --dev kohadev
13. Restart Koha (restart_all)
14. Notice that the links are no longer translated
15. Sign off

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0f2c17e71dcf128a28a9533c2a3040db2535fd1d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35686: (follow-up) Correct page heading
Owen Leonard [Mon, 8 Jan 2024 13:36:20 +0000 (13:36 +0000)]
Bug 35686: (follow-up) Correct page heading

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Removed space before colon from "Update report :"

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 1742893d5a69f0af36c79eb2be39ce66f405cd46)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35686: Case missing from installer step 3 template title
Owen Leonard [Wed, 3 Jan 2024 13:08:12 +0000 (13:08 +0000)]
Bug 35686: Case missing from installer step 3 template title

This patch adds a missing case to the display of the title on step 3 of
the web installer. This resulted in an empty first part of the title:
" > Web installer > Koha"

To test, apply the patch and reset the database version from the command
line in Koha Testing Docker:

> koha-mysql kohadev
> UPDATE systempreferences SET value = '23.1200002 WHERE variable = 'version';
> quit
> Restart all

- Go to the staff interface. You should be taken to the web installer.
- Log in to the web installer and proceed through until you get to the
  "Updating database structure" page.
- Confirm that the page title is correct.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5dbab835970efde42382616df28b0215aee7f2d8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35517: Choose correct default header search tab according to permissions
Owen Leonard [Thu, 7 Dec 2023 18:17:55 +0000 (18:17 +0000)]
Bug 35517: Choose correct default header search tab according to permissions

This patch adds some additional template logic to the header search form
for the staff interface home page so that users with different
permissions will see the correct tab in the header search form.

To test, apply the patch and view the staff interface home page using a
user with different permissions:

- 'catalogue' and 'circulate'
  - Header should show circulation search
- 'catalogue' and 'borrowers'
  - Header should show patron search
- 'catalogue' only
  - Header should show catalog search

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit abbacfca5ddc66f66008ebf37cd05fc3eec33929)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35602: Fix typo AutoMemberNum
Katrin Fischer [Sat, 6 Jan 2024 19:40:25 +0000 (19:40 +0000)]
Bug 35602: Fix typo AutoMemberNum

The correct spelling is autoMemberNum.

To test:
* Enable autoMemberNum system preference
* Set cardnumber to mandatory in BorrowerMandatoryField
* Add a new patron account
* Verify correct spelling in hint below cardnumber input field

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 78b4fac242f2e4dd940aff0811abccf4aa093b1e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35395: Update DefaultPatronSearchMethod system preference description
Katrin Fischer [Sat, 6 Jan 2024 20:27:51 +0000 (20:27 +0000)]
Bug 35395: Update DefaultPatronSearchMethod system preference description

This updates the system preference description of DefaultPatronSearchMethod
so that it's clear that the preference applies to all patron
searches, including patron module search and auto-completes.

To test:
* Search for DefaultPatronSearchMethod system preference in administration
* Verify the setting is reflected in the filters of the patron search
* Apply patch
* Verify that the description now is now improved.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 373a3c764c94348ae30299927982552f675f7752)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35650: (QA follow-up) Add spans to errors for user restrictions
Katrin Fischer [Thu, 11 Jan 2024 12:59:12 +0000 (12:59 +0000)]
Bug 35650: (QA follow-up) Add spans to errors for user restrictions

This will ease translation.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 32799f8e36fcadd14c080284b93f09cce235067e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35650: (follow-up) Other cases found
Tomas Cohen Arazi [Tue, 26 Dec 2023 14:47:37 +0000 (11:47 -0300)]
Bug 35650: (follow-up) Other cases found

while editing files for the main patch, I noticed some tiny cases.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4699fd0c2f4757443e47efa82421daa1f695f9c9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35650: Standardize on 'Check the logs for details.'
Tomas Cohen Arazi [Tue, 26 Dec 2023 13:53:07 +0000 (10:53 -0300)]
Bug 35650: Standardize on 'Check the logs for details.'

This patch makes the 'Check the logs..' messages more consistent across
the codebase.

To test:
1. Run:
   $ git grep -e 'Check the logs\"' -e 'Check the logs<' -e 'Check the logs\.'
=> FAIL: Several forms show up
2. Apply this patch
3. Repeat 1
=> SUCCESS: Empty result.
4. Run:
   $ git grep -e 'Check the logs for details\.'
=> SUCCESS: Consisten results show
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ba3130a88a26c96b133c1a709b1afea9828d6120)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35713: Remove outdated debian/docs/LEEME.Debian file
Katrin Fischer [Sat, 6 Jan 2024 18:21:43 +0000 (18:21 +0000)]
Bug 35713: Remove outdated debian/docs/LEEME.Debian file

This removes the LEEME.Debian README file from the docs
directory. We don't even have an English README here as
we usually refer to the wiki for installation instructions.
It makes sense to remove it from the codebase.

To test:
* Verify that the file is removed
* Verify that all references to the file have been removed as well
  Example: git grep LEEME

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a18e4d0e6241d4a18ceb62b7543c89cddd74bb1c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35757: (QA follow-up) Tidy
Nick Clemens [Wed, 10 Jan 2024 18:09:31 +0000 (18:09 +0000)]
Bug 35757: (QA follow-up) Tidy

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 40d7a90bc576b8263daf7ee90cdd1055a08ba902)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35757: Fix unit tests for external counter registry API
Matt Blenkinsop [Wed, 10 Jan 2024 10:14:40 +0000 (10:14 +0000)]
Bug 35757: Fix unit tests for external counter registry API

This patch updates the unit tests for the external counter registry API used in the Usage Statistics module. The intent of the tests is to identify any changes in the external response that could lead to errors in Koha. To do this, the tests now compare the list of hash keys returned in the response with the current definition in Koha, and identifies any new fields that need to be added to the definition.

Test plan:
prove t/db_dependent/api/v1/erm_counter_registries.t
prove t/db_dependent/api/v1/erm_sushi_services.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f42741d32cfb8142984cffdf3cd7c7b2a3e794b3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35757: Add new fields to api definitions
Matt Blenkinsop [Wed, 10 Jan 2024 10:13:26 +0000 (10:13 +0000)]
Bug 35757: Add new fields to api definitions

The counter registry API has added a new field to both the counter registry and sushi service endpoints. This patch adds those new fields to the definitions.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 520ac94242818032e7970f62d03caa926597be2e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
5 months agoBug 35584: (follow-up) Remove duplicate license entry
Owen Leonard [Mon, 8 Jan 2024 17:01:04 +0000 (17:01 +0000)]
Bug 35584: (follow-up) Remove duplicate license entry

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e3ad57ea930402e8e741e73b5d5c269c7d27d5f1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>