Comment 6 for bug 1966342

Revision history for this message
Mike Rylander (mrylander) wrote :

Hi Terran,

FWIW, (and, regarding the bug that Elaine mentioned) there were actually two different color codings, one for "is entirely empty" and one for "will only show up in staff searches".

Luckily the copy count data structure should already contain all the information to figure out which color, if either, should be used. In particular, for the latter there is an "unshadow" value which is (basically) the OPAC-visible count of items, and a "transcendant" [sic] value that indicates the bib's source's value for that flag. Located URIs are a new wrinkle, but should be manageable.

There may be nuances to address, but IIRC the logic should be something like:

 * If "unshadow" is non-zero, the record shouldn't be colored
 * If "transcendant" is truthy, the record shouldn't be colored
 * If the copy count is zero, and "transcendant" is false-ish, AND there are no located URIs (which were invented /after/ this color coding was dropped, IIRC) then it should get the "entirely empty" color
 * If "unshadow" is zero, copy count is non-zero, "transcendant" is false-ish, and there are no located URIs, is should get the "staff only" color

HTH!