Apostrophe is used to terminate segments in Edifact orders. Therefore if appearing in the data it is quoted - Code should not assume that a quoted apostrophe is a valid segment terminator e.g. LIN+4++9781471186684:EN' IMD+L+009+:::Newton-John, Olivia' IMD+L+050+:::Don?'t stop believin?' IMD+L+109+:::Simon & Schuster' QTY+21:1' GIR+001+001:LFN+CRO:LLO+BAH:LST+920 NEW:LSM' PRI+AAE:20.00:CA' RFF+LI:93323' RFF+QLI:OTM88093/00004' The IMD 050 line is incorrectly formed it should end believin?''
Created attachment 91188 [details] [review] Patch and test To test apply the patch and tests should still pass including new test for correct behaviour when data ends with apostrophe
Created attachment 91782 [details] [review] Bug 23251 Correct formatting of IMD data ending in apostrophe IMD text data may end in an apostrophe (e.g. dreamin' ) This was causing the segment to be incorrectly formatted as only the last character was checked, not the preceding character to check whether it was quoted add a test for this specific occurence Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Created attachment 91783 [details] [review] Bug 23251: Correct formatting of IMD data ending in apostrophe IMD text data may end in an apostrophe (e.g. dreamin' ) This was causing the segment to be incorrectly formatted as only the last character was checked, not the preceding character to check whether it was quoted add a test for this specific occurence Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Hi Colin, I've signed off the patch, but have a look here at the guidelines for patches: https://wiki.koha-community.org/wiki/Commit_messages#Good_commit_messages Namely, the commit message and the Bugzilla message should be the same, and the patch message should contain Bug XXXX: in the subject heading. Thanks for contributing! And do let me know if you have any questions about the above :)
Created attachment 91814 [details] [review] Bug 23251: Correct formatting of IMD data ending in apostrophe IMD text data may end in an apostrophe (e.g. dreamin' ) This was causing the segment to be incorrectly formatted as only the last character was checked, not the preceding character to check whether it was quoted add a test for this specific occurence Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Nice work! Pushed to master for 19.11.00
Pushed to 19.05.x for 19.05.03
backported to 18.11.x for 18.11.10