[Bug 38360] New: Price extraction from MungeMarcPrice should be improved
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38360 Bug ID: 38360 Summary: Price extraction from MungeMarcPrice should be improved Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: baptiste.wojtkowski@biblibre.com QA Contact: testopia@bugs.koha-community.org MungeMarcPrice's "rescue mode", tries and catch the whole possible number patterns in one regexp, which leads to very curious authorized values, and can leave some price unmatched for curious reasons. Unmatched price that should be: 49.3 ; 555,555.3 (only 1 digit after separator) 50 (no digit) Matched prices that should not: ,,,,,,,35 ; ,.,..,.45 ; 99,999.999,99 -- 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=38360 --- Comment #1 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Created attachment 173990 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173990&action=edit Bug 38360: Cosmetics -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38360 --- Comment #2 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Created attachment 173991 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173991&action=edit Bug 38360: Add unit tests Add unit tests to prove case not taken in account py MungeMarcPrice -- 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=38360 --- Comment #3 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Created attachment 173992 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173992&action=edit Bug 38360: Price extraction from MungeMarcPrice should be improved MungeMarcPrice's "rescue mode", tries and catch the whole possible number patterns in one regexp, which leads to very curious authorized values, and can leave some price unmatched for curious reasons. Unmatched price that should be: 49.3 ; 555,555.3 (only 1 digit after separator) 50 (no digit) Matched prices that should not: ,,,,,,,35 ; ,.,..,.45 ; 99,999.999,99 TEST PLAN (for UNIMARC): 1 - Apply first commit, run tests (prove t/db_dependent/MungeMarcPrice.t) -> they should fail 1 - Export a MARC NOTICE in marxml with a 010d filled with 49.3 2 - On acquisition, register a new vendor 3 - Add a Basket to this vendor 4 - Add an order -> from a file -> select the exported marc notice 5 - Check the checkbox associated with this item -> there is no price field filled 6 - APPLY PATCH 7 - Repeat 4 & 5 -> the price is now displayed 8 - Run tests -> all tests pass -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38360 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |fridolin.somers@biblibre.co | |m -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38360 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- 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=38360 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |baptiste.wojtkowski@biblibr |ity.org |e.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=38360 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Status|Needs Signoff |Patch doesn't apply -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38360 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173991|0 |1 is obsolete| | --- Comment #4 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Created attachment 190755 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190755&action=edit Bug 38360: Add unit tests Add unit tests to prove case not taken in account py MungeMarcPrice -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38360 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173992|0 |1 is obsolete| | --- Comment #5 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Created attachment 190756 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190756&action=edit Bug 38360: Price extraction from MungeMarcPrice should be improved MungeMarcPrice's "rescue mode", tries and catch the whole possible number patterns in one regexp, which leads to very curious authorized values, and can leave some price unmatched for curious reasons. Unmatched price that should be: 49.3 ; 555,555.3 (only 1 digit after separator) 50 (no digit) Matched prices that should not: ,,,,,,,35 ; ,.,..,.45 ; 99,999.999,99 TEST PLAN (for UNIMARC): 1 - Apply first commit, run tests (prove t/db_dependent/MungeMarcPrice.t) -> they should fail 1 - Export a MARC NOTICE in marxml with a 010d filled with 49.3 2 - On acquisition, register a new vendor 3 - Add a Basket to this vendor 4 - Add an order -> from a file -> select the exported marc notice 5 - Check the checkbox associated with this item -> there is no price field filled 6 - APPLY PATCH 7 - Repeat 4 & 5 -> the price is now displayed 8 - Run tests -> all tests pass -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38360 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173990|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=38360 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38360 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38360 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190756|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=38360 --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 201507 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201507&action=edit Bug 38360: Price extraction from MungeMarcPrice should be improved MungeMarcPrice's "rescue mode", tries and catch the whole possible number patterns in one regexp, which leads to very curious authorized values, and can leave some price unmatched for curious reasons. Unmatched price that should be: 49.3 ; 555,555.3 (only 1 digit after separator) 50 (no digit) Matched prices that should not: ,,,,,,,35 ; ,.,..,.45 ; 99,999.999,99 TEST PLAN (for UNIMARC): 1 - Apply first commit, run tests (prove t/db_dependent/MungeMarcPrice.t) -> they should fail 1 - Export a MARC NOTICE in marxml with a 010d filled with 49.3 2 - On acquisition, register a new vendor 3 - Add a Basket to this vendor 4 - Add an order -> from a file -> select the exported marc notice 5 - Check the checkbox associated with this item -> there is no price field filled 6 - APPLY PATCH 7 - Repeat 4 & 5 -> the price is now displayed 8 - Run tests -> all tests pass Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org