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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
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>
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>
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>