Bug 35298

Summary: Flatpickr makes focus handler in dateaccessioned plugin useless
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: Architecture, internals, and plumbingAssignee: Marcel de Rooy <m.de.rooy>
Status: CLOSED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: trivial    
Priority: P5 - low CC: fridolin.somers
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00,23.05.06,22.11.12
Circulation function:
Attachments: Bug 35298: Remove focus handler from dateaccessioned plugin.
Bug 35298: Remove focus handler from dateaccessioned plugin.
Bug 35298: Remove focus handler from dateaccessioned plugin.

Description Marcel de Rooy 2023-11-09 08:04:01 UTC
See also bug 31665.
Remove focus handler from dateaccessioned plugin.
The onOpen from flatpickr has control now.
Comment 1 Marcel de Rooy 2023-11-09 08:10:13 UTC
Created attachment 158702 [details] [review]
Bug 35298: Remove focus handler from dateaccessioned plugin.

Test plan:
Verify that setting focus to date acquired field in items editor
fills date of today when field is empty but does not replace existing
date.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 2 Marcel de Rooy 2023-11-09 08:10:53 UTC
Super trivial: self SO
Comment 3 Owen Leonard 2023-11-09 11:32:09 UTC
Created attachment 158711 [details] [review]
Bug 35298: Remove focus handler from dateaccessioned plugin.

Test plan:
Verify that setting focus to date acquired field in items editor
fills date of today when field is empty but does not replace existing
date.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 4 Katrin Fischer 2023-11-09 21:02:59 UTC
I tried to test, but setting the focus in the field already pre-fills the date for me without applying this patch.

I tried clicking in the field and "tabbing" to it.

Tested in Firefox.
Comment 5 Marcel de Rooy 2023-11-10 06:59:43 UTC
Back to Signed off. This is just confusion about the expected results.
Comment 6 Marcel de Rooy 2023-11-10 07:00:21 UTC
(In reply to Katrin Fischer from comment #4)
> I tried to test, but setting the focus in the field already pre-fills the
> date for me without applying this patch.

Yes, but that is just Flatpickr. The removed focus handler simply does nothing.
Comment 7 Katrin Fischer 2023-11-10 17:40:49 UTC
Created attachment 158811 [details] [review]
Bug 35298: Remove focus handler from dateaccessioned plugin.

Test plan:
Verify that setting focus to date acquired field in items editor
fills date of today when field is empty but does not replace existing
date.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Tomás Cohen Arazi (tcohen) 2023-11-14 13:33:09 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 9 Fridolin Somers 2023-11-14 18:53:00 UTC
Pushed to 23.05.x for 23.05.06
Comment 10 Matt Blenkinsop 2023-11-16 09:37:36 UTC
Nice work everyone!

Pushed to oldstable for 22.11.x