Bugzilla – Attachment 194707 Details for
Bug 41571
Tidy kohaTable block - labels
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41571: (QA follow-up) Rename shadowing batch_id variables
Bug-41571-QA-follow-up-Rename-shadowing-batchid-va.patch (text/plain), 2.29 KB, created by
Paul Derscheid
on 2026-03-06 12:55:31 UTC
(
hide
)
Description:
Bug 41571: (QA follow-up) Rename shadowing batch_id variables
Filename:
MIME Type:
Creator:
Paul Derscheid
Created:
2026-03-06 12:55:31 UTC
Size:
2.29 KB
patch
obsolete
>From 5c7b4ec3dfb22a1e98d8b1cd54b6a408fb2ff689 Mon Sep 17 00:00:00 2001 >From: Paul Derscheid <paul.derscheid@lmscloud.de> >Date: Fri, 6 Mar 2026 13:53:18 +0100 >Subject: [PATCH] Bug 41571: (QA follow-up) Rename shadowing batch_id variables > >- The top-level const batch_id (from TT) is shadowed by var > batch_id inside the .export and #savedesc click handlers >- This works correctly now but is confusing and error-prone > if the code is later refactored >- Rename to export_batch_id and save_batch_id respectively > to make the intent clear > >Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> >--- > .../prog/en/modules/labels/label-edit-batch.tt | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt >index 6e69667841b..d743238231d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt >@@ -364,17 +364,17 @@ > }); > $(".export").on("click", function (e) { > e.preventDefault(); >- var label_id = $(this).data("label-id"); >- var batch_id = $(this).data("batch-id"); >- location.href = "/cgi-bin/koha/labels/label-print.pl?batch_id=" + batch_id + "&label_id=" + label_id; >+ var export_label_id = $(this).data("label-id"); >+ var export_batch_id = $(this).data("batch-id"); >+ location.href = "/cgi-bin/koha/labels/label-print.pl?batch_id=" + export_batch_id + "&label_id=" + export_label_id; > }); > $("#savedesc").click(function (event) { > event.preventDefault(); // prevent form submission > var newdescription = $('input[name="description"]').val(); >- var batch_id = $(this).data("batch_id"); >+ var save_batch_id = $(this).data("batch_id"); > var ajaxData = { > newdescription: newdescription, >- batch_id: batch_id, >+ batch_id: save_batch_id, > op: "cud-set_permission", > csrf_token: $('meta[name="csrf-token"]').attr("content"), > }; >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 41571
:
191130
|
191131
|
191132
|
191407
|
191408
|
191409
|
194704
|
194705
|
194706
| 194707