It is possible that a Carriage Return may occur in a field derived from a Koha note or shelfmark. If it persists in the message it can cause some parser software to truncate the message. Add a safeguard that no CRs persist in the generated message
Created attachment 113414 [details] [review] Patch to remove unwanted CRs etc from ORDER message Substitution should remove any unwanted characters from message in final formatting. In production at a site who helpfully(?) were adding CR after all notes and in some shelfmarks. Trivial code change
Created attachment 119637 [details] [review] Bug 26989: Safeguard Order Messages from unwanted characters Carriage returns in notes were causing a supplier's parser to truncate Order messages received from Koha. Have removed those and also made a global removal of CR, Line feeds and tabs - the latter two having the possibility of causing errors in the future Signed-off-by: Owen Leonard <oleonard@myacpl.org> There was no test plan to follow, but the patch appears to be making sensible changes. If someone wants to provide a thorough test plan I can re-test.
Grr, this is another one where I've spent some time trying to work out how to write a unit test for the change but completely failed.. leaving for another QA person to take a look and comment.
Created attachment 119765 [details] [review] Bug 26989: Safeguard Order Messages from unwanted characters Carriage returns in notes were causing a supplier's parser to truncate Order messages received from Koha. Have removed those and also made a global removal of CR, Line feeds and tabs - the latter two having the possibility of causing errors in the future Signed-off-by: Owen Leonard <oleonard@myacpl.org> There was no test plan to follow, but the patch appears to be making sensible changes. If someone wants to provide a thorough test plan I can re-test. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Pushed to master for 21.05, thanks to everybody involved!
Pushed to 20.11.x for 20.11.06
Pushed to 20.05.x for 20.05.12
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.