Bug 24323 - Advanced editor - Invalid 008 with helper silently fails to save
Summary: Advanced editor - Invalid 008 with helper silently fails to save
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Cori Lynn Arnold
QA Contact: Testopia
URL:
Keywords:
: 24196 24205 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-12-31 14:51 UTC by Cori Lynn Arnold
Modified: 2021-06-14 21:29 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.03, 19.05.08, 18.11.14


Attachments
Record causing silent failure (1.21 KB, text/plain)
2019-12-31 14:51 UTC, Cori Lynn Arnold
Details
Bug 24323: Advanced editor - Invalid 008 with helper silently fails to save (1.95 KB, patch)
2019-12-31 17:37 UTC, Cori Lynn Arnold
Details | Diff | Splinter Review
Bug 24323: Advanced editor - Invalid 008 with helper silently fails to save (2.01 KB, patch)
2020-01-02 21:51 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 24323: Advanced editor - Invalid 008 with helper silently fails to save (2.08 KB, patch)
2020-01-10 09:18 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24323: Advanced editor - Display an error message if the record did not save (2.13 KB, patch)
2020-01-10 09:19 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Cori Lynn Arnold 2019-12-31 14:51:48 UTC
Created attachment 96702 [details]
Record causing silent failure

Steps to reproduce:

0/Save the attachment "errorrecord.mrc"
1/Login to Koha with "EnableAdvancedCatalogingEditor" set to "Enable"
2/Go to Cataloging->AdvancedEditor
3/Click "Import Record" and navigate to the record saved from step 0
3.5/Verify that the "helpers" are active (green boxes around the control fields) -> if not go to Settings and click "Show helpers for fixed and coded fields"
4/Add an 003 with "blah" as the text (required for the default cataloging config)
5/Hit "Save to catalog"

Results:
The button spins and then returns to normal but the record is not saved to the catalog and no error message is displayed.

Expected results:
Error reporting an invalid 008 field

If you click back to "Show fields verbatim" red dots will appear in the invalid 008 fields.

This record was retrieved from public Z39.50 servers for a project.
Comment 1 Cori Lynn Arnold 2019-12-31 17:37:22 UTC
Created attachment 96723 [details] [review]
Bug 24323: Advanced editor - 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
Comment 2 Cori Lynn Arnold 2019-12-31 19:03:43 UTC
assigning to me.
Comment 3 Cori Lynn Arnold 2020-01-02 18:50:04 UTC
*** Bug 24196 has been marked as a duplicate of this bug. ***
Comment 4 Cori Lynn Arnold 2020-01-02 18:50:42 UTC
*** Bug 24205 has been marked as a duplicate of this bug. ***
Comment 5 Katrin Fischer 2020-01-02 21:51:17 UTC
Created attachment 96771 [details] [review]
Bug 24323: Advanced editor - 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>
Comment 6 Katrin Fischer 2020-01-02 21:51:54 UTC
I think it would be nice if the feedback would be more precise, highlighting the problem in the 008, but this is definitely a good step forward.
Comment 7 Jonathan Druart 2020-01-10 09:18:12 UTC
Created attachment 97166 [details] [review]
Bug 24323: Advanced editor - 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>
Comment 8 Jonathan Druart 2020-01-10 09:19:48 UTC
Created attachment 97167 [details] [review]
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>
Comment 9 Martin Renvoize 2020-01-10 10:51:14 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 10 Joy Nelson 2020-01-30 23:56:53 UTC
Pushed to 19.11.x branch for 19.11.03
Comment 11 Lucas Gass 2020-02-05 22:09:54 UTC
backported to 19.05.x for 19.05.08
Comment 12 Hayley Pelham 2020-02-10 03:57:47 UTC
Backported to 18.11.x for 18.11.14.