[Bug 31035] New: Script to update OPACSuppression field depending on hidden items
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31035 Bug ID: 31035 Summary: Script to update OPACSuppression field depending on hidden items Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: fridolin.somers@biblibre.com QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz System preference OPACSuppression enables to skip from search results biblio records with a dedicated search field (usually on 942$n). We should have a script to update this MARC field depending if all items of the record are hidden (OpacHiddenItems and hidelostitems). This is independant from OpacHiddenItemsHidesRecord Bug 18989 that has known issues : Bug 17787, Bug 23923 ... See Bug 24403 dependencies -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31035 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=24403 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31035 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |fridolin.somers@biblibre.co |ity.org |m -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31035 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31035 --- Comment #1 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 136466 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136466&action=edit Bug 31035: Script to update OPACSuppression field depending on hidden items WIP -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31035 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #2 from David Cook <dcook@prosentient.com.au> --- This script would break the functionality introduced by the syspref "OpacHiddenItemsExceptions" though, unfortunately. I thought about this a bunch while working on bug 19704. In theory, you could enqueue a background job, when "OpacHiddenItems" is saved, which could process every record with items and then update a "biblio.hidden" field (so that it can be queried for SQL searches and not just Search Engine searches), if "OpacHiddenItemsHidesRecord" is set. -- Maybe the solution is to get rid of "OpacHiddenItemsExceptions" and then either use a cronjob or a background job to update the 942$n/biblio.hidden. It would be great to be able to eliminate the post-processing of records/items caused by "OpacHiddenItems", so generally speaking I'm on board for what you're trying to do! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31035 --- Comment #3 from Fridolin Somers <fridolin.somers@biblibre.com> --- (In reply to David Cook from comment #2)
This script would break the functionality introduced by the syspref "OpacHiddenItemsExceptions" though, unfortunately. Indeed I will add this to doc.
I thought about this a bunch while working on bug 19704.
In theory, you could enqueue a background job, when "OpacHiddenItems" is saved, which could process every record with items and then update a "biblio.hidden" field (so that it can be queried for SQL searches and not just Search Engine searches), if "OpacHiddenItemsHidesRecord" is set.
Sure, a data field in biblio whould be really great. Maybe biblio.opac_hidden.
--
Maybe the solution is to get rid of "OpacHiddenItemsExceptions" and then either use a cronjob or a background job to update the 942$n/biblio.hidden.
Indeed the complexity is hard with this feature. We should ask who uses it.
It would be great to be able to eliminate the post-processing of records/items caused by "OpacHiddenItems", so generally speaking I'm on board for what you're trying to do!
With this script actually you can not manually hide on purpose a biblio record. I was thinking we could define a special value for the OPACSuppress field, like "2". Value "1" would be used to manually hide biblio record. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31035 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136466|0 |1 is obsolete| | --- Comment #4 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 136472 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136472&action=edit Bug 31035: Script to update OPACSuppression field depending on hidden items -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31035 --- Comment #5 from Fridolin Somers <fridolin.somers@biblibre.com> --- Script it still WIP but seems it works. You may test it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31035 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136472|0 |1 is obsolete| | --- Comment #6 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 144793 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144793&action=edit Bug 31035: Script to update OPACSuppression field depending on hidden items -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31035 pierre.genty@biblibre.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pierre.genty@biblibre.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31035 --- Comment #7 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 154852 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=154852&action=edit Bug 31035: (follow-up) handle broken MARCXML Plus show progress each 1000 records -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31035 --- Comment #8 from Fridolin Somers <fridolin.somers@biblibre.com> --- Currently we use this script but not for OpacSuppress feature in Koha's OPAC. The script is used to set special field 099$o to 1 when all items are hidden. This allows to define an OAI set with 099$o != 1. This set is used for portal import of records, skipping unwanted records. May also be used to filter records export to portal. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31035 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=38330 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31035 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31035 --- Comment #9 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 189796 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189796&action=edit Bug 31035: (follow-up) Add skip_holds_queue Patch from commit 2e95099 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31035 --- Comment #10 from Fridolin Somers <fridolin.somers@biblibre.com> --- (In reply to Fridolin Somers from comment #8)
Currently we use this script but not for OpacSuppress feature in Koha's OPAC.
Mmm dont know why I said that ;) We use it mainly for OpacSuppress feature in Koha's OPAC -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org