Summary: | The test t/db_dependent/Record.t fails with Perl 5.18.2 | ||
---|---|---|---|
Product: | Koha | Reporter: | Yohann Dufour <yohann.dufour> |
Component: | Test Suite | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Galen Charlton <gmcharlt> |
Severity: | normal | ||
Priority: | P5 - low | CC: | bgkriegel, jonathan.druart, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12343 | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 14391: Fix fields order on exporting to bibtex
[SIGNED-OFF] Bug 12409: Fix fields order on exporting to bibtex [PASSED QA] Bug 12409: Fix fields order on exporting to bibtex Bug 12409: Follow up - Reflect from hash to array in comments |
Description
Yohann Dufour
2014-06-12 08:32:04 UTC
Created attachment 28794 [details] [review] Bug 14391: Fix fields order on exporting to bibtex The C4::Record::marc2bibtex subroutine supposes hashref keys are sorted which is wrong with perl 5.18 Note that the t/db_dependent/Record.t fails without this patch. Test plan (for perl >= 5.18 only): 1/ prove t/db_dependent/Record.t should return green 2/ Try to export a record to bibtex and verify the order is correct (should be author, title, year, published, etc.). Created attachment 28848 [details] [review] [SIGNED-OFF] Bug 12409: Fix fields order on exporting to bibtex The C4::Record::marc2bibtex subroutine supposes hashref keys are sorted which is wrong with perl 5.18 Note that the t/db_dependent/Record.t fails without this patch. Test plan (for perl >= 5.18 only): 1/ prove t/db_dependent/Record.t should return green 2/ Try to export a record to bibtex and verify the order is correct (should be author, title, year, published, etc.). http://bugs.koha-community.org/show_bug.cgi?id=12409 Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Wrong Bug number on heading. Work as described, test pass, no koha-qa errors. The problem is to think that a hash returns keys in a particular order, that's not true and no matter which perl version. Code as was left is... misleading. Comments talks about a hash, which is no more. On array asignment "a => b" is equivalent to "a, b", but the former is usually used on hashes, so a replacement of '=>' by ',' could clarify what are we storing. (In reply to Bernardo Gonzalez Kriegel from comment #2) > On array asignment "a => b" is equivalent to "a, b", > but the former is usually used on hashes, so a > replacement of '=>' by ',' could clarify what are we storing. It was deliberate. In my opinion, it is more readable like that. But I really don't matter :) Created attachment 29529 [details] [review] [PASSED QA] Bug 12409: Fix fields order on exporting to bibtex The C4::Record::marc2bibtex subroutine supposes hashref keys are sorted which is wrong with perl 5.18 Note that the t/db_dependent/Record.t fails without this patch. Test plan (for perl >= 5.18 only): 1/ prove t/db_dependent/Record.t should return green 2/ Try to export a record to bibtex and verify the order is correct (should be author, title, year, published, etc.). http://bugs.koha-community.org/show_bug.cgi?id=12409 Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Wrong Bug number on heading. Work as described, test pass, no koha-qa errors. The problem is to think that a hash returns keys in a particular order, that's not true and no matter which perl version. Code as was left is... misleading. Comments talks about a hash, which is no more. On array asignment "a => b" is equivalent to "a, b", but the former is usually used on hashes, so a replacement of '=>' by ',' could clarify what are we storing. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Fixing the comments in a follow-up patch. Tests pass now without problems and records export ok. Created attachment 29530 [details] [review] Bug 12409: Follow up - Reflect from hash to array in comments Patch pushed to master. Thanks Yohann! Pushed to 3.16.x for inclusion in 3.16.2. |