Bug 34353: (QA follow-up) Fix QA script failures

- Replace IFNULL with COALESCE in the atomicupdate to satisfy the
  forbidden_patterns check (IFNULL is non-standard SQL).
- Run misc/devel/tidy.pl over the modified catalogue_detail.inc to
  satisfy the tidiness check.

Test plan:
1. Run the QA script against the patch series and confirm both
   forbidden_patterns and tidiness checks pass.
2. Re-run the parent commit's test plan and confirm spine-label column
   visibility behaves identically.

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Martin Renvoize 2026-04-27 08:12:48 +01:00 committed by Lucas Gass
parent 1de09a6294
commit 7c25f2d4f1
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
2 changed files with 2 additions and 5 deletions

View File

@ -18,7 +18,7 @@ return {
(module, page, tablename, columnname, cannot_be_toggled, is_hidden)
VALUES
('catalogue', 'detail', ?, 'spinelabel', 0,
(SELECT IFNULL(
(SELECT COALESCE(
(SELECT NOT value FROM systempreferences WHERE variable='SpineLabelShowPrintOnBibDetails'),
0)))
ON DUPLICATE KEY UPDATE is_hidden=(is_hidden OR VALUES(is_hidden))},

View File

@ -872,10 +872,7 @@
searchable: false,
orderable: false,
render: function (data, type, row, meta) {
return '<a class="btn btn-default btn-xs print-label" href="/cgi-bin/koha/labels/spinelabel-print.pl?barcode=%s"><i class="fa fa-print"></i> %s</a>'.format(
escape_str(row.external_id),
escape_str(_("Print label"))
);
return '<a class="btn btn-default btn-xs print-label" href="/cgi-bin/koha/labels/spinelabel-print.pl?barcode=%s"><i class="fa fa-print"></i> %s</a>'.format(escape_str(row.external_id), escape_str(_("Print label")));
},
},
...(Koha.permissions.CAN_user_editcatalogue_edit_items