Bug 22097: CataloguingLog should be suppressed for item branch transfers
authorKyle M Hall <kyle@bywatersolutions.com>
Thu, 10 Jan 2019 19:32:22 +0000 (14:32 -0500)
committerNick Clemens <nick@bywatersolutions.com>
Mon, 4 Feb 2019 15:52:57 +0000 (15:52 +0000)
Bug 18816 missed the fact that a branch transfer triggers ModItem and
thus generates an action log line. We should not be creating those
action logs, especially considering the transfers table itself already
documents the transfer.

Test Plan:
1) Enable CataloguingLog
2) Transfer an item to another branch
3) Note the new action log line created
4) Apply this patch
5) Create another item transfer
6) No new action log line should be created!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

C4/Items.pm

index e3b3d11..0f75cb1 100644 (file)
@@ -623,7 +623,7 @@ sub ModItemTransfer {
         VALUES (?, ?, NOW(), ?)");
     $sth->execute($itemnumber, $frombranch, $tobranch);
 
-    ModItem({ holdingbranch => $tobranch }, undef, $itemnumber);
+    ModItem({ holdingbranch => $tobranch }, undef, $itemnumber, { log_action => 0 });
     ModDateLastSeen($itemnumber);
     return;
 }