Bug 21027: Fix checkout statistics if 1+ of the fields is not defined
TEST - Use a patron who hasn't checked out items before - Set StatisticsFields to itype|ccode - Check out some items without location - Verify that statistics stable shows the correct number of checkouts - Check out one item with a location or just change one of your checked out items - Verify the total is still correct - Change StatisticsFields to location|itype|ccode - Verify the total has changed now - it's only 1 (the one with a location) Apply the patch and try again Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
f829221f81
commit
17a71b9900
1 changed files with 4 additions and 1 deletions
|
@ -198,7 +198,10 @@ sub merge {
|
|||
for my $ch ( @r ) {
|
||||
$exists = 1;
|
||||
for my $cn ( @statistic_column_names ) {
|
||||
if ( $ch->{$cn} and not $ch->{$cn} eq $h->{$cn} ) {
|
||||
if ( ( not defined $ch->{$cn} && defined $h->{$cn} )
|
||||
|| ( defined $ch->{$cn} && not defined $h->{$cn} )
|
||||
|| ( $ch->{$cn} ne $h->{$cn} ) )
|
||||
{
|
||||
$exists = 0;
|
||||
last;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue