Solidify caption/holding relationship, improve MFHD::Holding comparisons
authorDan Wells <dbw2@calvin.edu>
Tue, 2 Jul 2013 15:55:21 +0000 (11:55 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Fri, 9 Aug 2013 15:21:56 +0000 (11:21 -0400)
commitb895fdf27a2a0e9f621f7f96a05a30ceb78cb5b2
tree6922091107da99108b625f042627c0bc1f1050eb
parent22c4108b384ca0f1d6dc9d75bcef92b4fb6e8e12
Solidify caption/holding relationship, improve MFHD::Holding comparisons

[This commit has been squashed for merging. LFW]

  * This commit:
    - Makes sure that holding data is valid for the given caption
      for new holding objects
    - Teaches field_values() to fall back to '*' (unknown marker)
      when a holding is missing data
    - Allows the caption() method to be a setter

  * This commit:
    - Makes the comparison operator consider chron data, not just
      enumeration data
    - Teaches the comparison operator a way to handle 'unsure' data
      (that is, data presented in brackets [])

  * The code was assuming the $end_holding param would be uncompressed,
    but this was not stated anywhere, nor enforced.  Let's allow the
    method to take both compressed and uncompressed holdings as the "end"
    (and handle it appropriately).

  * Add some holdings with missing and unsure data to test the new
    comparison operators handling of such data.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/Utils/MFHD/Holding.pm
Open-ILS/src/perlmods/lib/OpenILS/Utils/MFHD/test/mfhddata2.txt