Overdue notices that make use of the <item>.... </item> feature to grab specific fields from biblio, biblioitems and items are getting the wrong item information pulled into them. This stems from the use of the biblionumber as the key to the items table. See the following code snippet from overdue_notices.pl: sub parse_letter { # FIXME: this code should probably be moved to C4::Letters:parseletter my $params = shift; ---Snip---- if ( $params->{'biblionumber'} ) { my $item_format = ''; PROCESS_ITEMS: while (scalar(@{$params->{'biblionumber'}}) > 0) { my $item = shift @{$params->{'biblionumber'}}; ---Snip---- $params->{'letter'} = C4::Letters::parseletter( $params->{'letter'}, 'biblio', $item ); $params->{'letter'} = C4::Letters::parseletter( $params->{'letter'}, 'biblioitems', $item ); $params->{'letter'} = C4::Letters::parseletter( $params->{'letter'}, 'items', $item ); The same key value is used for all three fields. This could theoretically also be a problem for biblioitems, but this is highly unlikely in Koha 3.X unless local database changes were made. The params past to parseletter are in an array called @items, but they are biblionumbers, possibly leading to some of this confusion.
I have signed off on Ian's patch
Created attachment 2612 [details] [review] patch
The patch submitted here is essentially re-implemented with the fix for bug 5381. Marking this bug as a duplicate. *** This bug has been marked as a duplicate of bug 5381 ***