Bug 41747

Summary: xt/js_tidy is failing on ill js files
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: Failed QA --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: martin.renvoize
Version: unspecified   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 41747: Tidy js/ill-availability.js

Description Jonathan Druart 2026-02-02 09:31:45 UTC
20:04:28 koha-1      | #   Failed test 'koha-tmpl/intranet-tmpl/prog/js/ill-availability.js should be kept tidy'
20:04:28 koha-1      | #   at xt/js_tidy.t line 36.
20:04:28 koha-1      | 
20:04:28 koha-1      | #   Failed test 'koha-tmpl/opac-tmpl/bootstrap/js/ill-availability.js should be kept tidy'
20:04:28 koha-1      | #   at xt/js_tidy.t line 36.
20:04:28 koha-1      | Everything up-to-date
20:04:28 koha-1      | # Looks like you failed 2 tests of 3.
20:04:28 koha-1      | [20:03:48] xt/js_tidy.t ................................................................
Comment 1 Jonathan Druart 2026-02-02 09:42:37 UTC
Created attachment 192287 [details] [review]
Bug 41747: Tidy js/ill-availability.js

xt/js_tidy.t does not check all files every run (it's using the incremental runs).
Something happened (node version changed?) and this is triggered because bug 41512 modified those files

Test plan:
0. Do not apply this patch
1. KOHA_CI_INCREMENTAL_RUNS=1 prove xt/js_tidy.t
=> fail
2. Apply this patch
3. Run prove again
=> pass

4. Run prove without the env var set
=> pass (i.e. there are no other JS files not tidy)
Comment 2 Martin Renvoize (ashimema) 2026-02-02 18:10:01 UTC
For me, running the qa tools in ktd says this file is untidy.. I run the suggested tidy and it reverses your changes here.
Comment 3 Jonathan Druart 2026-02-02 20:43:12 UTC
(In reply to Martin Renvoize (ashimema) from comment #2)
> For me, running the qa tools in ktd says this file is untidy.. I run the
> suggested tidy and it reverses your changes here.

which OS, which version of perltidy?
Comment 4 Jonathan Druart 2026-02-02 20:44:19 UTC
It's actually failing on Jenkins last run (Koha_Main/3560), that's why I submitted the patch.