Comment 7 for bug 1832897

Revision history for this message
Jane Sandberg (sandbergja) wrote :

One last note: I think there is an inconsistency in how shelving locations are handled in the "Newly Catalogued Items" carousel type. The carousel type does have "Filter By Item Location" set to true, but the $new_items_query doesn't have a spot for LOC_LIST.

And if you add some Item Locations to a Newly Catalogued Item carousel and run refresh_carousels.srfsh, you get this error:

Received Exception:
Name: osrfMethodException
Status: *** Call to [open-ils.storage.carousel.refresh_all] failed for session [1567268440.381267.156726844014243], thread trace [1]:
DBD::Pg::st execute failed: called with 15 bind variables when 14 are needed [for Statement "
    WITH c_attr AS (SELECT c_attrs::query_int AS vis_test FROM asset.patron_default_visibility_mask() x)
    SELECT acn.record AS bib
    FROM asset.call_number acn
    JOIN asset.copy acp ON (acp.call_number = acn.id)
    JOIN asset.copy_location acpl ON (acp.location = acpl.id)
    JOIN config.copy_status ccs ON (acp.status = ccs.id)
    , c_attr
    WHERE acn.owning_lib IN (?,?,?,?,?,?)
    AND acp.circ_lib IN (?,?,?,?,?,?)
    AND acp.holdable
    AND acp.circulate
    AND ccs.holdable
    AND acpl.holdable
    AND acpl.circulate
    AND acp.active_date > NOW() - ?::INTERVAL
    AND (EXISTS (SELECT 1 FROM asset.copy_vis_attr_cache WHERE record = acn.record AND vis_attr_vector @@ c_attr.vis_test))
    AND (NOT EXISTS (SELECT 1 FROM metabib.record_attr_vector_list WHERE source = acn.record AND vlist @@ metabib.compile_composite_attr(' {"1":[{"_val":"s","_attr":"bib_level"}]}')::query_int))
    GROUP BY acn.record
    ORDER BY MIN(AGE(acp.active_date))
    LIMIT ?
" with ParamValues: 1=undef, 2=undef, 3=undef, 4=undef, 5=undef, 6=undef, 7=undef, 8=undef, 9=undef, 10=undef, 11=undef, 12=undef, 13=undef, 14=undef] at /usr/share/perl5/DBIx/ContextualFetch.pm line 52.

Status: 500