Bug 9778 - display and change easily OPAC visibility status in staff interface
Summary: display and change easily OPAC visibility status in staff interface
Status: RESOLVED DUPLICATE of bug 8536
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P4 enhancement
Assignee: Galen Charlton
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-10 10:21 UTC by Mathieu Saby
Modified: 2019-04-28 10:31 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mathieu Saby 2013-03-10 10:21:37 UTC
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
Comment 1 Fridolin Somers 2013-03-27 08:11:57 UTC
> 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.
Comment 2 Mathieu Saby 2013-09-15 12:26:50 UTC
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
Comment 3 Fridolin Somers 2013-09-18 12:54:01 UTC
(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.
Comment 4 Mathieu Saby 2013-09-20 14:29:46 UTC
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
Comment 5 Fridolin Somers 2013-09-20 15:23:16 UTC
(In reply to mathieu saby from comment #4)
> Do you agree with that?
Yes perfect.
Indeed mapping must be manually created.
Comment 6 Mathieu Saby 2013-09-20 15:51:07 UTC
Ok, I will write to koha-devel to be sure everybody (mostly the RM!) agree. I don't want to work for nothing ;-)
Comment 7 Mathieu Saby 2013-11-23 12:55:27 UTC
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
Comment 8 Katrin Fischer 2019-04-28 10:31:21 UTC
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 ***