Bug 24323: Advanced editor - Display an error message if the record did not save
authorCori Lynn Arnold <carnold@dgiinc.com>
Tue, 31 Dec 2019 17:10:14 +0000 (17:10 +0000)
committerHayley Mapley <hayleymapley@catalyst.net.nz>
Mon, 10 Feb 2020 02:38:22 +0000 (15:38 +1300)
commit019755b58555bc0be7ea9ce840afe70793d47ad4
treecd9d99aa7db28a773feb7bdbf7f8eb05e8e614e0
parentce95347e80d5955ffd45665e859d75b52c464745
Bug 24323: Advanced editor - Display an error message if the record did not save

Invalid 008 with helper silently fails to save.

This patch adds a "else if" to fall through if the error message isn't
one of the previously defined ones ("syntax" and "invalid") and presents
the human with a generic message that "Something went wrong, cannot
save."

Prior to testing:
a/Verify that Advanced Editor is enabled
b/Download the errorrecord.mrc from bug

To test:
1/Apply patch
2/Go to Cataloging->Advanced Editor
3/Click "Import Record" button and navigate to the record saved from
step b/
4/Add an 003 field (as required by the default cataloging config)
5/Hit "Save to catalog"
6/Verify that a message is passed to the user that the file was unable
to be saved

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit ae4c86e87e26a06611519510c386723e3a904371)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit df8a536bbc40348699552e336d5bf7dc3e7a7203)
Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc