Hi, It could be interesting to enrich the bibliographic records exposed in OAI with see-from headings, this would allow users who use koha with a discovery tool to be able to manage, normalize and index some authorities data ? This is something that could be done directly in C4::Biblio::GetMarcBiblio following the same method used for embedding items. We could use an optional parameter like embed_items (embed_seefromheading) and a function similar to C4::Biblio::EmbedItemsInMarcBiblio by reusing what was made for zebra with EmbedSeeFromHeadings (bug #7417). Thanks for feedback, Best Julien Sicot Systems Librarian, Université Rennes 2
Created attachment 122500 [details] [review] Bug 28639 - Embed see-from headings (from authorities) into bibliographic records at OAI repository level Test plan: 1. Create an authority with at least a 1XX$a and a 4XX$a, for instance: 100 $a Foo 400 $a Bar 2. Create a biblio and add a link to this authority using the cataloguing plugin 3. Enable OAI-PMH syspref and fill OAI-PMH:archiveID syspref with "oai:sandbox" 4. Go to OAI repository and display the previously created record (at /cgi-bin/koha/oai.pl?verb=GetRecord&metadataPrefix=marcxml&identifier=oai:sandbox:{biblionumber} 5. The record should not contain see-from headings 6. Enable OAI-PMH:EmbedSeeFromInBibRecord 7. Go again to the OAI record, you should see alternative forms at the end of the record
I think the setting should be in the oai.conf file instead of a syspref. The conf file would allow you to make it format-specific instead of a global setting. You could e.g. setup a new metadataPrefix marc21_with_auth that would include the see-from headings while keeping the normal marc21 format intact.
Nice. But why not using like rebuild_zebra.pl Koha::RecordProcessor and Koha::Filter::MARC::EmbedSeeFromHeadings ? Code looks the same no ?
Created attachment 142296 [details] [review] Bug 28639: Embed see-from headings (from authorities) into bibliographic records at OAI repository level Test plan: 1. Create an authority with at least a 1XX$a and a 4XX$a, for instance: 100 $a Foo 400 $a Bar 2. Create a biblio and add a link to this authority using the cataloguing plugin 3. Enable OAI-PMH syspref and fill OAI-PMH:archiveID syspref with "oai:sandbox" 4. Go to OAI repository and display the previously created record (at /cgi-bin/koha/oai.pl?verb=GetRecord&metadataPrefix=marcxml&identifier=oai:sandbox:{biblionumber} 5. The record should not contain see-from headings 6. Enable OAI-PMH:EmbedSeeFromInBibRecord 7. Go again to the OAI record, you should see alternative forms at the end of the record
Created attachment 142297 [details] [review] Bug 28639: Embed see-from headings (from authorities) into bibliographic records at OAI repository level Test plan: 1. Create an authority with at least a 1XX$a and a 4XX$a, for instance: 100 $a Foo 400 $a Bar 2. Create a biblio and add a link to this authority using the cataloguing plugin 3. Enable OAI-PMH syspref and fill OAI-PMH:archiveID syspref with "oai:sandbox" 4. Go to OAI repository and display the previously created record (at /cgi-bin/koha/oai.pl?verb=GetRecord&metadataPrefix=marcxml&identifier=oai:sandbox:{biblionumber} 5. The record should not contain see-from headings 6. Run perl installer/data/mysql/atomicupdate/bug_28639-add_EmbedSeeFromInBibRecord_syspref.pl 7. Enable OAI-PMH:EmbedSeeFromInBibRecord 8. Go again to the OAI record, you should see alternative forms at the end of the record
(In reply to Julien Sicot (Univ. Rennes 2) from comment #0) > Hi, > > It could be interesting to enrich the bibliographic records exposed in OAI > with see-from headings, this would allow users who use koha with a discovery > tool to be able to manage, normalize and index some authorities data ? > > This is something that could be done directly in C4::Biblio::GetMarcBiblio > following the same method used for embedding items. > We could use an optional parameter like embed_items (embed_seefromheading) > and a function similar to C4::Biblio::EmbedItemsInMarcBiblio by reusing what > was made for zebra with EmbedSeeFromHeadings (bug #7417). > > Thanks for feedback, > Best > Julien Sicot > Systems Librarian, > Université Rennes 2 Thanks to you, I just rebase your proposal on master updated and add a atomic update file. I just call Koha::Filter::MARC::EmbedSeeFromHeadings on OAI server side to show or hide embed see-from headings. I could not test your development due to an error so I hope that the intended behaviour remains the same. Please let me know if not.
Hi, Atomic update is incorrect : + INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) + VALUES ( + 'EmbedSeeFromInBibRecord', '0', NULL, 'Add embed see-from headings for OAI', 'YesNo' Value should be OAI-PMH:EmbedSeeFromInBibRecord Also : + Koha::Filter::MARC::EmbedSeeFromHeadings->filter($record); Does this work ? Other call use the RecordProcessor : https://git.koha-community.org/Koha-community/Koha/src/commit/a57278f39b8c5b7a82b21671f266dbf32e2d41a0/t/db_dependent/RecordProcessor_EmbedSeeFromHeadings.t#L60 Best regards,
Created attachment 144821 [details] [review] Bug 28639: Embed see-from headings (from authorities) into bibliographic records at OAI repository level Test plan: 1. Create an authority with at least a 1XX$a and a 4XX$a, for instance: 100 $a Foo 400 $a Bar 2. Create a biblio and add a link to this authority using the cataloguing plugin 3. Enable OAI-PMH syspref and fill OAI-PMH:archiveID syspref with "oai:sandbox" 4. Go to OAI repository and display the previously created record (at /cgi-bin/koha/oai.pl?verb=GetRecord&metadataPrefix=marcxml&identifier=oai:sandbox:{biblionumber} 5. The record should not contain see-from headings 6. Run perl installer/data/mysql/atomicupdate/bug_28639-add_EmbedSeeFromInBibRecord_syspref.pl 7. Enable OAI-PMH:EmbedSeeFromInBibRecord 8. Go again to the OAI record, you should see alternative forms at the end of the record
Created attachment 144822 [details] [review] Bug 28639: (follow_up) changing syspref name on atomic update file
(In reply to Fridolin Somers from comment #7) > Hi, > > Atomic update is incorrect : > + INSERT IGNORE INTO systempreferences > (variable,value,options,explanation,type) > + VALUES ( > + 'EmbedSeeFromInBibRecord', '0', NULL, 'Add embed see-from > headings for OAI', 'YesNo' > > Value should be OAI-PMH:EmbedSeeFromInBibRecord > > Also : > > + Koha::Filter::MARC::EmbedSeeFromHeadings->filter($record); > > Does this work ? > Other call use the RecordProcessor : > > https://git.koha-community.org/Koha-community/Koha/src/commit/ > a57278f39b8c5b7a82b21671f266dbf32e2d41a0/t/db_dependent/ > RecordProcessor_EmbedSeeFromHeadings.t#L60 > > Best regards, Hi Fridolin :) Thanks for your reply ! Yes I miss this thing, I fix that by follow-up. And I also rebased on 'fresh' master ^^ For this : + Koha::Filter::MARC::EmbedSeeFromHeadings->filter($record); It works as intended apparently but you put me in doubt.. did you test it ? Maybe I miss something
(In reply to Thibaud Guillot from comment #10) > (In reply to Fridolin Somers from comment #7) > > For this : > > + Koha::Filter::MARC::EmbedSeeFromHeadings->filter($record); > > It works as intended apparently but you put me in doubt.. did you test it ? > Maybe I miss something I did not test it but since other calls are different. We try to have same code syntax for clarity. Great job btw ;)
Created attachment 144857 [details] [review] Bug 28639: (follow-up) Changes method to embed see-from headings To have same code syntax call of Koha::RecordProcessor class
(In reply to Fridolin Somers from comment #11) > (In reply to Thibaud Guillot from comment #10) > > (In reply to Fridolin Somers from comment #7) > > > > For this : > > > > + Koha::Filter::MARC::EmbedSeeFromHeadings->filter($record); > > > > It works as intended apparently but you put me in doubt.. did you test it ? > > Maybe I miss something > > I did not test it but since other calls are different. > We try to have same code syntax for clarity. > > Great job btw ;) Oh okay, thanks, you're right, I replace it :)
This no longer applies cleanly to current master.
Created attachment 171973 [details] [review] Bug 28639: Embed see-from headings (from authorities) into bibliographic records at OAI repository level Test plan: 1. Create an authority with at least a 1XX$a and a 4XX$a, for instance: 100 $a Foo 400 $a Bar 2. Create a biblio and add a link to this authority using the cataloguing plugin 3. Enable OAI-PMH syspref and fill OAI-PMH:archiveID syspref with "oai:sandbox" 4. Go to OAI repository and display the previously created record (at /cgi-bin/koha/oai.pl?verb=GetRecord&metadataPrefix=marcxml&identifier=oai:sandbox:{biblionumber} 5. The record should not contain see-from headings 6. Run perl installer/data/mysql/atomicupdate/bug_28639-add_EmbedSeeFromInBibRecord_syspref.pl 7. Enable OAI-PMH:EmbedSeeFromInBibRecord 8. Go again to the OAI record, you should see alternative forms at the end of the record
Created attachment 171974 [details] [review] Bug 28639: (follow_up) changing syspref name on atomic update file
Created attachment 171975 [details] [review] Bug 28639: (follow-up) Changes method to embed see-from headings To have same code syntax call of Koha::RecordProcessor class