[Bug 23807] New: Add Koha::Item->as_marc_field
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23807 Bug ID: 23807 Summary: Add Koha::Item->as_marc_field Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org It will be handy to have an OO method to generate a MARC::Field object out of a Koha::Item object. All the required data is in place and it could aid in performance as well. -- 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=23807 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |23793 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23793 [Bug 23793] Add an EmbedItems RecordProcessor filter for MARC::Record objects -- 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=23807 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | Status|NEW |ASSIGNED CC| |ere.maijala@helsinki.fi, | |glasklas@gmail.com, | |jonathan.druart@bugs.koha-c | |ommunity.org, | |kyle@bywatersolutions.com, | |martin.renvoize@ptfs-europe | |.com, | |nick@bywatersolutions.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=23807 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 94029 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94029&action=edit Bug 23807: Add Koha::Item->as_marc_field -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23807 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- This is a POC. It uses the default FW when it shouldn't, as each FW might have a different mapping for items.itemnumber. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23807 --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Tomás Cohen Arazi from comment #2)
This is a POC. It uses the default FW when it shouldn't, as each FW might have a different mapping for items.itemnumber.
Well, not POC. It is completely funcional and the default framework is a reasonable fallback. I will try to submit the unit tests, but please consider testing it along with the filter on the performance patchsets. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23807 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Tomás Cohen Arazi from comment #3)
(In reply to Tomás Cohen Arazi from comment #2)
This is a POC. It uses the default FW when it shouldn't, as each FW might have a different mapping for items.itemnumber.
Well, not POC. It is completely funcional and the default framework is a reasonable fallback. I will try to submit the unit tests, but please consider testing it along with the filter on the performance patchsets.
I think not only a fallback, if I understand correctly, the default framework defines the mappings now: Bug 19096 - Koha to MARC mappings (Part 2): Make Default authoritative -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23807 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23807 --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 94094 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94094&action=edit Bug 23807: Unit tests This patch introduces tests for the Koha::Item->as_marc_field method. It tries to cover all the use cases. To test: 1. Apply this patchset 2. Run: $ kshell k$ prove t/db_dependent/Koha/Item.t => SUCCESS; Tests pass! 3. Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23807 Jan Kolátor <kolatorj@email.cz> 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=23807 Jan Kolátor <kolatorj@email.cz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #94029|0 |1 is obsolete| | --- Comment #6 from Jan Kolátor <kolatorj@email.cz> --- Created attachment 94274 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94274&action=edit Bug 23807: Add Koha::Item->as_marc_field Signed-off-by: Jan Kolator <kolatorj@email.cz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23807 Jan Kolátor <kolatorj@email.cz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #94094|0 |1 is obsolete| | --- Comment #7 from Jan Kolátor <kolatorj@email.cz> --- Created attachment 94275 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94275&action=edit Bug 23807: Unit tests This patch introduces tests for the Koha::Item->as_marc_field method. It tries to cover all the use cases. To test: 1. Apply this patchset 2. Run: $ kshell k$ prove t/db_dependent/Koha/Item.t => SUCCESS; Tests pass! 3. Sign off :-D Signed-off-by: Jan Kolator <kolatorj@email.cz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23807 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23807 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #94274|0 |1 is obsolete| | Attachment #94275|0 |1 is obsolete| | --- Comment #8 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 94279 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94279&action=edit Bug 23807: Add Koha::Item->as_marc_field Signed-off-by: Jan Kolator <kolatorj@email.cz> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23807 --- Comment #9 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 94280 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94280&action=edit Bug 23807: Unit tests This patch introduces tests for the Koha::Item->as_marc_field method. It tries to cover all the use cases. To test: 1. Apply this patchset 2. Run: $ kshell k$ prove t/db_dependent/Koha/Item.t => SUCCESS; Tests pass! 3. Sign off :-D Signed-off-by: Jan Kolator <kolatorj@email.cz> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23807 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |19.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=23807 --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work! Pushed to master for 19.11.00 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23807 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |25006 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25006 [Bug 25006] Koha::Item->as_marc_field generates undef subfields -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23807 --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Any good reasons to have called GetMarcSubfieldStructure with the unsafe flag set? % grep unsafe t/db_dependent/Koha/Item.t my $mss = C4::Biblio::GetMarcSubfieldStructure( '', { unsafe => 1 } ); $mss = C4::Biblio::GetMarcSubfieldStructure( '', { unsafe => 0 } ); Unsafe from tests don't feel safe :) I am seeing some tests failing (when run twice) because of it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23807 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |27007 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27007 [Bug 27007] GetMarcSubfieldStructure called with "unsafe" in tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23807 --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I've opened bug 27007. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org