Summary: | Add Koha::Item->as_marc_field | ||
---|---|---|---|
Product: | Koha | Reporter: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Component: | Architecture, internals, and plumbing | Assignee: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | ere.maijala, glasklas, jonathan.druart, kyle, martin.renvoize, nick |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
19.11.00
|
|
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 23793, 25006, 27007 | ||
Attachments: |
Bug 23807: Add Koha::Item->as_marc_field
Bug 23807: Unit tests Bug 23807: Add Koha::Item->as_marc_field Bug 23807: Unit tests Bug 23807: Add Koha::Item->as_marc_field Bug 23807: Unit tests |
Description
Tomás Cohen Arazi (tcohen)
2019-10-11 17:11:56 UTC
Created attachment 94029 [details] [review] Bug 23807: Add Koha::Item->as_marc_field This is a POC. It uses the default FW when it shouldn't, as each FW might have a different mapping for items.itemnumber. (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. (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 Created attachment 94094 [details] [review] 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 Created attachment 94274 [details] [review] Bug 23807: Add Koha::Item->as_marc_field Signed-off-by: Jan Kolator <kolatorj@email.cz> Created attachment 94275 [details] [review] 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> Created attachment 94279 [details] [review] 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> Created attachment 94280 [details] [review] 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> Nice work! Pushed to master for 19.11.00 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. I've opened bug 27007. |