Commit Graph

56491 Commits

Author SHA1 Message Date
Jonathan Druart fd9727ff50
Bug 38461: Refactoring - mock_table_settings
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3d6210552c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:59 +02:00
Jonathan Druart 211576422f
Bug 38461: Refactoring - build_libraries
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f5a7c307da)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:58 +02:00
Jonathan Druart 18c8c36a8b
Bug 38461: Save state ON/OFF
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a55281fbca)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:57 +02:00
Jonathan Druart 9e25b97101
Bug 38461: Columns - All, is_hidden by default, then shown by user
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9544cbf977)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:57 +02:00
Jonathan Druart fcdc0754f9
Bug 38461: Use buildSampleObjects
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6438b1e0e2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:56 +02:00
Jonathan Druart 3be4e3df60
Bug 38461: Add tests for 'Clear filter'
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b00b99f31d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:55 +02:00
Jonathan Druart 1b9771023f
Bug 38503: Do not generate too long strings
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 55c3840588)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:55 +02:00
Jonathan Druart 95490ba8e4
Bug 38503: Merge the module.exports
We redefine it and so the query/mysql plugin is not available

It fixes csrf.ts
14:36:17 koha_1       | The task &apos;query&apos; was not handled in the setupNodeEvents method. The following tasks are registered: buildSampleObject, buildSampleObjects

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a5eb0ba010)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:54 +02:00
Katrin Fischer aae6af9754
Bug 38503: Update yarn.lock
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6a9870fd1c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:53 +02:00
Jonathan Druart 257f133795
Bug 38503: Do not list the objects
No need to list all the objects, just retrieve the spec depending on the
"object" var we pass.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9f5f4aa1d6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:53 +02:00
Jonathan Druart dc4f90b1c7
Bug 38503: Generate correct values for date and date-time
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ddd22c7887)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:52 +02:00
Jonathan Druart b6f11a8e27
Bug 38503: Deal with types that can be "null"
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3bc9bd8b62)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:51 +02:00
Jonathan Druart 2524a79821
Bug 38503: Allow to pass values
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 34f6663374)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:50 +02:00
Jonathan Druart 00fe3f8b55
Bug 38503: Have a generic buildSampleObject[s]
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3f880c5978)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:50 +02:00
Jonathan Druart 7bad7ea76d
Bug 38503: Same for libraries
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7b3426928f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:49 +02:00
Jonathan Druart 6b3711d2c0
Bug 38503: Implement a plural form - buildSamplePatrons
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit bad59ca734)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:48 +02:00
Jonathan Druart 8995b8b806
Bug 38503: Read patron swagger spec file and implement buildSamplePatron
Test plan:
1. Install deps
     sudo yarn install --modules-folder /kohadevbox/node_modules
2. Run tests
     cypress run --config video=false --spec t/cypress/integration/t/mockData.ts

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3a3294966a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:48 +02:00
Caroline Cyr La Rose f224586f7c
Bug 38856: Typo: EmailAddressForPatronRegistrations - "chooose"
This patch fixes a typo in the description of the
EmailAddressForPatronRegistrations system preference.

To test:
1. Apply patch
2. Go to Administration > System preferences
3. Search for EmailAddressForPatronRegistrations
4. Read the description (2nd line) and make sure the spelling is correct

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised.

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 3fc855f568)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:47 +02:00
Nicolas Hunstein e40a130a93
Bug 38471: update "Field suppresion" to "Field suppression"
updates "Field suppresion" to "Field suppression"

to test:
- go to Administration/Authority types/Default framework/Tag 090
- verify description for subfield t is Field suppresion, FSP (RLIN)

- apply patch
- reset database or reset_all
- verify description has changed to Field suppression,FSP (RLIN)

Signed-off-by: William Lavoie <william.lavoie@inLibro.com>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ede69d5c5f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:46 +02:00
David Nind 4a66ba2524
Bug 38448: Fix inconsistencies in database update messages
This fixes some database update messages to improve their
consistency with the database update guidelines
https://wiki.koha-community.org/wiki/Database_updates

Test plan:
1. Apply the patch.
2. Review the differences to make sure the messages make
   sense and are consistent with the database update
   guidelines:
   2.1 Review the diff attached to the bug
   or
   2.2 Run: git show
3. Sign off D:

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Leo Stoyanov <leo.stoyanov@bywatersolutions.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 bdcbcc0a33)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:45 +02:00
Caroline Cyr La Rose 6352c25dad
Bug 38845: OpacNoItemTypeImages required to show item type images in staff interface advanced search
This patch makes it so that the noItemTypeImages system preference is
the one that controls the display of item type images in the staff
interface advanced search page. It was previously erroneously managed by
the OpacNoItemTypeImages system preference.

To test:

1. Add images to item types, if there aren't any already (KTD has them by default)
   1.1. Go to Administration > Item types
   1.2. Click 'Edit' next to one of the item types
   1.3. Choose an icon
   1.4. Click 'Save changes'

2. Disable OpacNoItemTypeImages

3. Enable noItemTypeImages (already enabled in KTD)

4. Go to the advanced search page
   --> The item types don't have any images next to them

5. Apply patch and refresh the page
   --> The item type images should be displayed

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 55632527fc)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:45 +02:00
Imani Thomas 8ee985911e
Bug 36229: Move koha-run-backups to the top of the cron
test plan:
    1. check run order of scripts in the cron
    2. apply patch
    3. koha-run-backups is now at the beginning of the cron

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 814e1326b7)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:44 +02:00
Jonathan Druart be75a5ce94
Bug 38855: (bug 22056 follow-up) Remove 'test' directory template-side
This should have been removed by bug 22056

Signed-off-by: William Lavoie <william.lavoie@inLibro.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 90774b33a7)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:43 +02:00
Pedro Amorim a590750430
Bug 38505: CirculateILL: Add ILL::Request::check_out regression tests
prove t/db_dependent/Koha/ILL/Requests.t

Signed-off-by: Ray Delahunty <r.delahunty@arts.ac.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 642f21a6f2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:43 +02:00
Pedro Amorim df52748092
Bug 38505: CirculateILL: Add UNKNOWN_BARCODE warning message
Test plan, before applying patches:
1) Enable ILLModule system preferece.
2) Create a book ILL request:
  <staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard
3) After creating a Book ILL request, go to its detail page and click on the newly created linked biblio
4) On the biblio detail, click 'NEW' -> 'New item', add type and home library + current library (dont enter a barcode)
5) Repeat 2) -> Click confirm request and continue.
6) Click "Check out" -> If theres a problem with the patron (expired or max checkouts hit) it'll say "A problem with patron occurred". Fix that adn click c"check out" again.
7) Notice the message "An unknown error occurred while trying to checkout the item"
8) Apply patches. Repeat. Notice the message you now get is 'The bibliographic record's item contains an unknown (or empty) barcode.'.

This patch also adds a link to the respective biblio for Staff members'
convenience.

Signed-off-by: Ray Delahunty <r.delahunty@arts.ac.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ecd0604a8d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:42 +02:00
Pedro Amorim 4af7516065
Bug 38505: ill-requests.tt: Use .alert-warning when .alert exists
Cosmetic changes only.

Signed-off-by: Ray Delahunty <r.delahunty@arts.ac.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 90304e7632)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:41 +02:00
Pedro Amorim af48f1b8bd
Bug 38505: CanBookBeIssued preparation: Appropriate behavior when barcode is falsy
Before applying this patch, apply the CanBookBeIssued preparation: tests patch and run that,
Verify it fails, apply this patch. Run that same tests file again.

----- About this change -----

CanBookBeIssued wants to find one item given a barcode.
If a falsy (undef, empty) barcode is supplied, UNKNOWN_BARCODE should be returned.

Ensure this change does not introduce any regressions:
prove t/db_dependent/Circulation*
prove t/db_dependent/DecreaseLoanHighHolds.t
prove t/db_dependent/rollingloans.t
prove t/db_dependent/api/v1/checkouts.t
prove t/db_dependent/Patron/Borrower_PrevCheckout.t

Signed-off-by: Ray Delahunty <r.delahunty@arts.ac.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 89b7f160a7)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:41 +02:00
Pedro Amorim 5cc10bb9bf
Bug 38505: CanBookBeIssued preparation: Add tests for falsy barcode
prove t/db_dependent/Circulation.t

Signed-off-by: Ray Delahunty <r.delahunty@arts.ac.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 45626c75c4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:40 +02:00
Martin Renvoize a52ab11e82
Bug 37448: (QA follow-up) Move POD to make QA Script happy
This particular script has POD at the end rather than inline POD. This
patch simply moves the POD addition for this patchset into the bottom
section.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 25fd262192)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:39 +02:00
Pedro Amorim c620d76399
Bug 37448: Add build_sample_ill_request
The linked biblio_id of a generated test ILL request needs to be created by build_sample_biblio->AddBiblio.
Or else the related biblio is created by just 'build' and is not indexed + its related metadata is missing.

To test:
1) Apply the [DONT PUSH] patch and enable ILLModule
2) Run the script for ILL requests:
  misc/devel/create_test_data.pl -n 5 -s Illrequest -d backend=Standard
3) Visit the ILLModule:
  http://<intra_url>/cgi-bin/koha/ill/ill-requests.pl
4) Notice it loads 5 test ILL requests correctly

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@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 c42cfecd43)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:38 +02:00
Kyle M Hall c0a51634f5
Bug 37448: Add script to allow developers to quickly generate large amounts of data for development and testing
Test Plan:
1) Apply this patch
2) Run: misc/devel/create_test_data.pl -n 99 -s Borrower -d surname=Hall  -d zipcode=111111
3) Search patrons' for the name "Hall"
4) Note there are 99 Hall's in your results!

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>

Bug 37448: Make use of build_sample_biblio and build_sample_item

The script is brilliant, but for biblios and items we should make use of build_sample_biblio and build_sample_item or this data does not get indexed + linked tables rows get missed

To test, before this patch, run:
1) misc/devel/create_test_data.pl -n 5 -s Biblio -d title=Test
  Notice the 'Test' biblio is created on the database, but doesnt show on searches, and accessing it directly through URL throws a 500 error (because metadata does not exist for the biblio)
2) Apply this patch. Repeat the step above. Notice it now shows on searches and visiting the biblio directly shows no errors

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 37448: (QA follow-up) Tidy script

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 576621a6df)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:38 +02:00
Pedro Amorim cb26be6d27
Bug 38751: Update Standard ILL backend migrate
Make use of newly updated ILL::Request->extended_attributes method instead of creating the query manually

The test plan in bug 38819 fails without this patch (page explodes with duplicate ID error).
It's the same cause as the one being fixed here in bug 38751 so I'm submitting this here.

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 92fd65840a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:37 +02:00
Pedro Amorim 2dfdc7c491
Bug 38751: Update Standard ILL backend add_request
Make use of newly updated ILL::Request->extended_attributes method instead of
creating the query manually

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 6526e00374)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:36 +02:00
Pedro Amorim 898880da96
Bug 38751: Add tests
prove t/db_dependent/Koha/ILL/Request.t

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 2a6bc075f6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:36 +02:00
Pedro Amorim 0b3f441166
Bug 38751: Update ILL::Request->extended_attributes
This updates the extended_attributes method to also act as setter.
Additionally, it'll skip adding any attribute that result in error,
preventing an ugly error 500.

Test plan:
1) Enable ILLModule sys pref
2) Attempt to create the following openurl request through the OPAC:
   http://localhost:8080/cgi-bin/koha/opac-illrequests.pl?DOI=10.1001%2Fjama.2024.11146&atitle=Interventions%20for%20High%20Body%20Mass%20Index%20in%20Children%20and%20Adolescents%3A%20US%20Preventive%20Services%20Task%20Force%20Recommendation%20Statement.&aulast=Nicholson%2C%20Wanda%20K.&backend=FreeForm&cardnumber=53807898&date=20240716&genre=article&id=DOI%3A10.1001%2Fjama.2024.11146&issn=00987484&issue=3&method=create&opac=1&openurl=1
3) Notice it fails with a Duplicate ID error and the OPAC blows up.
   This is because Koha is trying to add the 'DOI' illrequestattribute
   twice and that is resulting in a duplicate ID
4) Apply patches, repeat test plan, notice the error no longer happens,
   the request is created correctly and all successful attribute have
   been added.

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 9fc470c0a8)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:35 +02:00
David Cook 92a428ba48
Bug 38846: Only call getLanguages for advanced search pages
This change makes it so that C4::Languages::getLanguages is only
called for the advanced search pages and not the search result pages
where the output is not used.

Test plan:
0. Apply the patch and koha-plack --restart kohadev
1. Go to http://localhost:8081/cgi-bin/koha/catalogue/search.pl?expanded_options=1
2. Note that the "Language" and "Language of original" dropdowns appear with language
options
3. Go to the following
http://localhost:8081/cgi-bin/koha/catalogue/search.pl?advsearch=1
&idx=kw&q=test&sort_by=relevance
4. Note that the page loads normally

5. Go to http://localhost:8080/cgi-bin/koha/opac-search.pl?expanded_options=1
6. Note that the "Language" dropdown appears with language options
7. Go to http://localhost:8080/cgi-bin/koha/opac-search.pl?idx=&q=test&weight_search=1
8. Note that the page loads normally

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 996ec95274)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:34 +02:00
Martin Renvoize 9f4ce28da5
Bug 38857: (QA follow-up) Fix perltidy errors
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 9e894ee790)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:33 +02:00
Nick Clemens 85e586af8d
Bug 38857: Update cronjobs to log run before processing parameters
A few notes:
- I grabbed this list by looking for things in misc/ that had cronlogaction
- I didn't touch scripts that aren't in the cronjobs directory, except
  fix_invalid_dates where I follow import_patrons and only log if confirmed
  since they aren't crons, I figure this seems reasonable
- purge_suggestions I moved the logggin up and changed the addition of
  effective days to a verbose message - this seems more consistent

To test:
 1 - Enable CronjobLog
 2 - On command line:
     perl misc/cronjobs/cleanup_database.pl --old_reservers 550
 3 - Error on command line
 4 - In staff client, go to Tools->Log viewer, check 'Cronjobs' and submit
 5 - No entries
 6 - Apply patch
 7 - Repeat and see run is logged with wrong parameter
 8 - Fix parameter and confirm
 9 - Spot check other files until you are satisfied
10 - Sign it off!

Signed-off-by: William Lavoie <william.lavoie@inLibro.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 ed04d5b0fa)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:33 +02:00
Lucas Gass de8c20de12
Bug 38232: Pass exemptfine value into circ-needsconfirmation-modal form
To test:
1. FinesMode on
2. CircConfirmItemParts on
3. have an item with a materials specified note (952$3)
4. Check in item with 'forgive overdue charge' selected, no materials note, box stays checked.
5. Check in item with 'forgive overdue charge' selected, with a material note, Materials note checkin deselects the box.
6. APPLY PATCH
7. Try steps 4-5 again, the correct value should be retained in the 'forgive overdue charge' checkbox.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5a3380a751)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:32 +02:00
Nick Clemens c88bed8554
Bug 14907: Sort item search by cn_sort when sorting by callnumber
This patch simply intercepts a call to sort by callnumber and changes it to cn_sort

To test:
1 - Add three items:
    barcode TEST1 callnumnber D1015.B4 1965
    barcode TEST2 callnumnber D102.D3 1930
    barcode TEST3 callnumnber D101.2.A8 1951
2 - Go to item search
3 - barcode is 'TEST%'
4 - Sort the results by callnumber
5 - order is TEST3,TEST1,TEST2 (or reversed depending on sort direction)
6 - Apply patch, restart_all
7 - sort again
8 - order is TEST3,TEST2,TEST1 (or reversed depending on sort direction)

Signed-off-by: Gretchen Maxeiner <maxeinerGL@gcc.edu>
Signed-off-by: Heather Hernandez <flyingendpaper@gmail.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 eecb123bd5)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:31 +02:00
Nick Clemens 13471ab545
Bug 14907: Unit tests
Signed-off-by: Gretchen Maxeiner <maxeinerGL@gcc.edu>

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 ef9c0f6872)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:31 +02:00
Martin Renvoize 20daebce79
Bug 38646: (follow-up) Ensure consistent ordering of languages
We add an `ORDER BY` clause to the SQL statement to ensure we
consistently order accross databases by the iso code.

This fixes the failing test on MariaDB as it's default sort order
appears to differ from MySQL for this.

This also ensure we are consistently ordering which will lead to more
consistent and clear results for end users.

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7da684a507)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:30 +02:00
Martin Renvoize e68d757bdb
Bug 38646: Update unit test for change
This drops the bracketed translation in the tests in
language_description where the bracketed language name matches the
preceeding one.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 6e59b40f55)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:29 +02:00
Martin Renvoize f57011dc2e
Bug 38646: (QA follow-up) Fix ONLY_FULL_GROUP_BY
We can use a plain AND in the WHERE clause here rather than requireing a
HAVING.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 24379efb10)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:29 +02:00
Michał Kula 1644149866
Bug 38646: rewrite C4::Languages::getLanguages to use a single cachable SQL query
My profiling with NYTProf has found that the call to C4::Languages::getLanguages is unreasonably slow, taking over 100 ms (and that's just on a single call of it apparently!!!). Indeed, the way it's coded, it'd run over 540 SQL queries for no good reason, slowing the already slow catalog search page loading further down.

This patch is gonna replace the inefficient and complicated function logic with proper SQL statement that joins the relevant functions. It also fixes the bug where user's native language would be displayed with native language in the parenthesis as well, such as "Polski (Polski)" instead of just "Polski".

The whole query is pretty fast and it gets cached by MySQL server, meaning its runtime is measured in microseconds instead of hundreds of miliseconds, making it easily a 1000x+ improvement.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 26a6e476f1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:28 +02:00
Martin Renvoize a62f249b75
Bug 38646: Improve unit test coverage
This patch adds proper coverage of getLanguages() to the existing test
file.

It should pass prior to applying the rest of the patchset of this bug

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 08bd56d1f7)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:27 +02:00
Paul Derscheid b1ec75d802
24.11.04: Update contributors.yaml
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-22 23:01:05 +02:00
Lucas Gass 5f871921ba
Bug 39283: Concat middle name with preffered name if it exists
1. Have a patron with a middle name
2. Do a patron search that brings them up, no middle name appears
3. APPLY PATCH
4. Try again, middle name should appear in patron searches.

QA follow-up: made the same fix inline for other_name

Signed-off-by: Bibliothèque Ifao <bibliotheque@ifao.egnet.net>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3888d1ee7a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-17 14:30:36 +02:00
Jonathan Druart d90814bf03
Bug 39077: Do not complain about obsolete translations
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8c0d196ff6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-17 14:30:36 +02:00
Jonathan Druart ac57c62b15
Bug 34068: Mock RESTdefaultPageSize
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 27ea32e74b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-04-17 14:30:36 +02:00