Correct special winter handling in predictions user/dbwells/winter_prediction_fix
authorDan Wells <dbw2@calvin.edu>
Tue, 14 Feb 2012 16:09:41 +0000 (11:09 -0500)
committerDan Wells <dbw2@calvin.edu>
Tue, 14 Feb 2012 16:09:41 +0000 (11:09 -0500)
commit779e68172d653cf3759688fd96a21d06d1c0cbc2
tree33de7de502f11c716d4fffbb5f61a9b988247b01
parent7510d7ff71c6cf1f2fc8ba9210a2d7ef34bc52d3
Correct special winter handling in predictions

The current serials prediction code has an exception for handling
cases where 'Winter 2010' is followed by 'Spring 2010' rather than
'Spring 2011'.  This exception assumed the more common case of a
combined subfield $y, e.g.:

$yps21,22,23,24

In doing so, it incorrectly handled less common cases where the $y
is listed separately:

$yps21$yps22$yps23$yps24

This change (with test data) ensures we only check the first $y
for our 'early winter' exception.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Open-ILS/src/perlmods/lib/OpenILS/Utils/MFHD/Caption.pm
Open-ILS/src/perlmods/lib/OpenILS/Utils/MFHD/test/mfhddata.txt