From f7486df3c075fff2aacf90781714f41e3754d007 Mon Sep 17 00:00:00 2001
From: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Date: Tue, 30 May 2023 18:26:21 +0000
Subject: [PATCH] Bug 33698: Add fields to the verbose output that show the
 barcode and title of items that cannot be deleted

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
---
 misc/cronjobs/delete_items.pl | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/misc/cronjobs/delete_items.pl b/misc/cronjobs/delete_items.pl
index 4473ca51ab..ac86b07648 100755
--- a/misc/cronjobs/delete_items.pl
+++ b/misc/cronjobs/delete_items.pl
@@ -83,7 +83,11 @@ DELITEM: while ( my $item = $GLOBAL->{sth}->{target_items}->fetchrow_hashref() )
             if $OPTIONS->{flags}->{commit};
         verbose "Deleting '$item->{itemnumber}'";
     } else {
-        verbose sprintf "Item '%s' not deleted: %s", $item->{itemnumber}, @{$safe_to_delete->messages}[0]->message
+        verbose sprintf "Item '%s' (Barcode: '%s', Title: '%s') not deleted: %s",
+                $item->{itemnumber},
+                $item_object->barcode,
+                $item_object->biblio->title,
+                @{$safe_to_delete->messages}[0]->message;
     }
 }
 
-- 
2.30.2