[Bug 43600] New: Strange behavior with Booking dates when editing a booking
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43600 Bug ID: 43600 Summary: Strange behavior with Booking dates when editing a booking Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: lucas@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle@bywatersolutions.com Target Milestone: --- TO recreate: 1. Make an item, or item type, bookable. 2. Create a booking 3. Edit the booking 4. Notice strange behavior with the Booking dates. Sometimes you see them correctly, sometimes the field is empty. Usually the dates appear for a second and then disappear. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43600 --- Comment #1 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- This is firing and clearing the dates: // redraw pariodPicker taking selected item into account 251 if (changed) { 252 periodPicker.clear(); 253 } -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43600 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@openfifth.c | |o.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43600 --- Comment #2 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- I think the intent of 'changed' here is to check if the user has changed any of the dropdown option, like item type. If so, we want to recalculate the circ rules and clear the date range. But if it is the initial load, we shouldn't clear it. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43600 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Strange behavior with |Booking dates are cleared |Booking dates when editing |when editing a booking |a booking | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43600 --- Comment #3 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Also, when I open the modal to edit: Error: Invalid date provided: Invalid Date Like in Bug 42868, I think we need to convert dates to local timezone when initiating the modal. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43600 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |lucas@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43600 --- Comment #4 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 206602 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=206602&action=edit Bug 43600: Convert dates to localtime when opening modal To test: 1. Make an item, or item type, bookable. 2. Create a booking 3. Edit the booking 4. Notice the date do not populate 5. APPLY PATCH, clear browser cache 6. Try steps 1 -3 again with a new booking. 7. This time the dates should load correctly 8. Edit something else in the dropdown like Itemtype. 9. The dates should clear. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43600 --- Comment #5 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 206603 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=206603&action=edit Bug 43600: Only clear the dates when the circ rules have been recalculated Patch from commit b327cba -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43600 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@openfifth.c |y.org |o.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43600 Kristi Krueger <kkrueger@cuyahogalibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kkrueger@cuyahogalibrary.or | |g --- Comment #6 from Kristi Krueger <kkrueger@cuyahogalibrary.org> --- After applying the patch, the date field still clears out when trying to edit the booking. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43600 --- Comment #7 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- (In reply to Kristi Krueger from comment #6)
After applying the patch, the date field still clears out when trying to edit the booking.
Thanks for testing, Kristi. I just retested and this is working for me in both Chrome and Firefox. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43600 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|martin.renvoize@openfifth.c |tomascohen@gmail.com |o.uk | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43600 John Vinke <jvinke@austinseminary.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43600 John Vinke <jvinke@austinseminary.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #206602|0 |1 is obsolete| | Attachment #206603|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43600 --- Comment #8 from John Vinke <jvinke@austinseminary.edu> --- Created attachment 206924 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=206924&action=edit Bug 43600: Convert dates to localtime when opening modal To test: 1. Make an item, or item type, bookable. 2. Create a booking 3. Edit the booking 4. Notice the date do not populate 5. APPLY PATCH, clear browser cache 6. Try steps 1 -3 again with a new booking. 7. This time the dates should load correctly 8. Edit something else in the dropdown like Itemtype. 9. The dates should clear. Signed-off-by: John Vinke <jvinke@austinseminary.edu> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43600 --- Comment #9 from John Vinke <jvinke@austinseminary.edu> --- Created attachment 206925 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=206925&action=edit Bug 43600: Only clear the dates when the circ rules have been recalculated Signed-off-by: John Vinke <jvinke@austinseminary.edu> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43600 --- Comment #10 from Kristi Krueger <kkrueger@cuyahogalibrary.org> --- My experience in testing was that the steps below behave as expected. 1. Make an item, or item type, bookable. 2. Create a booking 3. Edit the booking 4. Notice the date do not populate 5. APPLY PATCH, clear browser cache 6. Try steps 1 -3 again with a new booking. 7. This time the dates should load correctly 8. Edit something else in the dropdown like Itemtype. 9. The dates should clear. If I add a second or third booking to the bib record, editing the second and third booking presents the issue again. I was testing in a newly provisioned sandbox in a browser with a cleared cache. Are others able to replicate this? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43600 tech.aimee@salinapublic.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tech.aimee@salinapublic.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43600 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #11 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- (In reply to Kristi Krueger from comment #10)
My experience in testing was that the steps below behave as expected.
1. Make an item, or item type, bookable. 2. Create a booking 3. Edit the booking 4. Notice the date do not populate 5. APPLY PATCH, clear browser cache 6. Try steps 1 -3 again with a new booking. 7. This time the dates should load correctly 8. Edit something else in the dropdown like Itemtype. 9. The dates should clear.
If I add a second or third booking to the bib record, editing the second and third booking presents the issue again. I was testing in a newly provisioned sandbox in a browser with a cleared cache.
Are others able to replicate this?
Yes, I can replicate this. Good catch, I will set this to FQA and try again! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43600 --- Comment #12 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- The problem here is again DB datetime vs local datetime vs faltpickr datetime. When dates are fetched from the DB we must convert them to localtime before loading them into the flatpickr. So for dates going IN to the flatpickr we need the inverse of what we've done in bug 42868 which deals with dates coming OUT of the flatpickr -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43600 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43600 --- Comment #13 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 208764 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208764&action=edit Bug 43600: Convert dates to localtime before they go into a flatpickr I asked Claude to help me identify all the places where we need the conversion before it goes into a date picker Assisted-by: Claude <noreply@anthropic.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43600 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.derscheid@lmscloud.de Version|Main |26.05 --- Comment #14 from Paul Derscheid <paul.derscheid@lmscloud.de> --- I think we now need to specify that this for stable releases as bug 41129 is way too much for a backport imo. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43600 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43600 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #206924|0 |1 is obsolete| | Attachment #206925|0 |1 is obsolete| | Attachment #208764|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43600 --- Comment #15 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 210850 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210850&action=edit Bug 43600: Convert dates to localtime when opening modal To test: 1. Make an item, or item type, bookable. 2. Create a booking 3. Edit the booking 4. Notice the date do not populate 5. APPLY PATCH, clear browser cache 6. Try steps 1 -3 again with a new booking. 7. This time the dates should load correctly 8. Edit something else in the dropdown like Itemtype. 9. The dates should clear. Signed-off-by: John Vinke <jvinke@austinseminary.edu> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43600 --- Comment #16 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 210852 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210852&action=edit Bug 43600: Only clear the dates when the circ rules have been recalculated Signed-off-by: John Vinke <jvinke@austinseminary.edu> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43600 --- Comment #17 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 210854 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210854&action=edit Bug 43600: Convert dates to localtime before they go into a flatpickr I asked Claude to help me identify all the places where we need the conversion before it goes into a date picker Assisted-by: Claude <noreply@anthropic.com> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43600 --- Comment #18 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 210855 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210855&action=edit Bug 43600: (follow-up) Declare the circulation rules recalculation flag Assisted-by: Opus 5.5 (Anthropic) Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43600 --- Comment #19 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 210857 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210857&action=edit Bug 43600: (follow-up) Stop stacking booking modal select handlers The itemtype, item and pickup location handlers were bound again on every modal open, so each change ran once per earlier opening. - Unbind them before binding, like the patron handler - Namespace the itemtype change handler so select2's own stays bound Assisted-by: Opus 5.5 (Anthropic) Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43600 --- Comment #20 from Paul Derscheid <paul.derscheid@lmscloud.de> --- The qa script flags something because of reindent, but has nothing to do with the patches here: Tag v25.05.00-1 found in /kohadevbox/koha — checking out branch main in /kohadevbox/qa-test-tools Already on 'main' Your branch is up to date with 'origin/main'. testing 5 commit(s) (applied to fd32b7b 'b64 Bug 43872: DBRev 26.05.05.003') Processing files [RUNNING] koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js [FAIL] koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js Result: [FAIL] koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js FAIL forbidden_patterns forbidden pattern: console.log (line 405) Processing additional checks PASS! * Was this bug sponsored by anyone? -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org