Bugzilla – Attachment 168151 Details for
Bug 37192
Can't print label from the item editor
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37192: Make label printing from the item editor work by accepting the op add
Bug-37192-Make-label-printing-from-the-item-editor.patch (text/plain), 1.77 KB, created by
Eric Garcia
on 2024-06-26 14:46:37 UTC
(
hide
)
Description:
Bug 37192: Make label printing from the item editor work by accepting the op add
Filename:
MIME Type:
Creator:
Eric Garcia
Created:
2024-06-26 14:46:37 UTC
Size:
1.77 KB
patch
obsolete
>From fe44818d05355702f5be644e5d7f02551df2496b Mon Sep 17 00:00:00 2001 >From: Phil Ringnalda <phil@chetcolibrary.org> >Date: Tue, 25 Jun 2024 20:20:51 -0700 >Subject: [PATCH] Bug 37192: Make label printing from the item editor work by > accepting the op add > >Some parts of the UI for adding items to a label batch (and there's lots of >different UI to do it) want to POST items to add to a batch, so CSRF >protection switched the op to add an item to cud-add. However, the item >editor needs to create a batch of one from its Actions menu by just opening >a popup, so it wants to GET ?op=add. Accepting both ops will keep all the >variety of UIs happy. > >Test plan: >1. Search the catalog for something that will return results, like Perl >2. On any bib that has at least one item, click Edit items >3. In the Actions menu to the left of any item, choose Print label >4. That opened a popup with a 500 error rather than a label batch editor >5. Apply patch, restart_all >6. Repeat step 3, but this time you'll get a label batch editor with your > item in it. > >Signed-off-by: Eric Garcia <cubingguy714@gmail.com> >--- > labels/label-edit-batch.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/labels/label-edit-batch.pl b/labels/label-edit-batch.pl >index 23bd9e77d4..fc1cfded08 100755 >--- a/labels/label-edit-batch.pl >+++ b/labels/label-edit-batch.pl >@@ -81,7 +81,7 @@ elsif ($op eq 'cud-delete') { > $err = C4::Labels::Batch::delete(batch_id => $batch_id, branch_code => $branch_code); > $errtype = 'BATCH_NOT_DELETED' if $err; > } >-elsif ($op eq 'cud-add') { >+elsif ($op eq 'cud-add' || $op eq 'add') { > if ($number_list) { > my @numbers_list = split /\n/, $number_list; # Entries are effectively passed in as a <cr> separated list > foreach my $number (@numbers_list) { >-- >2.30.2
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 37192
:
168117
| 168151