Commit Graph

58833 Commits

Author SHA1 Message Date
Owen Leonard b333397914
Bug 40366: Update the label export process to avoid Greybox modal
This patch updates the label export process to eliminate the use of the
Greybox modal, opting to move from page to page through the process.

Tangentially related: I updated the DataTables table configuration of
the tables on the label batch management page and label batch edit page
in order to remove the DataTables "Export" button because of the
possibility that its presence might be confusing.

To test apply the patch and go to Cataloging -> Label creator.

- Create more than one batch  add multiple items to each.
- From the label batches page, test the process of exporting labels,
  observing at each step the page title and breadcrumbs.
  - Check a box next to a single batch and click the "Export selected"
    button at the bottom.
  - Check multiple boxes and click "Export selected."
  - Click "Edit" on one of the batches
    - In the list of items, check one or more checkboxes, and click
      "Export select items."
    - Click an individual "Export" button from the list of items.
    - Click "Export full batch"
- In each case, you should be forwarded to a new page for choosing label
  options.
  - After submitting the form, you should be forwarded to another page
    where you have options for downloading the batch as a PDF, CSV, or
    XML.
- Test the new "Return to label batches" to confirm that it takes you to
  the label batches page.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 14:30:55 -06:00
Owen Leonard 31022ba0c5
Bug 40412: (follow-up) Remove inclusion of greybox.inc
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 14:30:54 -06:00
Owen Leonard a4db827cf1
Bug 40412: Update the patron card export process to avoid Greybox modal
This patch updates the patron card export process to eliminate the use
of the Greybox modal, opting to move from page to page through the
process.

Tangentially related: I updated the DataTables table configuration of
the tables on the patron card batch management page and patron card
batch edit page in order to remove the DataTables "Export" button
because of the possibility that its presence might be confusing.

To test apply the patch and go to Tools -> Patron card creator.

- Create more than one batch add multiple patrons to each.
- From the patron card batches page, test the process of exporting
  patron cards, observing at each step the page title and breadcrumbs.
  - Check a box next to a single batch and click the "Export selected
    batches" button at the bottom.
  - Check multiple boxes and click "Export selected batches."
  - Click "Edit" on one of the batches
    - In the list of patrons, check one or more checkboxes, and click
      "Export selected card(s)."
    - Click an individual "Export" button from the list of patrons.
    - Click "Export card batch".
  - Select a list from the "Patron list" dropdown and click "Export from
    patron list."
- In each case, you should be forwarded to a new page for choosing
  patron card options.
  - After submitting the form, you should be forwarded to another page
    where you can download the batch as a PDF.
- Test the new "Return to patron card batches" to confirm that it takes
  you to the patron card batches page.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 14:30:53 -06:00
Owen Leonard d40c432ea0
Bug 40221: Replace layout tables for component part display - OPAC
This patch updates the display of component parts on the bibliographic
detail pages in both the staff interface and OPAC. Table markup isn't
necessary to display simple rows of content.

To test, apply the patch and locate a record in the catalog with
component parts. (See Bug 11175 for sample record).

Look at the detail page for the record, under the components tab, in
both the OPAc and staff interface. In both cases the information should
be clearly displayed.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Noah Tremblay <noah.tremblay@inlibro.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 14:30:36 -06:00
Jonathan Druart c62b4a031e
Bug 40774: Fix content type description
The authorised value category for 'EBook' is not defined.

Signed-off-by: Christian Nelson <christian.nelson@uwasa.fi>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 13:52:12 -06:00
Jonathan Druart 7cd822031a
Bug 40774: Fix get_lib_from_av calls
The authorised value category for 'authorisedValues.av_title_publication_types' is not defined.

Signed-off-by: Christian Nelson <christian.nelson@uwasa.fi>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 13:52:11 -06:00
Jonathan Druart af8efd85ec
Bug 40774: Fix EBSCO's package list view
TypeError: can't access property "authorised_values", e.type is undefined
Signed-off-by: Christian Nelson <christian.nelson@uwasa.fi>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 13:52:10 -06:00
Nick Clemens f7897d7d81
Bug 31460: Merge item groups when merging records
Test:
1. Have a record (A) with 3 items.
2. Create an item group with 2 of these items.
3. Have a second record (B) with 4 items
4. Create an item group with 2 of these items.
5. Merge the two records together keeping record A
6. Results will show that all items are moved over to record A, but the item group from record B, is not there.
7. Apply patch
8. Create a new record (C) with 3 items.
9. Create an item group with 2 of these items
10. Merge this into record A
11. The item groups are moved!

Signed-off-by: Miranda Nero <mnero@oslri.net>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 13:52:09 -06:00
Tomás Cohen Arazi 18ff4d4933
Bug 40812: Move Theke sample plugin repo to GitHub
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 13:52:09 -06:00
Julian Maurice 4df64c79f0
Bug 39980: Add license and POD to Koha::App::Controller::CGI
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 13:52:08 -06:00
Jonathan Druart ad3ca52450
Bug 39980: Add Test::NoWarnings
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 13:52:07 -06:00
Julian Maurice 54f84f232a
Bug 39980: Add tests for .../acquisition/vendors* in Mojo context
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 13:52:06 -06:00
Julian Maurice b92fda21ce
Bug 39980: Fix vendors pages when using Koha as a Mojo app
Bug 38010 broke the vendors pages when Koha is running as a Mojolicious
application

This adds new routes to Koha::App::Intranet to mimic the Apache rewrite
rules added in bug 38010.

To be able to do that, the CGIBinKoha plugin's code had to be moved to a
controller. The logic remains the same.

Test plan:
1. Run `bin/intranet daemon -l http://*:3000/`
2. Point your browser to http://localhost:3000 (replace localhost by the
   hostname/IP of koha's container, if needed)
3. Go to Acquisitions and search for a vendor. You should see the list
   of vendors.
4. Click on "New vendor" button. Notice the URL changed to
   .../acquisition/vendors/add.
5. Reload the page. You should still see the form to create a new vendor
6. Verify that you can create a vendor and that you are then redirected
   to the list of vendors

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 13:52:06 -06:00
Owen Leonard 46ed6fbc04
Bug 40612: Eliminate duplicate element id in OPAC language menus
This patch updates the include file used to display the OPAC language
menu in the header and footer. The include already makes use of a
"context" variable which tells it whether it's in the header or footer.
We can use the same logic to give unique ids for each instance.

To test, apply the patch and rebuild the OPAC CSS.

- Go to Administration -> System preferences -> OpacLangSelectorMode and
  set it to "both top and footer."
- Go to the OPAC and inspect the HTML for each language menu. The one in
  the header should have the id "header_langmenu." The one in the footer
  should have "footer_langmenu."

Sponsored-by: Athens County Public Libraries
Signed-off-by: Ludovic Julien <ludovic.julien@inLibro.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 13:52:05 -06:00
Jake Deery 14c25fe64e
Bug 40780: Advsearch ButtonMinus moves focus to next or prev line
This patch will cause the ButtonMinus button on each of the advsearch
fieldsets to jump the focus to the next or previous line, whichever is
available. This is in response to a recent accessibility audit performed
by one of our customers. Thanks!

TO TEST:
a)  go to /cgi-bin/koha/opac-search.pl?expanded_options=1
b)  click / tab onto the ButtonMinus next to a field, click / press
enter
c)  notice how the focus disappears
APPLY PATCH
d)  repeat steps a-b
e)  notice how the focus now either goes to the next line (if available)
or the previous line (otherwise)
SIGN OFF

Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 13:52:04 -06:00
Jake Deery 0c6402b951
Bug 40782: Selections toolbar checkbox now adds tabindex -1
This patch now sets tabindex to -1 if a disabled class is applied to a
control, and removes it when the class evaporates. This improves
accessibility by making these disabled items non-focusable.

To test:
a)  make a search on the OPAC
b)  tab through the selections toolbar, notice how visually disabled
    items are focusable
APPLY PATCH
c)  repeat steps a-b, notice how the elements are no longer focusable
SIGN OFF

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Bug 40782: (follow-up) Tidy results-list.js

Tidy converts single quotes to double quotes

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 13:52:03 -06:00
David Cook 9278eed6f2
Bug 40689: Fix "Damaged status" and "Lost status" on moredetail.pl
This change just repairs moredetail.tt to re-apply the fix from bug 16157
which seems to have only been partially applied back in 2016.

Test plan:
0. Apply the patch
1. Set the "Damaged status", "Withdrawn status", and "Lost status" for an item
2. Create a user that only has "catalogue" permission and log in as them
3. Go to /cgi-bin/koha/catalogue/moredetail.pl?biblionumber=<biblionumber from item>
4. Note how "Withdrawn status", "Lost status", and "Damaged status" all appear now

Signed-off-by: Noah Tremblay <noah.tremblay@inlibro.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 13:52:02 -06:00
Pedro Amorim e9713e5a03
Bug 40734: Fix creating new library with additional fields
Test plan, dont apply patch yet:
1. Go to Administration > Additional fields > Libraries (branches) > New field
2. Enter a name for the field
3. Click Save
4. Go to Administration > Libraries > New library
   --> The form does not contain the additional field
5. Apply patch. Repeat.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 13:52:02 -06:00
Lucas Gass a1bf7e1ab9
Bug 40763: Swap alert-info class with alert-warning class
1. Go to SCO
2. Login but use the wrong password
3. The alert appears "You entered an incorrect username or password. Please try again! But note that passwords are case sensitive. Please contact a library staff member if you continue to have problems."
4. This alert is in a blue box with the class alert-info
5. APPLY PATCH
6. Try again, the box should be yellow with the alert-warning class.

Signed-off-by: Noah Tremblay <noah.tremblay@inlibro.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 13:52:01 -06:00
David Cook c5a9f270ba
Bug 40702: Add missing "Title" header in Inventory csv export
This patch adds a missing "Title" header in the Inventory csv export.

Test plan:
0. Apply the patch and koha-plack --restart kohadev
1. Go to http://localhost:8081/cgi-bin/koha/tools/inventory.pl
2. Check the "Export to CSV file" checkbox and click "Submit"
3. In the export, note that the A1 cell now says "Title"

Signed-off-by: Noah Tremblay <noah.tremblay@inlibro.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 13:52:00 -06:00
Owen Leonard 97226193a6
Bug 40602: Broken HTML showing in Alert 'subscriptions' tab
This patch adds handling of the "no-html" flag to patron-title.inc. The
OPAC alert subscriptions page passes the "no-html" flag but the include
file wasn't written to include it.

To test, apply the patch and log in to the OPAC as a user who has a
title (salutation).

- Add a serial subscription and set a notification template
- Go to the OPAC and subscribe to the email notification for this
  subscription
- Go to the patron account > Alert subscriptions tab
- Verify that the last column shows an "Unsubscribe from email alerts"
  button.
- There should be no errant HTML.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Noah Tremblay <noah.tremblay@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 13:51:59 -06:00
Jonathan Druart 3b041f4cf0
Bug 40803: Remove two unused parameter
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 13:51:58 -06:00
Nick Clemens 0219e4baf8
Bug 40803: Use submit form link to submit renewals from overdue items tab in opac user account
To test:
1 - Check out an item to a patron, backdated to be overdue
2 - Log in as that user to the OPAC
3 - From 'Your summary' - click the overdue tab, click renew
4 - 500 Error
5 - Apply patch
6 - Reload the page and repeat
7 - Success!

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 13:51:58 -06:00
David Cook b572ae29eb
Bug 40523: Remove unused variable from datatables.js
This change removes an unused variable from datatables.js

Test plan:
0. Apply the patch
1. Go to http://localhost:8080/cgi-bin/koha/opac-main.pl
2. Search for this payload: "abc123"
3. Click on "Search history" in the top right corner of the screen
4. Click ""CSV", "Copy", and "Print" on the "Current session" toolbar
5. Note that all the buttons work as expected

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 13:51:57 -06:00
David Cook 0b6f7a2701
Bug 40773: Do not map "vue/dist" files in Makefile
This change ensures that "vue/dist" files are not mapped into
the pm_to_blib target of the Makefile, so that they are only handled
by the explicit compile steps in the top targets of the Makefile.

Test plan:
0. Apply the patch
1. perl build-resources.PL
2. ls ./koha-tmpl/intranet-tmpl/prog/js/vue/dist
3. Note that files are present
4. perl Makefile.PL
5. Take all the defaults
6. vi Makefile
7. Search for vue\/dist
8. Note that the only hit is for "cp -r koha-tmpl/intranet-tmpl/prog/js/vue/dist
blib/INTRANET_TMPL_DIR/prog/js/vue/"

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 13:51:56 -06:00
Jonathan Druart f3145ca5ff
Bug 39740: Fix adjust_paths_git_install in koha-es-indexer
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 13:51:55 -06:00
Marcel de Rooy 968339b7c9
Bug 39740: (QA follow-up) Adjust debugger for koha-plack and koha-z3950-responder
This patch mainly renames var debug_mode in both scripts when it refers
to the debugger instead of the instance's debug_mode.

Note: Removing $environment from responder, probably copied.

Test plan:
cp debian/scripts/koha-functions.sh /usr/share/koha/bin/
cp debian/scripts/koha-* /usr/sbin/
cp debian/templates/plack.psgi /etc/koha/plack.psgi
Repeat steps from patch: "Replace envvar check by calling..."
Repeat steps from patch: "Adjust koha-plack and koha-z3950-responder"

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 13:51:54 -06:00
Marcel de Rooy 0b0eb6bc14
Bug 39740: (QA follow-up) Rename test_system/TEST_SYSTEM
See comment30 and comment36.
Result of two sed's:
  git grep -l test_system | xargs sed -i -e "s/test_system/debug_mode/g"
  git grep -l TEST_SYSTEM | xargs sed -i -e "s/TEST_SYSTEM/DEBUG_MODE/g"

The next patch will take care of the debugger options in the plack and
z3950 responder scripts.

Test plan:
Read the patch. (Testing in next patch.)
git grep -i test_system

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 13:51:54 -06:00
Marcel de Rooy c0c99f63cd
Bug 39740: Adjust koha-conf.xml
Test plan:
Look at changes in this patch.
Note that we already tested these settings with former patches.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 13:51:53 -06:00
Marcel de Rooy 55c57af5b6
Bug 39740: Adjust koha-plack and koha-z3950-responder
Changes to koha-plack
- Check is_test_system and -development for stack trace
- Add check on set $environment for debugger
- Move export to do_instance, remove three local's

NOTE: GIT_INSTALL ie exported for koha-plack ONLY! The debian
scripts call is_git_install.

Changes to koha-z3950-responder
- debugger needs test_system flag
- Rearrange exports before calling start_z3950 and friends.

Test plan:
Check/adjust git_install and test_system in koha-conf.xml for used
instances.
cp debian/scripts/koha-functions.sh /usr/share/koha/bin/
cp debian/scripts/koha-* /usr/sbin/
cp debian/templates/plack.psgi /etc/koha/plack.psgi
Add a die in e.g. opac/opac-main.pl.
Set test_system to 1 in koha-conf.xml or export TEST_SYSTEM=1 in your environment.
Restart Plack.
Hit opac-main. Do you see a stack trace?
Export TEST_SYSTEM=0. Restart Plack.
Hit opac-main again. You should not see a stack trace.

Start koha-z3950-responder with/without debug flag. Works as expected?

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 13:51:52 -06:00
Marcel de Rooy 1aed2204ab
Bug 39740: Replace envvar check by calling is_git_install on instance level
Replace the $GIT_INSTALL check by is_git_install.
Some scripts did call is_git_install once while potentially looping over
multiple instances.

Note: koha-reset-passwd only runs on one instance (unlike most).

Test plan:
Check/adjust git_install and test_system in koha-conf.xml for used
instances.
cp debian/scripts/koha-functions.sh /usr/share/koha/bin/
cp debian/scripts/koha-* /usr/sbin/
Note: We will still test koha-plack and -z3950-responder later.
Test running a few of the other changed koha-* scripts on one or more
instances. Verify that things work as expected.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 13:51:51 -06:00
Marcel de Rooy c41ba6ca06
Bug 39740: Fix a few occurrences of dev_install in code
Test plan:
Check if git_install is set correctly for your system
in koha-conf.xml. Adjust otherwise.
cp debian/scripts/koha-functions.sh /usr/share/koha/bin/
cp debian/scripts/koha-* /usr/sbin/
Run koha-shell your_clone. Does that works like expected?
Run t/Koha/Config.t.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 13:51:51 -06:00
Marcel de Rooy ce972e5c33
Bug 39740: Replace DEV_INSTALL by GIT_INSTALL
Resulting from the following sed statement:
  git grep -l DEV_INSTALL | xargs sed -i -e "s/DEV_INSTALL/GIT_INSTALL/g"

Test plan:
Read the patch.
The scripts will be tested later on.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 13:51:50 -06:00
Marcel de Rooy b020689bcc
Bug 39740: Rename function to adjust_paths_git_install
Logical follow-up for moving away from dev_install to git_install.
Result of running
  git grep -l adjust_paths_dev_install | xargs sed -i -e "s/adjust_paths_dev_install/adjust_paths_git_install/g"

Test plan:
Read the patch.
The scripts will be tested later on.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 13:51:49 -06:00
Marcel de Rooy b627f950c7
Bug 39740: Add is_git_install and is_test_system
Test plan:
Copy koha-functions.sh to /usr/share/koha/bin.
Source bin/koha-functions.sh ('. bin/koha-functions.sh')

Test in bash (Yes expected; adjust instance name):
    GIT_INSTALL=1; if is_git_install your_instance; then echo Yes; fi
Add/set git_install to 1 in koha-conf.xml.
Test in bash (Yes expected):
    unset GIT_INSTALL; if is_git_install your_instance; then echo Yes; fi
Set git_install to 0 in koha-conf.xml.
Test in bash (No expected):
    unset GIT_INSTALL; if ! is_git_install your_instance; then echo No; fi
Remove git_install and add/set dev_install to 1 in koha-conf.xml.
Test in bash (Yes expected):
    unset GIT_INSTALL; if is_git_install your_instance; then echo Yes; fi

A few similar tests with test_system.
Add/set test_system to 0 in koha-conf.xml.
Test in bash (Yes expected):
    TEST_SYSTEM=1; if is_test_system your_instance; then echo Yes; fi
Test in bash (No expected):
    unset TEST_SYSTEM; if ! is_test_system your_instance; then echo No; fi

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 13:51:48 -06:00
Jonathan Druart e1116df2c1
Bug 40453: Do not rely on hardcoded index
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 13:51:47 -06:00
Owen Leonard 87cf42e4b4
Bug 40453: Allow newly-added item type translations to be edited
This patch updates the item type translation page so that newly-added
rows are editable.

To test you must more than one installed translation.

- Apply the patch and go to Administration -> Item types.
- Edit an item type and click "Translate into other languages."
- If you already have translations for your installed languages, delete
  them.
- Add a new translation.
- In the newly added table row, click the value in the "Language"
  column. A dropdown should appear and changing the language should
  work.
  - Cliking away from the table cell should replace the dropdown with
    the language code you selected.
- Click the value in the "Translation" column. The table cell should
  become editable. Edit the text and tab out of the field. Your edit
  should be saved.
- Reload the page to confirm that everything looks correct.

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Flater <flaterdavid@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 13:51:47 -06:00
Owen Leonard 7547b6376b
Bug 40418: (follow-up) Remove popup flag from INCLUDE
Signed-off-by: David Flater <flaterdavid@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 13:51:46 -06:00
Owen Leonard 9910950af4
Bug 40418: Update the item type translation process to avoid Greybox modal
This patch updates the item type translation process so that it takes
place on a separate standalone page instead of in a Greybox modal.

Although currently only item types can be translated in this way, the
original plan was to expand the range of data that could be translated.
For this reason I used [% SWITCH %] in localization.tt for determining
whether to use the term "item type." This accommodates, I hope,
expansion of the feature.

To test you must have more than one installed translation.

- Apply the patch and go to Administration -> Item types.
- Edit an item type.
- On the "Description" line, click "Translate into other languages."
- You should be redirected to a new page, "Add translations for item
  type 'XXX.'
- Confirm that the page title, breadcrumbs, and heading are correct.
- Test the process of adding and deleting a translation.
- Test the process of performing an inline edit of an existing
  translation by clicking the table cell.
- Test that the "Return to item type 'XXX'" button returns you to the
  item type you were editing.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-18 13:51:36 -06:00
Jonathan Druart 1516f227f9
Bug 40665: Fix Cypress tests
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2025-09-11 11:35:45 +02:00
Jonathan Druart ec2fbf3a4d
Bug 40765: Fix EDI.t
I have no idea why this is fixing the test!

Without this patch they fail:

t/db_dependent/Koha/EDI.t .. 1/5
    #   Failed test '14 log lines recorded for passed invoice file'
    #   at t/db_dependent/Koha/EDI.t line 725.
    #          got: '12'
    #     expected: '14'

    #   Failed test 'Warn recorded for transferring items'
    #   at t/db_dependent/Koha/EDI.t line 728.
    #                   'Unmatched item at branch:WID'
    #     doesn't match '(?^u:transferring.*)'

    #   Failed test 'Warn recorded for transferring items'
    #   at t/db_dependent/Koha/EDI.t line 728.
    #                   ''
    #     doesn't match '(?^u:transferring.*)'

    #   Failed test 'Warn recorded for unmatched item'
    #   at t/db_dependent/Koha/EDI.t line 728.
    #                   ''
    #     doesn't match '(?^u:Unmatched item at branch:.*)'
    # Looks like you failed 4 tests of 32.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-09 09:37:10 -06:00
Jonathan Druart 621b75ddf0
Bug 40765: Prevent acquisition tests to fail if order.quantity = 0
When using TestBuilder to build an order the tests will fail when the object will be saved:

00:09:41 koha-1      |     # Looks like you planned 58 tests but ran 26.
00:09:41 koha-1      |
00:09:41 koha-1      | #   Failed test 'cancel() tests'
00:09:41 koha-1      | #   at t/db_dependent/Koha/Acquisition/Order.t line 1042.
00:09:41 koha-1      | Cannot insert order: Mandatory parameter quantity is missing at t/db_dependent/Koha/Acquisition/Order.t line 868.
00:09:41 koha-1      | # Looks like your test exited with 255 just after 14.
00:09:41 koha-1      | [22:03:54] t/db_dependent/Koha/Acquisition/Order.t

This happened on Koha_Main/3350

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-08 11:35:55 -06:00
Jonathan Druart 3f337c53ee
Bug 22632: Prevent tests to fail randomly
Jenkins was failing on Koha_Master/3350

With this patch we won't rely on the order (timestamp are identical and
may not be sorted as expected)

23:56:28 koha-1      |     #   Failed test 'GetLogs returns results in the log viewer for the merge of 526'
23:56:28 koha-1      |     #   at t/db_dependent/Koha/Patron/Log.t line 67.
23:56:28 koha-1      |     #          got: 'G7X8jre jVr_oz8M (eQXWiW9b4jX16424uC3Chn) has been merged into Mwqx7a zkSkFX7 (y_L7flupzFShb8JWYVCwYGSuv)'
23:56:28 koha-1      |     #     expected: 'exgnQtw lLmxQL9eWY (nHc_VZdFHIXr90p6WrIijDPgFrz8JM38) has been merged into Mwqx7a zkSkFX7 (y_L7flupzFShb8JWYVCwYGSuv)'
23:56:28 koha-1      |
23:56:28 koha-1      |     #   Failed test 'GetLogs returns results in the log viewer for the merge of 527'
23:56:28 koha-1      |     #   at t/db_dependent/Koha/Patron/Log.t line 82.
23:56:28 koha-1      |     #          got: 'exgnQtw lLmxQL9eWY (nHc_VZdFHIXr90p6WrIijDPgFrz8JM38) has been merged into Mwqx7a zkSkFX7 (y_L7flupzFShb8JWYVCwYGSuv)'
23:56:28 koha-1      |     #     expected: 'G7X8jre jVr_oz8M (eQXWiW9b4jX16424uC3Chn) has been merged into Mwqx7a zkSkFX7 (y_L7flupzFShb8JWYVCwYGSuv)'
23:56:28 koha-1      |     # Looks like you failed 2 tests of 4.
23:56:28 koha-1      |
23:56:28 koha-1      | #   Failed test 'Test Koha::Patrons::merge'
23:56:28 koha-1      | #   at t/db_dependent/Koha/Patron/Log.t line 113.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-08 11:35:47 -06:00
Lucas Gass 95863d9de5
Bug 31698: DBRev 25.06.00.016
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-05 15:10:46 -06:00
Lucas Gass b5c520104c
Bug 31698: Add alter_hold_targets to t/Koha/Auth/Permissions.t
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-05 15:10:46 -06:00
Lucas Gass 3c94c093c0
Bug 31698: Make strings in holds.js translatable
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-05 15:10:45 -06:00
Pedro Amorim c55eb574ad
Bug 31698: (QA follow-up): Prevent display 'NaN' UI error message
If the input is not a number, display an appropriate error message.
Additionally, don't make an API call unless the input is a number.

Test by doing the following:
1) Step 19: Moving record level holds, the modal says 'Enter the biblionumber of new hold target', but if you enter 'xyz' and then search, the error shown is 'No item found with barcode: NaN'.

This patch fixes that.

Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-05 15:10:45 -06:00
Lucas Gass ed5faedae9
Bug 31698: Move reamining JS to hold.js
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-05 15:10:44 -06:00
Lucas Gass 283c45e946
Bug 31698: Move request.tt JS to hold.js
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-05 15:10:44 -06:00
Lucas Gass 715bb4a715
Bug 31698: Report errors and failures back to request.tt
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-09-05 15:10:43 -06:00