Bug 30509

Summary: Accordion on letter.tt is broken
Product: Koha Reporter: Lucas Gass <lucas>
Component: NoticesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: andrewfh, kyle, martin.renvoize
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:
22.05.00,21.11.06
Bug Depends on: 30011    
Bug Blocks:    
Attachments: Bug 30509: Fix configuration of Notices accordion widget
Bug 30509: Fix configuration of Notices accordion widget
Bug 30509: Fix configuration of Notices accordion widget

Description Lucas Gass 2022-04-11 15:35:25 UTC
At '/cgi-bin/koha/tools/letter.pl' the accordion for changing between Email, Print, SMS notice templates is broken. All of the templates are showing at the same time.

It looks to be related to a JS error coming from letter.js:

Uncaught TypeError: t.find(...).even is not a function
Comment 1 Owen Leonard 2022-04-11 17:08:05 UTC
Created attachment 133196 [details] [review]
Bug 30509: Fix configuration of Notices accordion widget

The jQueryUI upgrade broke the Accordion on the notices edit page. I'm
not sure why, but defining a "header" option in the accordion
configuration fixes it.

To test, apply the patch and test the notices edit page both with and
without TranslateNotices and multiple languages installed. In both cases
the different sections (Email, Print, SMS) should open and close
correctly.
Comment 2 Lucas Gass 2022-04-11 17:32:01 UTC
Created attachment 133197 [details] [review]
Bug 30509: Fix configuration of Notices accordion widget

The jQueryUI upgrade broke the Accordion on the notices edit page. I'm
not sure why, but defining a "header" option in the accordion
configuration fixes it.

To test, apply the patch and test the notices edit page both with and
without TranslateNotices and multiple languages installed. In both cases
the different sections (Email, Print, SMS) should open and close
correctly.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 3 Martin Renvoize 2022-04-19 08:28:36 UTC
Created attachment 133392 [details] [review]
Bug 30509: Fix configuration of Notices accordion widget

The jQueryUI upgrade broke the Accordion on the notices edit page. I'm
not sure why, but defining a "header" option in the accordion
configuration fixes it.

To test, apply the patch and test the notices edit page both with and
without TranslateNotices and multiple languages installed. In both cases
the different sections (Email, Print, SMS) should open and close
correctly.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 4 Martin Renvoize 2022-04-19 08:29:58 UTC
Hmm, fix works as described and I'm not seeing any other regressions.. No idea why it works though, I can't find anything in the jQueryUI docs to suggest this is required.. 

But.. it works.. so Passing QA
Comment 5 Fridolin Somers 2022-04-20 07:24:18 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 6 Kyle M Hall 2022-04-29 16:57:41 UTC
Pushed to 21.11.x for 21.11.06
Comment 7 Andrew Fuerste-Henry 2022-05-03 19:59:22 UTC
Missing dependency, not backported to 21.05