Bug 19417 - Improve display of errors from background job during stage for import
Summary: Improve display of errors from background job during stage for import
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Nick Clemens
QA Contact: Martin Renvoize
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-05 15:26 UTC by Nick Clemens
Modified: 2019-03-19 11:08 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 19417 - Display full error text when problem importing records (2.86 KB, patch)
2017-10-05 15:29 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19417 - Display full error text when problem importing records (2.65 KB, patch)
2019-02-20 13:25 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19417 - Display full error text when problem importing records (2.96 KB, patch)
2019-02-20 15:31 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19417 - Display full error text when problem importing records (2.96 KB, patch)
2019-03-04 20:36 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 19417 - Make error just a wee more human (1.42 KB, patch)
2019-03-04 20:36 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 19417 - Display full error text when problem importing records (3.00 KB, patch)
2019-03-04 20:39 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 19417 - Make error just a wee more human (1.42 KB, patch)
2019-03-04 20:40 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 19417 - Make error just a wee more human (1.48 KB, patch)
2019-03-04 21:22 UTC, Hayley Mapley
Details | Diff | Splinter Review
Bug 19417: Display full error text when problem importing records (3.05 KB, patch)
2019-03-12 13:15 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 19417: Make error just a wee more human (1.54 KB, patch)
2019-03-12 13:15 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 19417: (QA follow-up) Fix missing $raw filter (1.02 KB, patch)
2019-03-12 13:15 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2017-10-05 15:26:17 UTC
When importing records, if there is an error in the staging we display:
Failed to submit form: error

This is not helpful, we should instead display the error textReponse field
Comment 1 Nick Clemens 2017-10-05 15:29:22 UTC
Created attachment 67648 [details] [review]
Bug 19417 - Display full error text when problem importing records

To test:
1 - Upload a file to stage
2 - Select your import options
3 - Delete the file form the server, example:
sudo rm /tmp/koha_kohadev_uploads/
4 - 'Click stage for import'
5 - Get an alert 'Failed to submit form: error'
6 - Apply patches
7 - Repeat 1-4
8 - Get a pretty error with all osrt of info
Comment 2 Nick Clemens 2017-10-05 15:43:40 UTC
Note this changes the behavior of message in rancor, you now have to click to clear them, they don't clear on mouse move
Comment 3 Katrin Fischer 2017-10-07 12:40:43 UTC
The new message is not translatable, can you please fix?
Comment 4 Nick Clemens 2017-10-10 17:00:33 UTC
The error is returned by the Ajax call, I don't know if we can make it translatable, I think we would have to define our own messages, but parsing out directories etc might be difficult.  

How would it be to preserve the existing but add a 'more details' option that would display this untranslatable text?
Comment 5 Nick Clemens 2019-02-20 13:25:31 UTC
Created attachment 85353 [details] [review]
Bug 19417 - Display full error text when problem importing records

To test:
1 - Upload a file to stage
2 - Select your import options
3 - Delete the file from the server, example:
    sudo rm /tmp/koha_kohadev_uploads/
4 - 'Click stage for import'
5 - Get an alert 'Failed to submit form: error'
6 - Apply patches
7 - Repeat 1-4
8 - Get a pretty error with additional info
Comment 6 Nick Clemens 2019-02-20 15:31:58 UTC
Created attachment 85367 [details] [review]
Bug 19417 - Display full error text when problem importing records

To test:
1 - Upload a file to stage
2 - Select your import options
3 - Delete the file from the server, example:
    sudo rm /tmp/koha_kohadev_uploads/
4 - 'Click stage for import'
5 - Get an alert 'Failed to submit form: error'
6 - Apply patches
7 - Repeat 1-4
8 - Get a pretty error with additional info
Comment 7 Liz Rea 2019-03-04 20:36:11 UTC
Created attachment 86033 [details] [review]
Bug 19417 - Display full error text when problem importing records

To test:
1 - Upload a file to stage
2 - Select your import options
3 - Delete the file from the server, example:
    sudo rm /tmp/koha_kohadev_uploads/
4 - 'Click stage for import'
5 - Get an alert 'Failed to submit form: error'
6 - Apply patches
7 - Repeat 1-4
8 - Get a pretty error with additional info
Comment 8 Liz Rea 2019-03-04 20:36:52 UTC
Created attachment 86037 [details] [review]
Bug 19417 - Make error just a wee more human

Small follow up to make the text explicitly say "Import of records
failed" instead of "Failed to submit form"

Users don't even know that they're submitting a form, what they think
they're doing is uploading records. Let's use their words instead of
developer words.
Comment 9 Liz Rea 2019-03-04 20:39:50 UTC
Created attachment 86038 [details] [review]
Bug 19417 - Display full error text when problem importing records

To test:
1 - Upload a file to stage
2 - Select your import options
3 - Delete the file from the server, example:
    sudo rm /tmp/koha_kohadev_uploads/
4 - 'Click stage for import'
5 - Get an alert 'Failed to submit form: error'
6 - Apply patches
7 - Repeat 1-4
8 - Get a pretty error with additional info

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Comment 10 Liz Rea 2019-03-04 20:40:10 UTC
Created attachment 86039 [details] [review]
Bug 19417 - Make error just a wee more human

Small follow up to make the text explicitly say "Import of records
failed" instead of "Failed to submit form"

Users don't even know that they're submitting a form, what they think
they're doing is uploading records. Let's use their words instead of
developer words.
Comment 11 Hayley Mapley 2019-03-04 21:22:42 UTC
Created attachment 86042 [details] [review]
Bug 19417 - Make error just a wee more human

Small follow up to make the text explicitly say "Import of records
failed" instead of "Failed to submit form"

Users don't even know that they're submitting a form, what they think
they're doing is uploading records. Let's use their words instead of
developer words.

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Comment 12 Martin Renvoize 2019-03-12 13:15:28 UTC
Created attachment 86528 [details] [review]
Bug 19417: Display full error text when problem importing records

To test:
1 - Upload a file to stage
2 - Select your import options
3 - Delete the file from the server, example:
    sudo rm /tmp/koha_kohadev_uploads/
4 - 'Click stage for import'
5 - Get an alert 'Failed to submit form: error'
6 - Apply patches
7 - Repeat 1-4
8 - Get a pretty error with additional info

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 13 Martin Renvoize 2019-03-12 13:15:31 UTC
Created attachment 86529 [details] [review]
Bug 19417: Make error just a wee more human

Small follow up to make the text explicitly say "Import of records
failed" instead of "Failed to submit form"

Users don't even know that they're submitting a form, what they think
they're doing is uploading records. Let's use their words instead of
developer words.

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 14 Martin Renvoize 2019-03-12 13:15:34 UTC
Created attachment 86530 [details] [review]
Bug 19417: (QA follow-up) Fix missing $raw filter

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 15 Martin Renvoize 2019-03-12 13:17:37 UTC
Made a few minor corrections to make the QA scripts happy.

Otherwise, a nice improvement which I think considerably improves feedback to the end user. 

I don't believe we can easily translate these error messages and do believe it's better to display them than to not display them so I'm Passing QA here even though it's untranslatable.
Comment 16 Nick Clemens 2019-03-16 13:55:50 UTC
Awesome work all!

Pushed to master for 19.05
Comment 17 Martin Renvoize 2019-03-19 11:08:52 UTC
Enhancement will not be backported to 18.11.x series.