[Koha-bugs] [Bug 30797] Subfields linked to the dateaccessioned.pl value builder on addbiblio.pl throw a JS error

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed May 18 06:38:58 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30797

--- Comment #1 from Alex Buckley <alexbuckley at 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.


More information about the Koha-bugs mailing list