[Bug 27007] New: GetMarcSubfieldStructure called with "unsafe" in tests
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27007 Bug ID: 27007 Summary: GetMarcSubfieldStructure called with "unsafe" in tests Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: ASSIGNED Severity: normal Priority: P5 - low Component: Test Suite Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org Depends on: 23807 It does not feel correct to call GetMarcSubfieldStructure with the unsafe flag set in tests: my $mss = C4::Biblio::GetMarcSubfieldStructure( '', { unsafe => 1 } ); Some tests are failing is run twice Use of uninitialized value $code_wanted in string eq at /usr/share/perl5/MARC/Field.pm line 314. [x~10] Use of uninitialized value $code_wanted in string eq at /usr/share/perl5/MARC/Field.pm line 314. # Failed test 'Value is mapped correctly for column biblionumber' # at t/db_dependent/Koha/Item.t line 115. # got: undef # expected: '483' [etc.] Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23807 [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=27007 Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=27007 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 113585 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113585&action=edit Bug 27007: Don't call GetMarcSubfieldStructure with unsafe in tests It does not feel correct to call GetMarcSubfieldStructure with the unsafe flag set in tests: my $mss = C4::Biblio::GetMarcSubfieldStructure( '', { unsafe => 1 } ); Some tests are failing is run twice Use of uninitialized value $code_wanted in string eq at /usr/share/perl5/MARC/Field.pm line 314. [x~10] Use of uninitialized value $code_wanted in string eq at /usr/share/perl5/MARC/Field.pm line 314. # Failed test 'Value is mapped correctly for column biblionumber' # at t/db_dependent/Koha/Item.t line 115. # got: undef # expected: '483' [etc.] Test plan: Run the tests twice, without the patch it fails, with the patch it passes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27007 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #113585|0 |1 is obsolete| | --- Comment #2 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 113587 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113587&action=edit Bug 27007: Don't call GetMarcSubfieldStructure with unsafe in tests It does not feel correct to call GetMarcSubfieldStructure with the unsafe flag set in tests: my $mss = C4::Biblio::GetMarcSubfieldStructure( '', { unsafe => 1 } ); Some tests are failing is run twice Use of uninitialized value $code_wanted in string eq at /usr/share/perl5/MARC/Field.pm line 314. [x~10] Use of uninitialized value $code_wanted in string eq at /usr/share/perl5/MARC/Field.pm line 314. # Failed test 'Value is mapped correctly for column biblionumber' # at t/db_dependent/Koha/Item.t line 115. # got: undef # expected: '483' [etc.] Test plan: Run the tests twice, without the patch it fails, with the patch it passes Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27007 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |martin.renvoize@ptfs-europe | |.com --- Comment #3 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I dug into the code and agree with this change.. tests well.. Signing off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27007 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I never went back to this, sorry. The idea was that eventually the caller would fetch the mss data, accumulate it as needed, and pass the right one to the method as a parameter. The context is you will iterate on the biblio's items and it doesn't make sense to retrieve the whole thing. I promise I'll be back to this on this new cycle. I agree with the change BTW. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27007 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joonas.kylmala@helsinki.fi --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- *** Bug 26972 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27007 Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=27007 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |20.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=27007 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 20.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27007 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com Status|Pushed to master |Pushed to stable Version(s)|20.11.00 |20.11.00, 20.05.07 released in| | --- Comment #7 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Pushed to 20.05.x for 20.05.07 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27007 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27007 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net Status|Pushed to oldstable |RESOLVED Resolution|--- |FIXED --- Comment #8 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org