Bug 36136 - Flatpickr allows selecting date from the past on copied serial subscriptions
Summary: Flatpickr allows selecting date from the past on copied serial subscriptions
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Serials (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Olli Kautonen
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-20 08:19 UTC by Johanna Räisä
Modified: 2025-07-03 08:04 UTC (History)
1 user (show)

See Also:
GIT URL:
Change sponsored?: Sponsored
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 36136: Add validation to subscription end date (1.50 KB, patch)
2025-07-03 08:03 UTC, Olli Kautonen
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Johanna Räisä 2024-02-20 08:19:34 UTC
If a librarian copies a serial subscription and changes dates the Flatpickr allows to put end date to the past. Flatpickr prevents the action only if the start date is first added. In this case the old input value should be passed to the Flatpickr so the selection is not allowed.

I think this happens everywhere where we are using Flatpickr.
Comment 1 Olli Kautonen 2025-07-03 08:03:20 UTC
Created attachment 183724 [details] [review]
Bug 36136: Add validation to subscription end date

Fixed an issue where editing an existing subscription as a duplicate would result in being able to select the end date before the start date.

To test:

1)In Koha go to Serials
2)Search for existing subscriptions
3)Select a subscription
4)Select Edit, Edit as new(duplicate)
5)On the second page set the end date before the start date
6)When pressing save subscription a warning pops up, preventing you from selecting the end date before the start date.

Sponsored-by: Koha-Suomi Oy