Bug 30388

Summary: Fix some errors in the template for ordering from a MARC file
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: lucas, testopia
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00
Circulation function:
Bug Depends on: 30384    
Bug Blocks: 30389    
Attachments: Bug 30388: Fix some errors in the template for ordering from a MARC file
Bug 30388: Fix some errors in the template for ordering from a MARC file
Bug 30388: Fix some errors in the template for ordering from a MARC file

Description Owen Leonard 2022-03-28 16:57:52 UTC
While working on Bug 30384 I noticed some small fixes to be done in the addorderiso2709 template.
Comment 1 Owen Leonard 2022-03-28 17:40:43 UTC Comment hidden (obsolete)
Comment 2 Chris Cormack 2022-05-05 20:30:30 UTC
Created attachment 134660 [details] [review]
Bug 30388: Fix some errors in the template for ordering from a MARC file

This patch fixes a few markup errors in the addorder2709 template. The
modal dialog markup is corrected and moved out of the loop of records so
that it doesn't create repeating id attributes. Obsolete CSS is removed,
fixing the width of the MARC preview modal.

The calendar include is added, fixing a Flatpickr error in the console.

Double ID attributes are removed from the Statistics 1 and Statistics 2
fields.

To test, apply the patch and test the process of adding an order to a
basket from a staged MARC file. Test in particular:

 - The MARC and Card previews
 - The "Date acquired" field under the "Item information" tab should
   trigger a Flatpickr widget.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Comment 3 Katrin Fischer 2022-05-06 07:49:03 UTC
Hi Owen,

with the patch set applied, I still get a JavaScript error in the console when changing the date accessioned from the item information tab:

Uncaught ReferenceError: dateformat_string is not defined
Comment 4 Owen Leonard 2022-05-06 16:58:26 UTC
Did you try testing this with the patch for Bug 30514 applied?
Comment 5 Katrin Fischer 2022-05-07 15:37:13 UTC
Yes, this was on top. I had tested the dependency first.
Comment 6 Owen Leonard 2022-05-10 11:39:16 UTC
I've tried this a few times and just can't reproduce the problem Katrin describes. If someone could re-check it I'd be grateful.
Comment 7 Katrin Fischer 2022-05-13 08:06:34 UTC
Retesting...
Comment 8 Katrin Fischer 2022-05-13 08:08:57 UTC
Maybe a side effect of another fix or just sun spots... but it works now :)
Comment 9 Katrin Fischer 2022-05-13 08:10:02 UTC
Created attachment 134951 [details] [review]
Bug 30388: Fix some errors in the template for ordering from a MARC file

This patch fixes a few markup errors in the addorder2709 template. The
modal dialog markup is corrected and moved out of the loop of records so
that it doesn't create repeating id attributes. Obsolete CSS is removed,
fixing the width of the MARC preview modal.

The calendar include is added, fixing a Flatpickr error in the console.

Double ID attributes are removed from the Statistics 1 and Statistics 2
fields.

To test, apply the patch and test the process of adding an order to a
basket from a staged MARC file. Test in particular:

 - The MARC and Card previews
 - The "Date acquired" field under the "Item information" tab should
   trigger a Flatpickr widget.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 10 Tomás Cohen Arazi (tcohen) 2022-06-06 17:02:51 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 11 Lucas Gass (lukeg) 2022-07-12 15:52:50 UTC
Missing dependencies for 22.05.x, no backport