At present, to make a record visible or hidden on OPAC, librarians need to edit the record and change the value of field/subfield indexed in OpacSuppress. It would also be great to display current opac visibility status in staff interface. For doing that, I propose to create 2 subs in C4/Biblio : GetBiblioOPACVisibility and ModBiblioOPACVisibility. Koha will need to know the field/subfield used for OpacSuppress. Maybe with a syspref. ModBiblioOPACVisibility will be called by addbiblio.pl if $op = "hidebiblioOPAC" or "showbiblioOPAC". A choice to hide/show record in OPAC will be add in "Edit" list button in cat-toolbar.inc. Only staff with cataloguing permission (or maybe also a new specific permission) could see these new choices. GetBiblioOPACVisibily will be called by detail.pl, ISBDdetail.pl, MARCdetail.pl . The value will be passed to the templates and displayed. I have started working on this, but I will probably wait the solution of 8462 before attaching a patch. M. Saby Rennes 2 university
> Koha will need to know the field/subfield used for OpacSuppress. Maybe with a syspref. I think a new column in bibio table and a mapping will be better, i allows to query hidden status in SQL.
Hell Fridolyn I am trying to work on that, but I don't know how to fill the new column in biblio : I need to get the fied used by Zebra. Do you know if it is stored somewhere in Koha ? If not, I fear the only way would be to write a script that will search for the information in zebra conf files, and I am not sure of being able of doing that... Mathieu
(In reply to mathieu saby from comment #2) > I am trying to work on that, but I don't know how to fill the new column in > biblio : I need to get the fied used by Zebra. If a new column is created, for example : biblioitems.opacvisibility. If the field indexed in OpacSuppress is 942$n for example. Define a Koha to MARC mapping between 942$n and biblioitems.opacvisibility. In this case, the database column will be filled on record creation/edition. In GetBiblioOPACVisibility, simply read the field opacvisibility. In ModBiblioOPACVisibility, get the field/subfields form framework definition and use it to edit the MARC record (database column will be edited automatically). This would be great.
I like your idea, but for unimarc there is no universal field visibility status. So I think the mapping betwwen framework and database cannot be automatic when libraries will upgrade to 3.14. So I think we need to specifiy in release notes of 3.14 that unimarc libraries will need to - do the mapping by hand after their upgrade, - after that, to launch a script (yet to be written) for populating database. And if they don't do that, the new button I was planning to create for hiding records should not be displayed. Do you agree with that? Mathieu
(In reply to mathieu saby from comment #4) > Do you agree with that? Yes perfect. Indeed mapping must be manually created.
Ok, I will write to koha-devel to be sure everybody (mostly the RM!) agree. I don't want to work for nothing ;-)
I will not have time to work on that, so I set the bug to NEW. In case someone will want to work on that: For mapping Zebra suppress index to database, it could be done that way in updatedatabase (or a little script called by updatedatabase?) for UNIMARC Koha: * get the value of the zebra conf directory: Maybe there is an environment variable for that? If not, it can be guessed from koha_conf.xml: <server id="biblioserver" listenref="biblioserver"> <directory>/home/msaby/kohamaster/var/lib/zebradb/biblios</directory> <config>/home/msaby/kohamaster/etc/zebradb/zebra-biblios-dom.cfg</config> => the path to zebra config directory is "/home/msaby/kohamaster/etc/zebradb/" on my VM. * check if Koha is running with GRS1 or DOM If there is no other way, look at <zebra_bib_index_mode> line in koha-conf.xml. * search the field and subfield of Suppress index either $zebraconfdir/marcflavor/unimarc/biblio/record.abs or $zebraconfdir/marcflavor/unimarc/biblio/biblio-zebra-indexdefs.xsl Mathieu
We now have a clear indicator when a record is suppressed/hidden in the OPAC. Please open new bug reports, if any issues here were missed. *** This bug has been marked as a duplicate of bug 8536 ***