Bugzilla – Attachment 182124 Details for
Bug 23010
If an item is checked out or in transit it should not be able to be marked withdrawn
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23010: Handle error in C4/Items.pm using try/catch
Bug-23010-Handle-error-in-C4Itemspm-using-trycatch.patch (text/plain), 1.00 KB, created by
Lucas Gass (lukeg)
on 2025-05-08 21:30:15 UTC
(
hide
)
Description:
Bug 23010: Handle error in C4/Items.pm using try/catch
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2025-05-08 21:30:15 UTC
Size:
1.00 KB
patch
obsolete
>From 0175434e51a78d3f9c3942b628be0e76a40c6c8e Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Thu, 8 May 2025 21:28:23 +0000 >Subject: [PATCH] Bug 23010: Handle error in C4/Items.pm using try/catch > >--- > C4/Items.pm | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index 7f9f3fccdc2..2c22518dc5b 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -1732,7 +1732,17 @@ sub ToggleNewStatus { > $item->$field($value); > push @{ $report->{$itemnumber} }, $substitution; > } >- $item->store unless $report_only; >+ unless ($report_only) { >+ try { >+ $item->store; >+ } catch { >+ push @{ $report->{$itemnumber} }, { >+ field => 'ERROR', >+ error => 1, >+ value => $_->error, >+ } >+ } >+ } > } > } > >-- >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 23010
:
176241
|
177299
|
177402
|
177413
|
177434
|
177435
|
177436
|
177437
|
177451
|
177452
|
177453
|
177454
|
177911
|
177912
|
177913
|
177914
|
178808
|
181322
|
181323
|
181324
|
181325
|
181326
|
181327
|
181400
| 182124 |
182129
|
182130
|
182131