From: blake Date: Wed, 23 Dec 2015 20:20:40 +0000 (-0600) Subject: LP#1466990: Detailed search results shows parts for items that dont have parts X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=8a550811b93d1c47bec5117c99d2b97dba20cf9e;p=Evergreen.git LP#1466990: Detailed search results shows parts for items that dont have parts The part_label variable needs to be reset between iterations. The variable was still set and bled from copy to copy. Testing this will require a search with details turned on. The search result set needs to include a bib that has copies with parts (with at least one copy invisible) and another bib that has copies without parts. Signed-off-by: blake Signed-off-by: Ben Shum --- diff --git a/Open-ILS/src/templates/opac/parts/misc_util.tt2 b/Open-ILS/src/templates/opac/parts/misc_util.tt2 index d1fb13550c..a07aac5b5d 100644 --- a/Open-ILS/src/templates/opac/parts/misc_util.tt2 +++ b/Open-ILS/src/templates/opac/parts/misc_util.tt2 @@ -488,6 +488,7 @@ copies = volume.findnodes('./*[local-name()="copies"]/*[local-name()="copy"]'); FOR copy IN copies; parts = copy.findnodes('./*[local-name()="monograph_parts"]/*[local-name()="monograph_part"]'); + part_label = ''; FOREACH part IN parts; part_label = part.getAttribute('label'); LAST IF part_label != '';