LP#1466990: Detailed search results shows parts for items that dont have parts
authorblake <blake@mobiusconsortium.org>
Wed, 23 Dec 2015 20:20:40 +0000 (14:20 -0600)
committerBen Shum <ben@evergreener.net>
Wed, 24 Feb 2016 03:56:49 +0000 (22:56 -0500)
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 <blake@mobiusconsortium.org>
Signed-off-by: Ben Shum <ben@evergreener.net>
Open-ILS/src/templates/opac/parts/misc_util.tt2

index c889c55..e995a92 100644 (file)
                 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 != '';