Commit Graph

59995 Commits

Author SHA1 Message Date
Pedro Amorim 5a133c8756
Bug 39320: (QA follow-up): Add an empty drop area placeholder
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>
2026-01-13 15:03:29 -07:00
Jonathan Druart 1a5de8d08f
Bug 39320: (follow-up) Add counts API tests
Prevent tests to fail if data in DB

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>
2026-01-13 15:03:29 -07:00
Pedro Amorim aab1c7e37e
Bug 39320: (QA follow-up): Use escape_str instead of .escapeHtml
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>
2026-01-13 15:03:28 -07:00
Pedro Amorim aefe6a8a51
Bug 39320: (QA follow-up): Add a handler for drag and drop
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>
2026-01-13 15:03:28 -07:00
Pedro Amorim 70b276c1d2
Bug 39320: (QA follow-up): Fix cypress
These tests have always passed for me running cypress on UI, before and after this patch.
CLI tests however, were flaky and often times failed.
It appears this is because each module refresh was flooding the server with HTTP requests causing the whole thing to bottleneck (?)
With this patch, all widget requests are stubbed for every widget test, and tests now pass on CLI consistently. Passed 10/10 for me, whereas before it failed more often than passed.

Run this:
for i in {1..10}; do   cypress run --spec t/cypress/integration/ERM/ModuleDashboard_spec.ts; done

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>
2026-01-13 15:03:27 -07:00
Pedro Amorim d782eebd91
Bug 39320: (QA follow-up): Removed unused show event
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>
2026-01-13 15:03:27 -07:00
Pedro Amorim d14eb00f05
Bug 39320: (QA follow-up) Prevent full page reload when clicking a license
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>
2026-01-13 15:03:26 -07:00
Pedro Amorim 44c65be394
Bug 39320: (QA follow-up): Fix counts links
Use router-link instead of href='#'

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>
2026-01-13 15:03:26 -07:00
Pedro Amorim e491363020
Bug 39320: (QA follow-up): Use localStorage instead of vue-cookies
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>
2026-01-13 15:03:25 -07:00
Pedro Amorim fc73aea182
Bug 39320: (QA follow-up): Add counts API tests
prove t/db_dependent/api/v1/erm_counts.t

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>
2026-01-13 15:03:25 -07:00
Pedro Amorim 6d839d199b
Bug 39320: (QA follow-up): Remove deep CSS rules
This CSS is in vue.css anyway

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>
2026-01-13 15:03:24 -07:00
Matt Blenkinsop 2fdce21dff
Bug 39320: Remove 'extends' from the Home component
Sponsored-by: UKHSA (UK Health Security Agency)

Signed-off-by: Jeremy Evans <Jeremy.Evans@ukhsa.gov.uk>
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>
2026-01-13 15:03:24 -07:00
Pedro Amorim b0c1a3d973
Bug 39320: (follow-up) Add 'move up' and 'move down' options
Sponsored-by: UKHSA (UK Health Security Agency)

Signed-off-by: Jeremy Evans <Jeremy.Evans@ukhsa.gov.uk>
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>
2026-01-13 15:03:23 -07:00
Pedro Amorim 188ab18ef0
Bug 39320: Preparation: Add base and wrapper components
As well as wrapper support components
base-widget.js composable

Sponsored-by: UKHSA (UK Health Security Agency)

Signed-off-by: Jeremy Evans <Jeremy.Evans@ukhsa.gov.uk>
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>
2026-01-13 15:03:23 -07:00
Pedro Amorim c42187c9c5
Bug 39320: Add Cypress tests
Test plan:
1) Enable ERMModule
2) Visit ERM:
<staff_url>/cgi-bin/koha/erm/erm.pl
3) Notice you now have a 'dashboard' homepage showing 4 different widgets
4) Click 'Open Widget Picker'. Remove and add different widgets. Close
5) Drag and drop the widgets around the dashboard, from left to right, top to bottom
6) Click the context menu (vertical dots) on each of the widgets. Click 'move to right', 'move to left', 'remove'.
7) On the 'Licenses needing action', notice there is a 'Settings' item option. Click that, test different settings values. Close settings.
8) Using the widget picker or context menu for the respective widgets, remove all widgets except one. Click away i.e. 'Agreements' on the left menu. Go back to home by clicking 'Home'. Notice your dashboard is as you left it.
9) Enable all widgets, rearrange them by dragging and dropping in different places. Repeat the previous exercise. Notice the dashboard keeps the widgets arranged as you left them.
10) Add some test data, on k-t-d run:
bash <(curl -s a0347d4199/bug_39320_test_data.sh)
11) Refresh the homepage dashboard, check the 'Counts' are correct and links work, check that the 'Latest SUSHI Counter jobs' table now populates and links to the data provider as well as respective job.
12) For 'Licenses needing action', test different settings values and confirm the table filters the results as expected.
13) As before, click away and comeback to ERM home. Notice your 'Licenses needing actions' settings are kept as you left them.
14) For the 'eUsage report' widget, notice it says 'No saved reports are availble to run'. Create a new usage report at:
<staff_url>/cgi-bin/koha/erm/eusage/reports
15) Click the 'Create report' tab, input the mandatory fields and enter a report name at the bottom of the page. Click 'Save report'.
16) Come back to ERM home. Notice the 'eUsage report' widget now shows a dropdown with a disabled 'Run' button.
Pick the report you just created. Notice the 'Run' button is now enabled. Click 'Run'. Notice you get the report results screen (will show nothing as there is no usage data in this test exercise).
17) k-t-d: Run cypress tests (reset_all beforehand to clear test data):
cypress run --spec t/cypress/integration/ERM/ModuleDashboard_spec.ts

Sponsored-by: UKHSA (UK Health Security Agency)

Signed-off-by: Jeremy Evans <Jeremy.Evans@ukhsa.gov.uk>
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>
2026-01-13 15:03:22 -07:00
Pedro Amorim 80d3b877d1
Bug 39320: Add 'home' left menu item to ERM
This is a bit hacky, but after hours of fighting with this I wasn't able to come up with a better soltuion.
I suspect stores/navigation.js is doing too much and changing too much of the default router-link behaviour but I may be wrong.

Sponsored-by: UKHSA (UK Health Security Agency)

Signed-off-by: Jeremy Evans <Jeremy.Evans@ukhsa.gov.uk>
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>
2026-01-13 15:03:22 -07:00
Pedro Amorim 28f75caa48
Bug 39320: Add FA icons to ERM
Would be great to improve the way we load icons to be available
everywhere in Vue instead of just the specific module but on a different
scope.

Sponsored-by: UKHSA (UK Health Security Agency)

Signed-off-by: Jeremy Evans <Jeremy.Evans@ukhsa.gov.uk>
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>
2026-01-13 15:03:21 -07:00
Pedro Amorim 4308261d62
Bug 39320: Add dashboard to ERM home
Sponsored-by: UKHSA (UK Health Security Agency)

Signed-off-by: Jeremy Evans <Jeremy.Evans@ukhsa.gov.uk>
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>
2026-01-13 15:03:21 -07:00
Pedro Amorim 6bbe1794f8
Bug 39320: Add ERM specific dashboard widgets
Sponsored-by: UKHSA (UK Health Security Agency)

Signed-off-by: Jeremy Evans <Jeremy.Evans@ukhsa.gov.uk>
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>
2026-01-13 15:03:20 -07:00
Pedro Amorim e7ad97908b
Bug 39320: Preparation: ERM counts API endpoint
Required for the follow-up ERMCounts widget

Sponsored-by: UKHSA (UK Health Security Agency)

Signed-off-by: Jeremy Evans <Jeremy.Evans@ukhsa.gov.uk>
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>
2026-01-13 15:03:20 -07:00
Pedro Amorim f417b4ca0c
Bug 39320: VueJS framework: Add option to have a component in dialog
Sponsored-by: UKHSA (UK Health Security Agency)

Signed-off-by: Jeremy Evans <Jeremy.Evans@ukhsa.gov.uk>
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>
2026-01-13 15:03:19 -07:00
Pedro Amorim 3e5ce26d5e
Bug 39320: Add new npm dependencies:
vue-draggable-next
vue-cookies

Sponsored-by: UKHSA (UK Health Security Agency)

Signed-off-by: Jeremy Evans <Jeremy.Evans@ukhsa.gov.uk>
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>
2026-01-13 15:03:19 -07:00
Lari Taskula 61dc0bd36d
Bug 32483: Add OPAC notification on pending patron modification request
To test:
1. Apply patch
2. In OPAC, submit updates to your patron details under "Personal
   details"
3. Navigate back to "Personal details"
4. Observe text "Your have recently submitted updates to your personal
   details. A librarian will review your updates before applying them."
5. In staff client, approve modification changes
6. Navigate back to OPAC "Personal details"
7. Observe the notification has disappeared

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-13 15:03:12 -07:00
Lucas Gass b98f920541
Bug 38262: (follow-up) Add extended_attributes and _strings when inserting test data
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-13 13:52:06 -07:00
Matt Blenkinsop 070029e959
Bug 38262: (follow-up) Check for extended attributes before iterating
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-13 10:12:28 -07:00
Marcel de Rooy 5b5e402c20
Bug 40993: (follow-up) Add changes to etc/koha-httpd.conf
Good to have a test :)

Test plan:
Run xt/check_apache_conf.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-13 10:12:21 -07:00
David Cook 08bd622b25
Bug 40993: (QA follow-up) use L flag to stop the rewrite after PT action
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-12 10:53:37 -07:00
Marcel de Rooy 4209136411
Bug 40993: Add Apache RewriteRule for hitting value_builder pages
Test plan:
Copy this file to /etc/koha.
Restart Apache.
Login to staff and hit a value builder page directly, e.g.:
YOUR_SERVER/cgi-bin/koha/cataloguing/value_builder/marc21_field_005.pl
Verify that you got redirected to 403.
Verify that you can still edit a biblio record and open e.g. the leader
plugin form.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-12 10:53:36 -07:00
Jonathan Druart e8f4637f84
Bug 38262: (bug 38446 follow-up) Use a dedicated endpoint
Following what has been done on bug 38262 we need a separate endpoint to
retrieve additional fields for vendors.

We add another proxy for acquisition in acquisition-api-client: we do
not want to retrieve all the fields for acquisition as we have more
granular permissions than ERM.

Signed-off-by: Michaela <michaela.sieber@kit.edu>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-12 10:53:36 -07:00
Matt Blenkinsop 52c3b54269
Bug 38262: Add additional fields UI support for acquisition vendors
Updates staff interface to expose additional fields functionality for
vendor records:
- Adds "Vendors" (aqbooksellers:vendor) to searchable tables list in
  additional fields administration page
- Configures VendorResource.vue to fetch extended_attributes with
  proper embeds (+strings for localized values)
- Sets extendedAttributesFieldGroup to display fields in "Details" tab
- Cleans up _strings computed field during vendor save operations

This completes the frontend implementation allowing staff to create,
manage, and view custom additional fields on vendor records.

Test plan:
1) Go to Administration > Additional fields and add an additional field for Vendors
2) Navigate to 'Acquisitions' and click 'New vendor'
3) Fill out the form, making sure to add something into your new additional field
4) Hit save
5) View and Edit your new Vendor and confirm that the additional field
   values appear and update as expected

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Michaela <michaela.sieber@kit.edu>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-12 10:53:35 -07:00
Matt Blenkinsop 0c4ccf6d6f
Bug 38262: Enable additional fields support for acquisition vendors
Implements backend support for additional fields on vendor records by:
- Adding AdditionalFields mixin to Bookseller/Booksellers classes
- Defining additional_field_values and extended_attributes relationships
  in Aqbookseller schema with proper table name filtering
- Updating REST API controller to handle extended_attributes during
  vendor creation and updates
- Adding vendor to AdditionalField resource type mapping

This provides the ORM-level support needed for vendors to have custom
additional fields, matching the existing pattern used for other resource
types like agreements, packages, and orders.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Michaela <michaela.sieber@kit.edu>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-12 10:53:35 -07:00
Matt Blenkinsop ee6f5a3ee9
Bug 38262: Add extended attributes support to vendors API specification
Updates the OpenAPI definitions to support additional fields on vendor
records.

This adds:
- extended_attributes array field to vendor schema definition
- _strings field for localized/computed string representations
- extended_attributes and +strings to available embed options

These changes allow the API to expose and accept additional field data
when retrieving or modifying vendor records via the REST API.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Michaela <michaela.sieber@kit.edu>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-12 10:53:34 -07:00
Jacob O'Mara 05423a313b
Bug 39522: (follow up) Add defensive checking before instantiating plugins object
Previously this could have caused issues if enable_plugins was disabled
in koha-conf as we were not checking enabled status before instantiating
an instance of the plugins object.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-12 10:53:34 -07:00
Jonathan Druart 508a8de6f0
Bug 39522: Ignore the whole file for tidy
The prettier plugin for TT has been adjusted to correctly parse our TT
files: most of them does not have an opening head but have a closing
head, then have an opening body but no closing body.

To avoid the parser to fail we are commenting those lines in a
pre-process step in the plugin, then uncomment them in the tidy script.

Which means we actually cannot parse correctly formatted HTML files.

https://gitlab.com/koha-community/prettier-plugin-template-toolkit/-/blob/main/src/parser.ts?ref_type=heads#L242
export const preprocess: Parser<Node>["preprocess"] = (text) => {
    return text
        .replace("</head>", "<!--</head>-->")
        .replace(/<body(.*)/, "<!--<body$1-->")
        .replace("</body>", "<!--</body>-->");
};

https://git.koha-community.org/Koha-community/Koha/src/branch/main/misc/devel/tidy.pl#L168
            # Revert the substitutions done by the prettier plugin
            my $content = read_file($file);
            $content =~ s#<!--</head>-->#</head>#g;
            $content =~ s#<!--<body(.*)-->#<body$1#g;
            $content =~ s#<!--</body>-->#</body>#g;

(yes it's a bit messy, but our templates are messy)

Signed-off-by: Catherine Small <c.small@rcs.ac.uk>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-12 10:53:33 -07:00
Martin Renvoize 856e6d3b38
Bug 39522: (follow-up) Remove debugging
Signed-off-by: Catherine Small <c.small@rcs.ac.uk>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-12 10:53:33 -07:00
Martin Renvoize 522282cc83
Bug 39522: Add unit tests for valuebuilder plugin hooks
This patch adds comprehensive unit tests for the new valuebuilder plugin
functionality. The tests verify that plugins can provide valuebuilders
through the get_valuebuilder() method and that FrameworkPlugin can
correctly load and integrate with plugin-based valuebuilders.

The tests use a dedicated TestValuebuilder plugin to ensure realistic
testing scenarios without relying on mocks, following the pattern
established in other plugin hook tests.

Test plan:
1. Run the new test file:
   prove t/db_dependent/Koha/Plugins/Valuebuilder_hooks.t
2. Verify all tests pass (9 tests total)
3. Run all plugin tests to ensure no regressions:
   prove t/db_dependent/Koha/Plugins/
4. Verify all plugin tests still pass (113 tests across 19 files)
5. Test the specific functionality:
   - Verify plugins without get_valuebuilder() method are not found as valuebuilders
   - Verify plugins with get_valuebuilder() method are correctly discovered
   - Verify FrameworkPlugin can load plugin-based valuebuilders
   - Verify JavaScript generation works with plugin valuebuilders
   - Verify plugin enable/disable affects valuebuilder availability
6. Confirm FrameworkPlugin integration tests still pass:
   prove t/db_dependent/FrameworkPlugin.t

Signed-off-by: Catherine Small <c.small@rcs.ac.uk>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-12 10:53:32 -07:00
Martin Renvoize 97fdd304ce
Bug 39522: Add filtering to the plugin home page for valuebuilders
This patch adds filtering functionality to the plugin home page to allow
valuebuilder plugins to be displayed alongside other plugins. This ensures
that valuebuilder plugins are properly integrated into the plugin management
interface and can be easily identified and managed by administrators.

Test plan:
1. Install a valuebuilder plugin (following the test plan from the
   previous patch)
2. Go to Administration > Plugins
3. Verify that the valuebuilder plugin appears in the plugins list
4. Confirm that the plugin shows the correct type/category information
5. Use any available filtering options to verify valuebuilder plugins
   can be filtered appropriately
6. Verify that valuebuilder plugins display the same management options
   (enable/disable/configure) as other plugin types
7. Test that plugin status changes are reflected correctly in the
   filtered view

Co-authored-by: Mark Hofstetter <mark@hofstetter.at>
Signed-off-by: Catherine Small <c.small@rcs.ac.uk>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-12 10:53:32 -07:00
Jacob O'Mara 8e6b687f51
Bug 39522: Allow Valuebuilders to be installable as plugins
This patch adds hooks to allow 'Valuebuilder' plugins to be installable
using the standard plugin architecture for Koha. This enables cataloguing
plugins to be dynamically installed, enabled, and disabled through the
plugin system rather than being hardcoded framework components.

Test plan:
1. Install the example valuebuilder plugin from GitHub
   (https://github.com/Jacobomara901/koha-plugin-value-builder)
2. Go to Administration > Plugins
3. Verify the valuebuilder plugin appears in the plugins list
4. Enable/disable the plugin and confirm the custom valuebuilder
   appears/disappears in the framework configuration
5. Assign the custom valuebuilder to a MARC subfield in the
   bibliographic framework
6. Create/edit a bibliographic record and verify the valuebuilder
   button appears next to the configured subfield
7. Click the valuebuilder button and confirm it functions correctly
8. Disable the plugin and verify the valuebuilder button disappears
9. Re-enable the plugin and confirm functionality is restored
10. Uninstall the plugin and verify it's completely removed

Sponsored-by: Open Fifth <https://openfifth.co.uk>
Co-authored-by: Mark Hofstetter <koha@trust-box.at>
Signed-off-by: Catherine Small <c.small@rcs.ac.uk>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-12 10:53:31 -07:00
Owen Leonard 77ee024313
Bug 41135: Convert About page Perl module table to DataTable
This patch updates the display of Perl modules on the About page,
showing them in a regular DataTable instead of a multi-column one. This
allows for sorting, filtering by required or missing, and searching.

To test, apply the patch and restart services.

- Go to the About page and click the "Perl modules" tab.
- The Perl modules should be displayed in a DataTable.
- Required modules are still shown in bold but now there is a column of
  with check marks for required modules so that you can sort or filter
  by required.
  - Test the "Show required" link at the top of the table and confirm
    that only required modules are shown.
- To test the display of Missing modules, uninstall at least one
  required module and at least one optional one, e.g.:

  > sudo dpkg --remove --force-depends libtest-mockmodule-perl libtest-mocktime-perl

- Restart services and return to the About page Perl modules list. Use
  the table filter form to search for "mock."
  - You should see the required module, Test::MockModule, with the
    status in red, "Required module missing."
  - The optional module, Test::MockTime, should have a yellow warning
    "Optional module missing."
- Clear the search form and click the "Show missing" link. The table
  should be filtered down to only those modules you removed.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-12 10:53:31 -07:00
Rudolf Byker a762e68e0d
Bug 37538: Improve documentation for the OCLC import daemon script
This updates the documentation for the
misc/bin/connexion_import_daemon.pl --help option.

Test plan:
1. Run ./misc/bin/connexion_import_daemon.pl --help
2. Read the output and check for errors, whether grammatical,
   spelling, or factual.

Sponsored-by: Reformational Study Centre <www.refstudycentre.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-12 10:53:30 -07:00
Lucas Gass d3c22bb552
Bug 40391: DRRev 25.12.00.007
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-12 10:53:30 -07:00
Martin Renvoize 76c2523b12
Bug 40391: Add support for GIR:LSL (Library Sub-Location) in EDIFACT processing
This implements support for the new EDItEUR/BiC GIR:LSL (Library Sub-Location)
field to complement the existing GIR:LSQ (Library Sequence) functionality,
allowing flexible mapping of both fields to location and collection item fields.

Changes:
- Add LSL mapping to GIR field extraction in Koha::Edifact::Line
- Update gir_segments() in Koha::Edifact::Order to handle both LSL and LSQ preferences independently
- Add validation functions in Koha::EDI using Koha::AuthorisedValues for location/collection codes
- Add EdifactLSL system preference for independent LSL field mapping
- Update EdifactLSQ to include empty option for ignore functionality
- Add admin interface configuration for LSL preference

The implementation provides maximum flexibility:
- EdifactLSQ can be set to: location, ccode, or empty (ignore)
- EdifactLSL can be set to: location, ccode, or empty (ignore)
- Both fields can be mapped independently or to same target field
- Validation ensures codes exist in LOC/CCODE authorised values
- Maintains full backwards compatibility with existing LSQ-only setups

Test plan:
1. Apply both patches
2. Update database: installer/data/mysql/updatedatabase.pl
3. Verify new system preferences in Administration > System preferences > Acquisitions:
   - EdifactLSQ: "Map EDI sequence code (GIR+LSQ) to Koha Item field"
   - EdifactLSL: "Map EDI sub-location code (GIR+LSL) to Koha Item field"
4. Create test authorised values:
   - LOC category: Add values like FICTION, REFERENCE
   - CCODE category: Add values like ADULT, CHILD
5. Set preferences to test combinations:
   - EdifactLSQ=location, EdifactLSL=ccode
   - EdifactLSQ=ccode, EdifactLSL=location
   - EdifactLSQ=location, EdifactLSL="" (empty)
6. Process EDIFACT messages containing GIR+LSL and GIR+LSQ segments
7. Verify items created with correct location/ccode values per preferences
8. Test invalid codes generate appropriate error messages
9. Confirm existing LSQ-only configurations continue working unchanged
10. Run: prove t/Edifact.t t/db_dependent/Koha/EDI.t t/db_dependent/Koha/Edifact/Order.t

Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/>
Sponsored-by: Royal Borough of Kensington and Chelsea <https://www.rbkc.gov.uk/>
Sponsored-by: OpenFifth <https://openfifth.co.uk/>
Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-12 10:53:29 -07:00
Martin Renvoize 14064e9459
Bug 40391: Add unit tests for GIR:LSL support in EDI
This adds unit tests for adding support for the new LSL field:

- GIR segment extraction tests in t/Edifact.t for
  sub_location_code field mapping
- Validation function tests in t/db_dependent/Koha/EDI.t
  for location/collection code validation
- Copy function tests in t/db_dependent/Koha/EDI.t for
  location/collection code assignment
- gir_segments generation tests in t/db_dependent/Koha/Edifact/Order.t
  for preference handling

Tests cover:
- LSL field extraction from GIR segments alongside existing LSQ fields
- Independent LSQ/LSL preference mapping (location/ccode/empty combinations)
- Validation of location and collection codes against authorised values
- Error handling and message formatting
- Backwards compatibility with existing LSQ-only configurations
- Edge cases including missing data and invalid preference values
- LSL maps to location, LSQ maps to ccode
- LSL maps to ccode, LSQ maps to location (swapped configuration)
- Only LSL field present (LSQ empty)
- Only LSQ field present (LSL empty)
- Both LSL and LSQ map to location (edge case)
- Both fields disabled

Test plan:
1. Apply this patch
2. Run: prove t/Edifact.t
   - Should pass with 8 new LSL-related tests included
3. Run: prove t/db_dependent/Koha/EDI.t
   - Should pass with 16 new validation function tests
4. Run: prove t/db_dependent/Koha/Edifact/Order.t
   - Should pass with 14 new gir_segments LSL/LSQ tests
5. Verify all existing tests still pass - no regression

Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/>
Sponsored-by: Royal Borough of Kensington and Chelsea <https://www.rbkc.gov.uk/>
Sponsored-by: OpenFifth <https://openfifth.co.uk/>
Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-12 10:53:29 -07:00
Owen Leonard 1b1b9307b4
Bug 41142: Update jQuery-validate plugin to 1.21.0
This patch updates the jQuery validation plugin in both the staff
interface and the OPAC to the latest version, 1.21.0.

To test, apply the patch and clear your browser cache if necessary.

Test various pages in the staff client to confirm that form validation
works as expected:

 - Patron password change form:
   - Password must conform to minPasswordLength
   - Password must not contain leading/trailing spaces
   - Passwords must match

 - Administration -> Add or edit budget:
   - Description, start date, and end date are required
   - Start date must be before end date

 - Administration -> Add or edit Z39.50/SRU server:
   - Server name, hostname, port, and database are required
   - Port, rank, and timeout must be a number

Perform the same check of the "Change password" form in the OPAC.

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-12 10:53:22 -07:00
Tomas Cohen Arazi e71ae37c95
Bug 32736: (follow-up) Make scripts using koha-worker use --all-queues
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-12 10:26:06 -07:00
Tomas Cohen Arazi dd11756ffc
Bug 32736: Add --all-queues switch to koha-worker
This patch adds a convenient option switch to the script. It will make
it perform the action (start, stop, restart, print status) on all
defined queues ('default' and 'long_tasks', as of today).

To test, make sure you applied bug 31124:

0. Apply this patch
1. Run:
   $ ktd --shell --root
  k$ cp debian/scripts/koha-functions.sh \
        /usr/share/koha/bin/koha-functions.sh
2. Play with all the options for:

  k$ debian/scripts/koha-worker * kohadev
=> SUCCESS: All options work as expected!

Note: you should include (say) having `long_tasks` stopped, and starting
all workers with the new parameter. And the same for `--stop` and
`--start`.

3. Sign off :-D

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-12 10:26:06 -07:00
Marcel de Rooy 73c0763f5b
Bug 41081: Remove spaces around 856$u in results and detail xslt
This patch does prevent creating useless links built on spaces like
http://%20%20%20%20 on the bug report.
A next step would be to stop preventing to create them when validating
during cataloguing.

Test plan:
Check without patch.
Create biblio with 856u having just a few spaces.
Verify that you see a useless Online resources link on OPAC or intranet
(detail and results).
Apply patch.
Restart all. Verify that you do not see the link anymore.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-12 10:26:05 -07:00
Lucas Gass dcaec7edaa
Bug 38876: DBRev 25.12.00.006
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-12 10:26:05 -07:00
Jessica Zairo e8dca2a842
Bug 38876: (follow-up) fix db rev
syntax was wrong for dbrev
To test apply patches
dbic
updatedatatbase
koha-mysql kohadev
select * from systempreferences where variable='UpdateNotForLoanStatusOnCheckout';
confirm the updated description

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-12 10:26:04 -07:00
Jessica Zairo eebb1595d7
Bug 38876: (QA follow-up) automicupdate
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-12 10:26:04 -07:00