[Bug 30797] New: Subfields linked to the dateaccessioned.pl value builder on addbiblio.pl throw a JS error
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30797 Bug ID: 30797 Summary: Subfields linked to the dateaccessioned.pl value builder on addbiblio.pl throw a JS error Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: alexbuckley@catalyst.net.nz QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl By default the dateaccessioned.pl cataloguing value builder is linked to the 952$d subfield. When the additem.pl page loads the 952$d is pre-populated with today's date. However, some libraries link the dateaccessioned.pl cataloguing value builder plugin to subfields displayed in the addbiblio.pl (biblio cataloguing page). For example, 902$d. When you load the addbiblio.pl page those subfields are not pre-populated with today's date. Instead in the console you get the following JavaScript error: Uncaught TypeError: $(...).flatpickr is not a function -- 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=30797 --- Comment #1 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Created attachment 135088 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135088&action=edit Bug 30797: Add the calendar.inc include to addbiblio.tt addbiblio.tt throws the '$(...).flatpickr is not a function' because it is missing includes to flatpickr.min.js and shortcut-buttons-flatpickr.min.js To fix this the addbiblio.tt should include the calendar.inc file (like additem.tt does) which includes to those aforementioned JS files. Test plan: 1. Edit a MARC bibliographic framework 2. Make the 902$d subfield visible in the Editor 3. Also set the 902$d subfield plugin='dateaccessioned.pl' 4. Catalogue a new biblio record 5. Notice the 902$d subfield has not been pre-populated with todays date 6. Right click, choose 'Inspect', observe this JS error in the console: "Uncaught TypeError: $(...).flatpickr is not a function" 7. Apply patch, and restart services 8. Repeat steps 4-6 and this time observe the 902$d is pre-populated, and there is no flatpickr JS error in the console Sponsored-by: Chartered Accountants Australia and New Zealand -- 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=30797 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |alexbuckley@catalyst.net.nz |ity.org | Status|NEW |ASSIGNED -- 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=30797 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|ASSIGNED |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30797 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135088|0 |1 is obsolete| | --- Comment #2 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 135098 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135098&action=edit Bug 30797: Add the calendar.inc include to addbiblio.tt addbiblio.tt throws the '$(...).flatpickr is not a function' because it is missing includes to flatpickr.min.js and shortcut-buttons-flatpickr.min.js To fix this the addbiblio.tt should include the calendar.inc file (like additem.tt does) which includes to those aforementioned JS files. Test plan: 1. Edit a MARC bibliographic framework 2. Make the 902$d subfield visible in the Editor 3. Also set the 902$d subfield plugin='dateaccessioned.pl' 4. Catalogue a new biblio record 5. Notice the 902$d subfield has not been pre-populated with todays date 6. Right click, choose 'Inspect', observe this JS error in the console: "Uncaught TypeError: $(...).flatpickr is not a function" 7. Apply patch, and restart services 8. Repeat steps 4-6 and this time observe the 902$d is pre-populated, and there is no flatpickr JS error in the console Sponsored-by: Chartered Accountants Australia and New Zealand Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30797 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |oleonard@myacpl.org Status|Signed Off |Passed QA --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Taking the liberty to promote to PQA directly. Trivial fix. Note: There is a display problem with the red cross to clear the date field. I linked dateaccessioned to 100$b. The red cross is directly next to Numeration label. The Tag editor button is at the far right side. And the text field is on the line under the red cross. Could you have a look, Owen ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30797 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30797 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30797 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_22_05_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30797 --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Note for RM: The previous comment should not block you from pushing this one. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30797 --- Comment #5 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 135103 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135103&action=edit Bug 30797: (follow-up) Hide default Flatpickr clear-field button The basic MARC editor has its own button associated with each subfield for emptying the contents of the input. Since the Flatpickr "X" icon causes a layout problem and would be redundant, we can hide it on this page. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30797 --- Comment #6 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Thank you Marcel and Owen! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30797 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30797 --- Comment #7 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to master for 22.05, thanks to everybody involved 🦄 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30797 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=31665 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30797 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #8 from Fridolin Somers <fridolin.somers@biblibre.com> --- This should be backported to 21.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30797 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |arthur.suzuki@biblibre.com Status|Pushed to master |Pushed to stable --- Comment #9 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- applied to 21.11.x for 21.11.13 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30797 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |RESOLVED Resolution|--- |FIXED CC| |victor@tuxayo.net --- Comment #10 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed. Nothing to document it seems, marking resolved. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30797 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_22_05_candidate | CC| |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30797 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|22.05.00 |22.05.00,21.11 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30797 --- Comment #11 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- Thanks! Pushed to 21.11 for 21.11.12 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30797 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|22.05.00,21.11 |22.05.00,21.11.12 released in| | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org