From ce53aac2a20c3dc017b10bf4c053ddd74171a6c3 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 19 Jul 2011 09:12:30 -0400 Subject: [PATCH] Fix for Bug 6600, Library name linking wrong if current location is different GetItemsInfo in Items.pm includes this join: LEFT JOIN branches ON items.homebranch = branches.branchcode This means that the branch URL (from the branches table) comes out as the URL for items.homebranch, thus the URL in the holdings output is the item's home branch even though the display might be showing a different current location. This patch changes the join to use items.holdingbranch. The join was originally added to fix Bug 3702, and based on the description of that feature I'm assuming this change is not harmful to other usages. However, it does make the assumption that the item's current (holding) branch is the branch we want to see information about. Signed-off-by: Nicole Engard Signed-off-by: Ian Walls Signed-off-by: Chris Cormack (cherry picked from commit 6ade95d5db2f2b6a0a2d47d53aecae26a9997243) Signed-off-by: Chris Nighswonger --- C4/Items.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Items.pm b/C4/Items.pm index 69557aabdf..2e85130932 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -1176,7 +1176,7 @@ sub GetItemsInfo { itemtypes.notforloan as notforloan_per_itemtype, branchurl FROM items - LEFT JOIN branches ON items.homebranch = branches.branchcode + LEFT JOIN branches ON items.holdingbranch = branches.branchcode LEFT JOIN biblio ON biblio.biblionumber = items.biblionumber LEFT JOIN biblioitems ON biblioitems.biblioitemnumber = items.biblioitemnumber LEFT JOIN itemtypes ON itemtypes.itemtype = " -- 2.39.5