Comment 7 for bug 1741997

Revision history for this message
Bill Erickson (berick) wrote :

Commenting here since it's related to the search.bib_is_visible() function proposed in Galen's branch...

I found on a 3.2 system transcendent bibs (no copies, no call numbers, no URI's) were visible in patron browse results, but not staff browse results. After much head scratching, I ended up adding this near the top of metabib.staged_browse():

====
         row_number := -1;
     END IF;

- IF NOT staff THEN
+ IF STAFF THEN
+ SELECT asset.bib_source_default() || '|' INTO b_tests;
+ ELSE
         SELECT x.c_attrs, x.b_attrs INTO c_tests, b_tests
           FROM asset.patron_default_visibility_mask() x;
     END IF;
===

I'm not confident this is the best solution, but presumably similar logic will be needed in search.bib_is_visible(). Maybe we need an asset.staff_default_visbility_mask() function?

Related, should we teach metabib.staged_browse() to call the proposed new search.bib_is_visible() function instead of repeating the logic internally?