[Bug 30848] New: Introduce Koha::Filter::AuthorizedValues
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Bug ID: 30848 Summary: Introduce Koha::Filter::AuthorizedValues Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org I think we should introduce a Koha::Filter for replacing AV codes with AV values in the MARC::Record.. we already do this using C4::XSLT::transformMARCXML4XSLT but I believe a RecordProcessor makes more sense than to hide the function away in the defunct XSLT module. We can then use this anywhere we have a RecordProcessor instantiated and get the goodness of filtered MARC::Records. -- 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=30848 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@ptfs-europe |ity.org |.com -- 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=30848 --- Comment #1 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 135338 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135338&action=edit Bug 30848: Add an AuthorizedValues RecordProcessor filter This patch introduces a RecordProcessor filter for MARC::Record objects that replaces AV codes with AC descriptions in the MARC::Record passed to the processor. Target usage: my $biblio = Koha::Biblios->find( $biblio_id, { prefetch => [ metadata ] } ); my $record = $biblio->metadata->record; my $processor = Koha::RecordProcessor->new( { filters => ('AuthorizedValues'), options => { interface => 'opac', frameworkcode => $biblio->frameworkcode } } ); $processor->process( $record ); -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Martin Renvoize <martin.renvoize@ptfs-europe.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=30848 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |30744 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30744 [Bug 30744] Non-public note is visible in OPAC in Title Notes tab -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I would call it something like ExpandAuthorizedValues. We just need some tests? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135338|0 |1 is obsolete| | --- Comment #3 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 135353 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135353&action=edit Bug 30848: Add an AuthorizedValues RecordProcessor filter This patch introduces a RecordProcessor filter for MARC::Record objects that replaces AV codes with AC descriptions in the MARC::Record passed to the processor. Target usage: my $biblio = Koha::Biblios->find( $biblio_id, { prefetch => [ metadata ] } ); my $record = $biblio->metadata->record; my $processor = Koha::RecordProcessor->new( { filters => ('AuthorizedValues'), options => { interface => 'opac', frameworkcode => $biblio->frameworkcode } } ); $processor->process( $record ); -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Unit tests to come.. it hit end of day here so they'll be a tomorrow job now.. Works beautifully in bug 30744 though ;P -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I can rename it tomorrow too :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 135363 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135363&action=edit Bug 30848: Unit test -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135353|0 |1 is obsolete| | --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 135364 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135364&action=edit Bug 30848: Add an AuthorizedValues RecordProcessor filter This patch introduces a RecordProcessor filter for MARC::Record objects that replaces AV codes with AC descriptions in the MARC::Record passed to the processor. Target usage: my $biblio = Koha::Biblios->find( $biblio_id, { prefetch => [ metadata ] } ); my $record = $biblio->metadata->record; my $processor = Koha::RecordProcessor->new( { filters => ('ExpandAuthorizedValues'), options => { interface => 'opac', frameworkcode => $biblio->frameworkcode } } ); $processor->process( $record ); -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Introduce |Introduce |Koha::Filter::AuthorizedVal |Koha::Filter::ExpandAuthori |ues |zedValues -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135363|0 |1 is obsolete| | --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 135386 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135386&action=edit Bug 30848: Unit test -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135364|0 |1 is obsolete| | --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 135387 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135387&action=edit Bug 30848: Add an AuthorizedValues RecordProcessor filter This patch introduces a RecordProcessor filter for MARC::Record objects that replaces AV codes with AC descriptions in the MARC::Record passed to the processor. Target usage: my $biblio = Koha::Biblios->find( $biblio_id, { prefetch => [ metadata ] } ); my $record = $biblio->metadata->record; my $processor = Koha::RecordProcessor->new( { filters => ('ExpandAuthorizedValues'), options => { interface => 'opac', frameworkcode => $biblio->frameworkcode } } ); $processor->process( $record ); -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 135388 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135388&action=edit Bug 30848: Caching for performance -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 --- Comment #11 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- The cached version seems to be pretty amazing for performance.. orders of magnitude better than the C4::XSLT routine. However, I've only done the cache populating here.. we'll need to flush this cache appropriately on Library, Itemtype, ClassSource, AV and Framework changes.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 --- Comment #12 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Also.. I think we should rename it again from ExpandAuthorizedValues to ExpandKohaCodes.. we're catching more than I first realised here.. it's not just AV's. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=28371 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 135418 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135418&action=edit Bug 30848: Ensure we flush the cache as necessary -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 --- Comment #14 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- OK.. I need to consider itemtype description translations.. right now my code is ignorant to that. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 --- Comment #15 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- As mentioned in bug 28371#c2 I'm starting to think I'm caching in the wrong place.. we could cache the individual parts quite easily and flush less with each update that way.. Would looking up 4 smaller caches be significantly less performance than the single larger cache I wonder? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 --- Comment #16 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Seeing several: Koha::BiblioFrameworks->search()->get_column('frameworkcode') Any way to get rid of additional DB access in order to flush cache ;) ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 --- Comment #17 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Martin Renvoize from comment #15)
As mentioned in bug 28371#c2 I'm starting to think I'm caching in the wrong place.. we could cache the individual parts quite easily and flush less with each update that way..
Would looking up 4 smaller caches be significantly less performance than the single larger cache I wonder?
We had a comment clash :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 --- Comment #18 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- (In reply to Marcel de Rooy from comment #16)
Seeing several: Koha::BiblioFrameworks->search()->get_column('frameworkcode')
Any way to get rid of additional DB access in order to flush cache ;) ?
Not easily the way it's currently written ;P -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135386|0 |1 is obsolete| | --- Comment #19 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 135421 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135421&action=edit Bug 30848: Unit test -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135387|0 |1 is obsolete| | --- Comment #20 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 135422 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135422&action=edit Bug 30848: Add an AuthorizedValues RecordProcessor filter This patch introduces a RecordProcessor filter for MARC::Record objects that replaces AV codes with AC descriptions in the MARC::Record passed to the processor. Target usage: my $biblio = Koha::Biblios->find( $biblio_id, { prefetch => [ metadata ] } ); my $record = $biblio->metadata->record; my $processor = Koha::RecordProcessor->new( { filters => ('ExpandAuthorizedValues'), options => { interface => 'opac', frameworkcode => $biblio->frameworkcode } } ); $processor->process( $record ); -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135388|0 |1 is obsolete| | --- Comment #21 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 135423 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135423&action=edit Bug 30848: Caching for performance -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135418|0 |1 is obsolete| | --- Comment #22 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 135424 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135424&action=edit Bug 30848: Ensure we flush the cache as necessary -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 --- Comment #23 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 135425 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135425&action=edit Bug 30848: Move caching level -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 --- Comment #24 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Caching moved.. now I need to follow through and fix the 'Ensure we flush the cache' patch to flush appropriately now we have multiple small caches instead of a single larger structure per framework. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135421|0 |1 is obsolete| | --- Comment #25 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 135707 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135707&action=edit Bug 30848: Unit test -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135422|0 |1 is obsolete| | --- Comment #26 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 135708 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135708&action=edit Bug 30848: Add an AuthorizedValues RecordProcessor filter This patch introduces a RecordProcessor filter for MARC::Record objects that replaces AV codes with AC descriptions in the MARC::Record passed to the processor. Target usage: my $biblio = Koha::Biblios->find( $biblio_id, { prefetch => [ metadata ] } ); my $record = $biblio->metadata->record; my $processor = Koha::RecordProcessor->new( { filters => ('ExpandAuthorizedValues'), options => { interface => 'opac', frameworkcode => $biblio->frameworkcode } } ); $processor->process( $record ); -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135423|0 |1 is obsolete| | --- Comment #27 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 135709 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135709&action=edit Bug 30848: Caching for performance -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135424|0 |1 is obsolete| | --- Comment #28 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 135710 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135710&action=edit Bug 30848: Ensure we flush the cache as necessary -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135425|0 |1 is obsolete| | --- Comment #29 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 135711 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135711&action=edit Bug 30848: Move caching level -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 --- Comment #30 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 135712 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135712&action=edit Bug 30848: Ensure we flush the cache as necessary -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 --- Comment #31 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 135713 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135713&action=edit Bug 30848: Rename to ExpandCodedFields -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135707|0 |1 is obsolete| | --- Comment #32 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 135714 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135714&action=edit Bug 30848: Unit test -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135708|0 |1 is obsolete| | --- Comment #33 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 135715 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135715&action=edit Bug 30848: Add an AuthorizedValues RecordProcessor filter This patch introduces a RecordProcessor filter for MARC::Record objects that replaces AV codes with AC descriptions in the MARC::Record passed to the processor. Target usage: my $biblio = Koha::Biblios->find( $biblio_id, { prefetch => [ metadata ] } ); my $record = $biblio->metadata->record; my $processor = Koha::RecordProcessor->new( { filters => ('ExpandAuthorizedValues'), options => { interface => 'opac', frameworkcode => $biblio->frameworkcode } } ); $processor->process( $record ); -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135709|0 |1 is obsolete| | --- Comment #34 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 135716 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135716&action=edit Bug 30848: Caching for performance This patch adds caching to ExpandAuthorizedValues for performance. We cache each hash involved in C4::Biblio::GetAuthorisedValueDesc as well as caching the reduced marc subfield structure that filter down to just those marc fields with coded substitutions. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135713|0 |1 is obsolete| | --- Comment #35 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 135717 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135717&action=edit Bug 30848: Rename to ExpandCodedFields -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135710|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135711|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135712|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 --- Comment #36 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- OK, squashed and refined as discussed.. ready for review. This patchset does two things, we introduce a new Koha::Filter::MARC::ExpandCodedValues record processor to allow Marc records to have their Koha coded fields expanded from codes to descriptions/values. (We can use this to replace C4::XSLT::transformMARCXML4XSLT but also add it in wherever we're already calling record processor to get a proper representative record for display). Additionally, we add caching to improve performance.. after working through this a few times to pick the appropriate cache level, I think we've got it now. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Introduce |Introduce |Koha::Filter::ExpandAuthori |Koha::Filter::ExpandCodedFi |zedValues |elds -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |30918 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30918 [Bug 30918] Non-public note is visible in OPAC in Title Notes tab -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|30918 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30918 [Bug 30918] Non-public note is visible in OPAC in Title Notes tab -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 --- Comment #37 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 135770 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135770&action=edit Bug 30848: Add an ExpandCodedFields RecordProcessor filter This patch introduces a RecordProcessor filter for MARC::Record objects that replaces Koha codes with descriptions in the MARC::Record passed to the processor. Target usage: my $biblio = Koha::Biblios->find( $biblio_id, { prefetch => [ metadata ] } ); my $record = $biblio->metadata->record; my $processor = Koha::RecordProcessor->new( { filters => ('ExpandCodedFields'), options => { interface => 'opac', frameworkcode => $biblio->frameworkcode } } ); $processor->process( $record ); Test plan * Read the included unit test and confirm it makes sense and passes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135714|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135715|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135716|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135717|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 --- Comment #38 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Patchset reduced to just the introduction of the ExpandCodedFields filter.. description caching moved to a subsequent bug for self-contained testing etc. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 --- Comment #39 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- This code is intended to eventually replace C4::XSLT::transformMARCXML4XSLT and the private function C4::XSLT::getAuthorisedValues4MARCSubfields whilst also introducing a more standardised way of achieving code substitutions for Marc records. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |30921 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30921 [Bug 30921] Replace use of C4::XSLT::transformMARCXML4XSLT with RecordProcessor -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=30920 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 --- Comment #40 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I've always liked the RecordProcessor pattern myself. And love what I'm seeing. Is this missing branches, itemtypes, etc? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 --- Comment #41 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Tomás Cohen Arazi from comment #40)
Is this missing branches, itemtypes, etc?
This intended to be: 'Is this missing tests for branches, itemtypes, etc?' -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135770|0 |1 is obsolete| | --- Comment #42 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 136025 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136025&action=edit Bug 30848: Add an ExpandCodedFields RecordProcessor filter This patch introduces a RecordProcessor filter for MARC::Record objects that replaces Koha codes with descriptions in the MARC::Record passed to the processor. Target usage: my $biblio = Koha::Biblios->find( $biblio_id, { prefetch => [ metadata ] } ); my $record = $biblio->metadata->record; my $processor = Koha::RecordProcessor->new( { filters => ('ExpandCodedFields'), options => { interface => 'opac', frameworkcode => $biblio->frameworkcode } } ); $processor->process( $record ); Test plan * Read the included unit test and confirm it makes sense and passes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 --- Comment #43 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 136026 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136026&action=edit Bug 30848: Expand unit tests Add to the unit tests to test Library and Itemtype expansions as well as linking multiple subfields of the same marc field to such expansions. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 --- Comment #44 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 136027 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136027&action=edit Bug 30848: Fix issue exposed by unit tests This patch changes the 'map' to a simple for loop so that we can easily map multiple subfields to a field without overwriting the first previous subfields in the structure. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136025|0 |1 is obsolete| | Attachment #136026|0 |1 is obsolete| | Attachment #136027|0 |1 is obsolete| | --- Comment #45 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 136259 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136259&action=edit Bug 30848: Add an ExpandCodedFields RecordProcessor filter This patch introduces a RecordProcessor filter for MARC::Record objects that replaces Koha codes with descriptions in the MARC::Record passed to the processor. Target usage: my $biblio = Koha::Biblios->find( $biblio_id, { prefetch => [ metadata ] } ); my $record = $biblio->metadata->record; my $processor = Koha::RecordProcessor->new( { filters => ('ExpandCodedFields'), options => { interface => 'opac', frameworkcode => $biblio->frameworkcode } } ); $processor->process( $record ); Test plan * Read the included unit test and confirm it makes sense and passes Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 --- Comment #46 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 136260 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136260&action=edit Bug 30848: Expand unit tests Add to the unit tests to test Library and Itemtype expansions as well as linking multiple subfields of the same marc field to such expansions. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 --- Comment #47 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 136261 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136261&action=edit Bug 30848: Fix issue exposed by unit tests This patch changes the 'map' to a simple for loop so that we can easily map multiple subfields to a field without overwriting the first previous subfields in the structure. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 --- Comment #48 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 136262 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136262&action=edit Bug 30848: Add exec flag to test Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Medium patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|Medium patch |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136259|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136260|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136261|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136262|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 --- Comment #49 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 136774 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136774&action=edit Bug 30848: Add an ExpandCodedFields RecordProcessor filter This patch introduces a RecordProcessor filter for MARC::Record objects that replaces Koha codes with descriptions in the MARC::Record passed to the processor. Target usage: my $biblio = Koha::Biblios->find( $biblio_id, { prefetch => [ metadata ] } ); my $record = $biblio->metadata->record; my $processor = Koha::RecordProcessor->new( { filters => ('ExpandCodedFields'), options => { interface => 'opac', frameworkcode => $biblio->frameworkcode } } ); $processor->process( $record ); Test plan * Read the included unit test and confirm it makes sense and passes Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 --- Comment #50 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 136775 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136775&action=edit Bug 30848: Expand unit tests Add to the unit tests to test Library and Itemtype expansions as well as linking multiple subfields of the same marc field to such expansions. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 --- Comment #51 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 136776 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136776&action=edit Bug 30848: Fix issue exposed by unit tests This patch changes the 'map' to a simple for loop so that we can easily map multiple subfields to a field without overwriting the first previous subfields in the structure. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 --- Comment #52 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 136777 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136777&action=edit Bug 30848: Add exec flag to test Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_21_05_candidate, | |rel_21_11_candidate, | |rel_22_05_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |22.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 --- Comment #53 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 22.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|22.11.00 |22.11.00, 22.05.04 released in| | CC| |lucas@bywatersolutions.com --- Comment #54 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 22.05.x for 22.05.04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable Version(s)|22.11.00, 22.05.04 |22.11.00, 22.05.04, released in| |21.11.11 CC| |arthur.suzuki@biblibre.com --- Comment #55 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- pushed to 21.11.x for 21.11.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |RESOLVED CC| |victor@tuxayo.net Resolution|--- |FIXED --- Comment #56 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed. Nothing to document, marking resolved. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 --- Comment #57 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Will backport because it's a dependency of 30744 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 --- Comment #58 from Victor Grousset/tuxayo <victor@tuxayo.net> --- There is a remaining diag() in the tests, shall it stay here? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 --- Comment #59 from Victor Grousset/tuxayo <victor@tuxayo.net> --- For 21.05.x In C4::Biblio I have to export GetMarcSubfieldStructure (like in other branches) so the tests compile. No problem to do that, right? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|22.11.00, 22.05.04, |22.11.00, 22.05.04, released in|21.11.11 |21.11.11, 21.05.18 --- Comment #60 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Backported: Pushed to 21.05.x branch for 21.05.18 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30848 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_22_05_candidate | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org