This patch builds the patron search description more carefully
to avoid XSS
Test plan:
0. Apply the patch
1. Log into Koha and click on "Patrons"
2. Change the "Category" and "Library" to any option but "Any"
and click "Search"
3. Type "test" into the data table "Search:" box
4. Note some text should appear on the screen similar to this content
and format:
Patrons found for: Anywhere: test
Library=Centerville, Category=Board
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
* Add Cypress tests to cover the 404 redirect if the pref is disabled
* Add "invoices" as possible embed option for
/acquisitions/vendors/:vendor_id
Seems relevant as the api def for invoice if expecting for it
api/v1/swagger/definitions/invoice.yaml
* Tell insertObject how to generate an invoice and return it.
Unfortunately we don't have a direct route for that, hence the embed
on /vendors/:vendor_id
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
This patch makes it so that invoice-files.pl returns 404 if
AcqEnableFiles is disabled
Test plan:
0. Apply the patch
1. koha-plack --restart kohadev
2. Go to /cgi-bin/koha/acqui/invoice-files.pl?invoiceid=999
3. Note that you see a 404 page
4. Change "AcqEnableFiles" syspref to "Do"
5. Go to /cgi-bin/koha/acqui/invoice-files.pl?invoiceid=999
6. Note that you now see a "Files for invoice" page
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
@types/mime was resolving differently depending on distro you yarn
install on. This clamps it to the required 1.3.5
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
mock_userenv expects 'branchcode' but the test was passing 'branch',
causing the branchcode to fall through to the 'Branch4T' default and
the branch-specific notice lookup to never match.
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit b0df04264e)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
- Fix potential crash when C4::Context->userenv returns undef:
use the established ternary guard pattern used throughout other
TT plugins (AuthorisedValues, Branches, Desks, etc.)
- Remove dead second argument passed to GetLettersAvailableForALibrary,
which only accepts one argument; the group_by/columns/order_by
hashref was silently dropped
- Fix typo "librries" -> "libraries" in GetByModuleForLibrary POD
- Update POD example to use 'add_message' module matching actual usage
- Add test coverage for GetByModuleForLibrary, verifying that a user
logged in to a branch sees branch-specific and all-libraries notices,
while users at other branches see only all-libraries notices
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit b18fbab806)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
To test
The following should work with either email or SMS notices sent from the Add Message button in a patron record
1 - create a notice in module Patrons (custom message) for all libraries
2 - create a notice in module Patrons (custom message) for Centerville
3 - while logged in at Centerville, confirm you can see and enqueue your all libraries message
4 - while logged in at Centerville, confirm you can see but cannot successfully enqueue your Centerville message
5 - while logged in at Fairfield, confirm you can see but cannot successfully enqueue your Centerville message
6 - apply patch, restart_all
7 - while logged in at Fairfield, confirm you can see and enqueue your all libraries message
8 - while logged in at Fairfield, confirm you cannot see your Centerville message
9 - while logged in at Centervielle, confirm you can see and enqueue your Centerville message
Signed-off-by: Juliet Heltibridle <jheltibridle@rcplib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 3a1bd59197)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
Replace the O(n²) accumulate-and-re-insert pattern with a simple
per-row execute inside the while loop.
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 8eec766b5a)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
To test:
1 - have an staff account with 'send_messages_to_borrowers' permission but not top level 'borrowers' permission
2 - have a value in SMSSendDriver system preference
3 - log in under your staff account and confirm you can send both email and SMS messages from the Add Message button on a patron record
4 - apply patch, updatedatabase, restart_all
5 - confirm your staff account now has 'send_messages_to_borrowers_email' permission rather than 'send_messages_to_borrowers'
6 - confirm your staff account can now only send email messages from the Add Message button on a patron record
7 - add 'send_messages_to_borrowers_sms' permission to your staff account
8 - confirm your staff account can now send both email and sms messages from the Add Message button on a patron record
9 - remove 'send_messages_to_borrowers_email' from your staff account
10 - confirm your staff account can now only send sms messages from the Add Message button on a patron record
Signed-off-by: Juliet Heltibridle <jheltibridle@rcplib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 3dd4691076)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
- I think "Please enter a card number or name" sounds friendlier
- We don't add a "btn-primary" class to these buttons
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 44bec3f9f3)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
If the "arrow" button on the patron search is clicked with no value in
the textbox, it redirects to members/members-home.pl and performs a
search with no value automatically. It makes more send for it to behave
as the "Patrons" link in the navbar that directs to members-home.pl
where the librarian can then perform a more advanced search.
Test Plan:
1) Click the "Search patrons" link on the header, then the arrow button
2) Note an empty patron search is performed immediately
3) Apply this patch
4) Restart all the things!
5) Repeat step 1
6) Note a paton search is no longer triggered automatically
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 222e3161cc)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
This commit adds the missing accesskey attribute to the print button in the circulation template.
Test plan:
1. Try to checkout an item that is waiting for pickup.
2. Try to print the checkout receipt using the alt+shift+p keyboard shortcut.
3. Verify that nothing happens when using the shortcut.
4. After applying this commit, try the same steps again.
5. Verify that the print button now works with the alt+shift+p keyboard shortcut.
Sponsored-by: Koha-Suomi Oy
Signed-off-by: Slava Shishkin <slavashishkin@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit fe51e9c881)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
When checking in an item that has both a hold and a stock rotation
repatriation transfer, both modals would appear simultaneously,
overlapping each other and making it impossible to interact with
either one properly.
This occurred because:
1. The hold modal showed when 'waiting' was set
2. The transfer modal condition checked for 'reserved' but not 'waiting'
3. Both modals had the "block" class, causing simultaneous display
This patch ensures holds take precedence over stock rotation transfers
by adding a check for the 'waiting' flag to the transfer modal condition.
When a hold is found, only the hold modal displays. The stock rotation
transfer can be handled at a subsequent check-in, which is appropriate
since holds are patron-facing and time-sensitive, while stock rotation
is an internal process that can be deferred.
Test plan:
1. Enable StockRotation system preference
2. Navigate to Cataloging->Stock rotation
3. Click '+ New rota' and fill out with any values
4. Click 'Manage->stages' for the Rota
5. Add a stage for Centerville for 1 day, and Midway for 1 day
6. Return to rotas
7. Click Manage->items for the rota
8. Add an item
9. Return to rotas
10. Click 'Activate'
11. On the command line run the stock rotation job:
perl misc/cronjobs/stockrotation.pl -x
12. There should be one item for initiation
13. Run it again, there should be one stationary item
14. Place an item specific hold for the item, for pickup at Midway
15. Check the item in at Centerville, confirm transfer
16. Check the item in at Midway, confirm hold
17. Run the stock rotation job again:
perl misc/cronjobs/stockrotation.pl -x
18. There should be one item for repatriation
19. Check in the item again at Midway
20. Before patch: Two overlapping modals appear (hold + transfer)
21. After patch: Only the hold modal appears
22. Confirm the hold - no transfer modal should appear
23. The stock rotation transfer will be handled at the next check-in
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit fe791731b4)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
Clicking on New data provider in the ERM eUsage section will not work, when a data provider was shown before.
Test plan:
prequisites:
- activate the ERM module system preference.
- this is for ktd
a) go to /cgi-bin/koha/erm/eusage/usage_data_providers
b) add a new data provider, dummy data is sufficient
c) submit the new provider and on the following screen click close to return to the provider list
d) click on 'Add data provider' (open web dev tools will display an error)
e) apply patch
f) run 'yarn js:build'
f) do a hard refresh in the browser
g) on provider list click your created provider
h) close it via 'close' to return to the provider list
d) click on 'Add data provider' should work now
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 18c18175ca)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
This patch prevents deletion of items that have item level holds on
them.
Test plan:
1. Create an item level hold.
2. Delete the item using alternative A or B:
A. Open the biblios Detail-view -> From the toolbar, open
"Edit"-dropdown menu -> Manage items -> Delete the item that has
an item level hold attached to it from "Actions"-dropdown menu
B. Open the biblios Detail-view -> Select the item that has an item
level hold attached to it -> Click "Delete selected items" ->
Confirm deletion
3. Notice that the item is deleted without any warning and the item
level hold has disappeared.
4. Apply this patch.
5. Repeat steps 1-3.
6. Notice that the item cannot be deleted and a warning is shown.
7. prove t/db_dependent/Koha/Item.t
8. Run the REST API tests: prove t/db_dependent/api/v1/items.t
Sponsored-by: Koha-Suomi Oy
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9445ffc9aa)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 556bd55543)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
When starting SIP, Koha passes an incorrect value to the
Net::Server "group" parameter, which can generate an
error in the logs":
Couldn't become gid "<uid>": Operation not permitted
This change ensures that a valid numeric GID is passed instead.
Test plan:
1. Enter KTD shell.
2. To reproduce the error: sudo groupmod -g 8001 kohadev-koha
3. Restart SIP: sudo koha-sip --restart kohadev
4. Check SIP logs:
/var/log/koha/kohadev/sip-output.log
5. Observe the error:
Couldn't become gid "<uid>": Operation not permitted
6. Apply this patch.
7. Repeat steps 2 to 4.
8. Verify that the "Couldn't become gid" error is no longer logged.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b16ff5a8a0)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
The FTP passive mode setting was not being saved due to a typo in the
parameter name ('passiv' instead of 'passive'). This fixes the typo
and adds display of passive mode status in the transports table.
Test plan:
1. Go to Administration > File transports
2. Click "New file transport"
3. Fill in the name (e.g., "Test FTP")
4. Change Transport to "FTP"
5. Set Passive mode to "Enabled (Recommended)"
6. Fill in required fields (host, username, etc.) and save
7. Edit the transport you just created
8. Verify Passive mode is still set to "Enabled" (not reverted to Disabled)
9. Return to the file transports list
10. Verify the Transport column shows "FTP (passive)" for this transport
11. Edit the transport and change Passive mode to "Disabled"
12. Save and return to the list
13. Verify the Transport column now shows just "FTP" (without the passive indicator)
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a92e6ef8ea)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
This patch adds end-to-end Cypress tests for the booking modal improvements,
including smart window maximization and server-side optimal item selection.
New Tests:
1. "should successfully submit an 'Any item' booking with server-side optimal item selection"
- Tests the complete "any item" booking workflow
- Selects itemtype and "Any item" option (item_id = 0)
- Submits booking form
- Verifies modal closes without errors
- Validates booking created in database
- Confirms item was assigned by server
- Verifies server-side optimal selection completed
- Test status: PASSING
2. "should maximize booking window by dynamically reducing available items during overlaps"
- Creates 4 items with strategic booking patterns
- Tests "never re-add items to pool" algorithm
- Validates 5 scenarios:
a) Full window when all items available
b) Reduced window when Item 1 becomes unavailable
c) Further reduction when Items 1&2 unavailable
d) Minimal window with Items 1,2,3 unavailable
e) No availability when all items booked
- Demonstrates smart window maximization
- Test status: PASSING
3. "should handle edit mode date initialization correctly"
- Tests fix for edit mode race condition
- Verifies dates populate correctly when editing booking
- Ensures itemtype is set before date initialization
- Tests that flatpickr dates are set properly
- Test status: PASSING
Updated Tests:
- "should successfully submit a booking"
* Updated to use day+5 start date (accounts for 3-day lead period)
* Ensures test doesn't fail on past-date constraint
- Updated test comments and log messages to reflect server-side selection
* Changed from "client-side selectOptimalItem()" references
* Updated to "server-side optimal item selection"
* Clarified that server performs the optimal selection
Test Coverage:
- End-to-end "any item" booking submission
- Smart window maximization algorithm
- Edit mode date initialization
- Server-side optimal selection validation
- Database verification of assigned items
- Modal interaction and form submission
Test plan:
1. Start KTD environment
2. Ensure Cypress is installed: yarn install
3. Run: npx cypress run --spec "t/cypress/integration/Circulation/bookingsModalBasic_spec.ts"
4. Verify all 11 tests pass
5. Optionally run in interactive mode: npx cypress open
Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9360ed6157)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
This patch implements client-side improvements for the bookings modal,
including smart window maximization and hybrid submission logic that
delegates optimal item selection to the server.
Smart Window Maximization:
- Implements "never re-add items to pool" algorithm
- Dynamic item pool reduction based on availability
- isDateDisabledForItemtype() calculates available dates
- isDateInMaximumWindow() validates end dates against item pool
- Provides real-time calendar feedback to users
Hybrid Submission Logic:
For "any item" bookings, the client now uses a smart hybrid approach:
1. Filters items by selected itemtype
2. Checks availability for the booking period
3. If 0 items available: Shows error (no suitable item)
4. If 1 item available: Sends item_id (optimization - skips server)
5. If 2+ items available: Sends itemtype_id (delegates to server)
This minimizes server round-trips while delegating complex optimal
selection logic to the server when multiple choices exist.
Test plan:
1. Navigate to biblio detail page with bookable items
2. Click "Place booking" and select patron/pickup location
3. Select itemtype (not specific item) - "any item" mode
4. Select start date - verify end dates are maximized
5. Verify calendar disables dates when no items available
6. Submit booking - verify it succeeds
7. Check that optimal item was selected (server-side)
8. Test edit mode with "any item" selection
9. Verify both create and edit use same logic
Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 39fadd016a)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
This patch adds unit tests for the server-side optimal item selection
functionality.
t/db_dependent/Koha/Booking.t:
- Added subtest for _select_optimal_item() method (7 tests)
* Tests with no items (returns undef)
* Tests with single item (returns that item)
* Tests with multiple items (selects item with longest future availability)
* Tests optimal selection across items with different booking patterns
* Tests handling of cancelled bookings (ignored in selection)
* Tests iterator reset after selection
- Added subtest for _assign_item_for_booking() with itemtype filtering (6 tests)
* Tests booking without item_id or itemtype_id (selects any available)
* Tests booking with itemtype_id (filters by type)
* Tests optimal selection within filtered itemtype
* Tests exception when no items of specified type available
- Added integration test for full optimal selection workflow (5 tests)
* Creates 3 items with different future booking patterns
* Verifies items selected in optimal order (B→C→A)
* Demonstrates preservation of constrained resources
* Validates complete algorithm chain
* Tests booking failure when all items exhausted
t/db_dependent/api/v1/bookings.t:
- Added subtest for itemtype_id parameter validation (16 tests)
* Tests successful booking creation with itemtype_id
* Tests that item is automatically assigned
* Tests validation: cannot specify both item_id and itemtype_id
* Tests validation: must specify either item_id or itemtype_id
* Tests clash detection with itemtype-based bookings
- Fixed duplicate booking_id test to use different dates
* Prevents clash detection from masking duplicate ID constraint
- Updated test count from 3 to 8 subtests in Booking.t
- Updated test count to match actual assertions (16 not 18)
Test Coverage:
- Internal method testing: _select_optimal_item()
- Integration testing: _assign_item_for_booking()
- API endpoint testing: add() with itemtype_id
- End-to-end workflow validation
- Edge cases: empty sets, single items, ties, cancelled bookings
Test plan:
1. prove t/db_dependent/Koha/Booking.t
2. prove t/db_dependent/api/v1/bookings.t
3. Verify all tests pass
Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a6766a9e80)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
This patch implements an algorithm for selecting the item that would
leave the largest gap after the proposed booking to maximize the
opportunity for future bookings.
Key Changes:
Koha::Booking:
- Added set_itemtype_filter() method for transient itemtype parameter
- Added _select_optimal_item() method using single aggregated query
* Groups bookings by item_id with MIN(start_date)
* Selects items with no future bookings (optimal)
* Among items with bookings, selects one with latest next booking
* O(1) complexity - single database query with GROUP BY
- Updated _assign_item_for_booking() to use optimal selection
* Filters by itemtype when itemtype_id is provided
* Replaces previous random selection (RAND())
API Changes:
- Added itemtype_id parameter support to add() endpoint
- Added itemtype_id parameter support to update() endpoint
- Validates exactly one of item_id or itemtype_id is provided
- itemtype_id is transient - not persisted to database
- Extracted and applied via set_itemtype_filter() before store()
Architecture:
- itemtype_id is NOT a database column (transient only)
- Used as selection criterion, then discarded
Test plan:
1. Apply patch and restart services
2. Create "any item" booking via staff interface
3. Verify item with longest future availability is selected
4. Test via API with itemtype_id parameter
5. Verify itemtype_id is not persisted to database
6. Run t/db_dependent/Koha/Booking.t
7. Run t/db_dependent/api/v1/bookings.t
Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c7fa646929)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
xt/js_tidy.t does not check all files every run (it's using the incremental runs).
Something happened (node version changed?) and this is triggered because bug 41512 modified those files
Test plan:
0. Do not apply this patch
1. KOHA_CI_INCREMENTAL_RUNS=1 prove xt/js_tidy.t
=> fail
2. Apply this patch
3. Run prove again
=> pass
4. Run prove without the env var set
=> pass (i.e. there are no other JS files not tidy)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 080f5a2497)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
To test:
1 - add 856$u " www.cheese.com" to a record
2 - confirm link does not work from results or details in either staff interface or OPAC
3 - add 856$u "www.cheese.com " to a record
4 - confirm link does not work from results or details in either staff interface or OPAC
7 - apply patch, restart_all
8 - reload pages, confirm both links work in results and details in staff interface and OPAC
Optional final step: have some cheese as a treat
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c58989fc51)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
This patch updates the definition of the OAI-PMH:DeletedRecord
preference in sysprefs.sql, correcting the switched options and
explanation columns.
To test, apply the patch and run updatedatabase. Check that the database
has been updated correctly:
SELECT `options`, `explanation` FROM `systempreferences` WHERE
`variable` = 'OAI-PMH:DeletedRecord';
Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit eb69c7a735)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c2b7f2ddb2)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
This patch also moves time format hint into a standard <div
class="hint">. The hour format has been corrected from hhmm to HH:MM.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5a8a8ffd57)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
Also adding form place holder and label update to better inform users
1. login to koha instance
2. navigate to reports module
3. create a small quick test report or use an existing small test report
4. select 'schedule' from toolbar above main sql window
5. once redirected to task scheduler UI, choose 'tommorow' in drop down
'date' field.
6. enter 'test@local.com' in 'email' field
7. enter no value in the 'time' field
8. press 'save'.
Result - PASS:
- No 'Failed to add scheduled task' error state occurs, and the correct
time require error state does occur
- Form does not attempt submit as it identifies the required time field
data is missing
- Addition time field place holder information is provided and time
field label also offer time format information to user
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 38c3c56045)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
Test plan:
Steps to reproduce :
1 - Go to http://localhost:8081/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=1&basketno=1 and fill in a new item.
2 - Visit http://localhost:8081/cgi-bin/koha/acqui/parcels.pl?booksellerid=1, type an invoice name and validate. Inspect both "Cancel order" and "Cancel order and catalog record". Notice the link in "Cancel order is broken"
3 - Apply patch
4 - Repeat 3 and notice the referrer is well formed.
For a reason I ignore, it does not seem to have an impact on main, but
on the 24.11 I tested, if you click on cancel order, after confirming
the deletion and clicking on "ok", you will be asked again to confirm,
however the deletion has been performed
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e1ef80682a)
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2e3325a680)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
WNC amended patch - tidied
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 085c27e41b)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
When we edit a serial and we leave the date fields ('Published on' or 'Expected on') empty incorrect date are saved in the database 0000-00-00
instade of current date and we get Error 500
to reproduce
1. Connect to staff interface
2. Go to Serials and create a new subscription
3. Click on Serial collection in the left menu (and note the
Subscription numnber)
4. Select a serial to edit and Click on «Edit serials»
5. In the Serial edition form, delete «Published on > and « Expected on
» dates and save
----> Error 500 page is displayed
6. Check the value of «Published on > and « Expected on » dates in the
database
select planneddate,publisheddate from serial where subscriptionid=<Subscription numnber in step 3>;
------> planneddate publisheddate have «0000-00-00» value
7. Apply the patch
8. run ./installer/data/mysql/updatedatabase.pl
9. repeat step 2, 3, 4, 5, 6
-----> Error 500 page is no more displayed
-----> «Published on » and « Expected on » field have NULL as value
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit cbdd895dbf)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>