[Koha-bugs] [Bug 7933] Fields in marc display not the same

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Nov 27 17:50:08 CET 2012


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7933

Fridolyn SOMERS <fridolyn.somers at biblibre.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #9308|0                           |1
        is obsolete|                            |
             Status|Failed QA                   |In Discussion
           Assignee|kyle.m.hall at gmail.com       |fridolyn.somers at biblibre.co
                   |                            |m

--- Comment #11 from Fridolyn SOMERS <fridolyn.somers at biblibre.com> ---
Created attachment 13707
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13707&action=edit
Proposed patch (revisited)

I propose a new patch based on same behavior :
at OPAC, remove from MARC::Record all subfields declared hidden in framework.
(if all subfields are removed, field is removed).

C4::Biblio :
------------
I created RemoveHiddenSubfields for that.
It can be used for OPAC and intranet to remove hidden subfields from record
(see catalogue/MARCdetail.pl).
My purpose is to allow it other calls than OPAC pages.

GetMarcBiblio gets 2 more args : $template and $withouthidden. They are
optional to avoid modifying intranet calls.
I created GetMarcBiblioForOpac that calls GetMarcBiblio with $template='opac'
and $withouthidden=1. This method is to explicit the fact that hidden fields
are removed at OPAC.

GetISBDView already as the $template parameter. I used it to call
GetMarcBiblioForOpac if $template='opac'.

C4::Record :
------------
CSV export exists at OPAC so marc2csv() gets a new arg : $template.
marc2csv is based on marcrecord2csv. I modified its args to use directly
modified record and since it is only for C4::Record, I turned it into private :
_marcrecord2csv.

C4::Search :
------------
In result page, records come from C4::Search::searchResults.
So I add RemoveHiddenSubfields if from OPAC.

OPAC pages to test :
--------------------
I added behavior in all opac pages using GetMarcBiblio : 
- opac-ISBDdetail.pl
- opac-MARCdetail.pl (avoid duplicated behavior)
- opac-basket.pl
- opac-detail.pl (behavior with and without XSLT)
- opac-downloadcart.pl
- opac-downloadshelf.pl
- opac-export.pl
- opac-reserve.pl
- opac-search.pl
- opac-sendbasket.pl
- opac-sendshelf.pl
- opac-showmarc.pl
- opac-showreviews.pl

Other :
-------
Note that behavior does not apply to OAI and ILS-DI.
I think there is no need.

Note that to any subfield can be hidden, many pages use
C4::Biblio::GetBiblioData and C4::Items::GetItemsInfo. They get datas from
talbles biblio, bilioitems and items.
So subfields mapped to a database column can theorically not be hidden.
But these datas are very common informations about biblio (title, author, ...),
they sould not be hidden.


Please feel free to discuss and ask modifications.

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


More information about the Koha-bugs mailing list