[Koha] Suppressed Bibs Export Issues

Eric Phetteplace ephetteplace at cca.edu
Thu Jan 19 08:08:41 NZDT 2017


Hi list,

I'm struggling to find the best way to perform weekly exports of only our
*visible* catalog records. We have a discovery layer which takes updated
MARC exports, but if a record is suppressed in Koha (either by
OpacHiddenItems or 942$n) it still appears in search results, albeit as a
broken link.

I partially avoid records suppressed at the bib level by excluding bibs
where 942$n = 'Y' or '1' in our export report. The report looks at which
bibs are new or have been updated since the last time I ran it. There are
two problems though:

1) bib records where *all* attached items meet our OpacHiddenItems criteria
also need to be suppressed
2) I send newly-deleted record lists too, but not newly-suppressed records
(which should be treated as deleted)

Sorry if that doesn't make much sense. Basically, I need my current
"recently updated bibs" report to skip bibs were all items are hidden in
the OPAC*, and I need my "deleted records" report to also include bibs
which *used to be visible* but became suppressed since the last update. My
SQL knowledge isn't up to either of these tasks.

Alternatively, is there some workflow or metadata change we can make to
help with this? For instance, what if we stopped using OpacHiddenItems and
always suppressed items by setting 942$n? That would fix my first problem,
but not the second.

My other thought is to use an external database or post-processing script
that would let me perform more complex logical checks on records before
including them in the update. For instance, a PyMARC script which checks
each 952 field on an exported MARC record to see if the record meets our
OpacHiddenItems criteria. That's more work than a SQL report but perhaps
necessary.

* current "updated bibs" report:

SELECT biblionumber
FROM biblioitems
WHERE DATE(timestamp) >= <<update since|date>>
-- skip suppressed bibs
AND ExtractValue(marcxml,
'//datafield[@tag="942"]/subfield[@code="n"]' ) NOT IN ('Y', '1')


Best,
Eric Phetteplace
Systems Librarian
California College of the Arts
libraries.cca.edu | vault.cca.edu
510.594.3660
2>/dev/null


More information about the Koha mailing list