Summary: | Advanced cataloging editor (rancor) throws a JS error on incomplete/blank lines | ||
---|---|---|---|
Product: | Koha | Reporter: | Kelly McElligott <kelly> |
Component: | Cataloging | Assignee: | Nick Clemens (kidclamp) <nick> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | major | ||
Priority: | P5 - low | CC: | fridolin.somers, lucas, m.de.rooy, margaret, martin.renvoize, nick |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
19.11.00,19.05.03
|
|
Attachments: |
Bug 23045: TextMarc errors on blank lines
Bug 23045: TextMarc errors on blank lines Bug 23045: Return record along with errors Bug 23045: TextMarc errors on blank lines Bug 23045: Return record along with errors Bug 23045: TextMarc errors on blank lines Bug 23045: Return record along with errors |
Description
Kelly McElligott
2019-06-04 13:41:55 UTC
Created attachment 90320 [details] [review] Bug 23045: TextMarc errors on blank lines Since bug 16251 we use TextMarc to get some record fields, however, it throws an error when processing blank lines. We should just pass on these rather then erroring To test: 1 - Define a new macro that delete more fields than it adds delete 245 2 - Run it 3 - Note an error in JS console, and helpers will not load 4 - Apply patch 5 - Reload, try again 6 - No error Created attachment 90405 [details] [review] Bug 23045: TextMarc errors on blank lines Since bug 16251 we use TextMarc to get some record fields, however, it throws an error when processing blank lines. We should just pass on these rather then erroring To test: 1 - Define a new macro that delete more fields than it adds delete 245 2 - Run it 3 - Note an error in JS console, and helpers will not load 4 - Apply patch 5 - Reload, try again 6 - No error Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Created attachment 90411 [details] [review] Bug 23045: Return record along with errors We don't seem to directly handle the errors in most cases, let's always return the record To test: 1 - Add some blank lines to editor, previous patch is okay with this 2 - Add a line with just 'e' or some other incomplete field 3 - Try to save 4 - Note JS leader error 5 - Apply this patch 6 - No errors Created attachment 90466 [details] [review] Bug 23045: TextMarc errors on blank lines Since bug 16251 we use TextMarc to get some record fields, however, it throws an error when processing blank lines. We should just pass on these rather then erroring To test: 1 - Define a new macro that delete more fields than it adds delete 245 2 - Run it 3 - Note an error in JS console, and helpers will not load 4 - Apply patch 5 - Reload, try again 6 - No error Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Liz Rea <wizzyrea@gmail.com> Created attachment 90467 [details] [review] Bug 23045: Return record along with errors We don't seem to directly handle the errors in most cases, let's always return the record To test: 1 - Add some blank lines to editor, previous patch is okay with this 2 - Add a line with just 'e' or some other incomplete field 3 - Try to save 4 - Note JS leader error 5 - Apply this patch 6 - No errors Signed-off-by: Liz Rea <wizzyrea@gmail.com> Created attachment 91136 [details] [review] Bug 23045: TextMarc errors on blank lines Since bug 16251 we use TextMarc to get some record fields, however, it throws an error when processing blank lines. We should just pass on these rather then erroring To test: 1 - Define a new macro that delete more fields than it adds delete 245 2 - Run it 3 - Note an error in JS console, and helpers will not load 4 - Apply patch 5 - Reload, try again 6 - No error Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 91137 [details] [review] Bug 23045: Return record along with errors We don't seem to directly handle the errors in most cases, let's always return the record To test: 1 - Add some blank lines to editor, previous patch is okay with this 2 - Add a line with just 'e' or some other incomplete field 3 - Try to save 4 - Note JS leader error 5 - Apply this patch 6 - No errors Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> This works well and meets current QA requirements.. so I'm Passing QA.. but.. it really worries me that I can't find any tests for Rancor.. I'd really like to have this mini-app tested to lower the likelihood or regressions. I'll open another bug to highlight this issue of missing tests. 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.09 |