[Koha-bugs] [Bug 31161] OAI-PMH - Add ability to exclude suppressed records in output

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Oct 11 07:38:25 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31161

--- Comment #15 from David Cook <dcook at prosentient.com.au> ---
So it turns out the OAI-PMH already hides items using OpacHiddenItems:
- Koha::OAI::Server::Repository->get_biblio_marcxml()
- C4::Biblio::GetMarcBiblio
- C4::Biblio::EmbedItemsInMarcBiblio

To avoid double-handling and performance penalties for determining record-level
suppression using OpacHiddenItems, it would make sense for
C4::Biblio::GetMarcBiblio to return null on a hidden record, and for
C4::Biblio::EmbedItemsInMarcBiblio to return a "hide_bib" status if it's hidden
all the items via OpacHiddenItems.

--

Of course, C4::Biblio::GetMarcBiblio is a very entrenched function, so I don't
think we can alter default behaviour. I'm thinking that we add a parameter like
"suppression".

This parameter would be an empty hash reference, which can be checked after
C4::Biblio::GetMarcBiblio is called without affecting its return values. 

If OpacSuppression isn't turned on or isn't applicable, then the "suppression"
gets passed to C4::Biblio::EmbedItemsInMarcBiblio as well. 

If the "suppression" returns a "hide_biblio" after that call, then
C4::Biblio::GetMarcBiblio returns null.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list