Bug 20616 - Using "Edit serials" with no issues selected gives an ugly error
Summary: Using "Edit serials" with no issues selected gives an ugly error
Status: Pushed to Master
Alias: None
Product: Koha
Classification: Unclassified
Component: Serials (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-19 06:39 UTC by Katrin Fischer
Modified: 2018-04-24 15:36 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 20616: Prevent "edit serials" form submission if no serial is selected (1.59 KB, patch)
2018-04-23 19:21 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 20616: Prevent "edit serials" form submission if no serial is selected (1.73 KB, patch)
2018-04-23 21:36 UTC, Séverine Queune
Details | Diff | Splinter Review
Bug 20616: Prevent "edit serials" form submission if no serial is selected (1.79 KB, patch)
2018-04-24 05:45 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20616: (QA follow-up) Make alert translatable (1.12 KB, patch)
2018-04-24 05:46 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2018-04-19 06:39:10 UTC
To test:

- create a subscrpition
- go to the serials collection page
- don't check any checkboxes for serials
- click 'Edit serials'

There will be an internal server error:

Use of uninitialized value $serstatus in split at /home/vagrant/kohaclone/serials/serials-edit.pl line 100.
Can't call method "title" on an undefined value at /home/vagrant/kohaclone/serials/serials-edit.pl line 423.
Comment 1 Jonathan Druart 2018-04-23 19:21:43 UTC
Created attachment 74766 [details] [review]
Bug 20616: Prevent "edit serials" form submission if no serial is selected

In order to prevent the form to submit and gives an ugly error if no
issues are selected we will make sure at least one is checked otherwise
an alert will be displayed.

Test plan:
- create a subscrpition
- go to the serials collection page
- don't check any checkboxes for serials
- click 'Edit serials'
Comment 2 Séverine Queune 2018-04-23 21:36:16 UTC
Created attachment 74768 [details] [review]
Bug 20616: Prevent "edit serials" form submission if no serial is selected

In order to prevent the form to submit and gives an ugly error if no
issues are selected we will make sure at least one is checked otherwise
an alert will be displayed.

Test plan:
- create a subscrpition
- go to the serials collection page
- don't check any checkboxes for serials
- click 'Edit serials'

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 3 Séverine Queune 2018-04-23 21:38:31 UTC
Warning popup is better than an error page :)
Thank you Cait !
Comment 4 Katrin Fischer 2018-04-24 05:34:06 UTC
It was Jonathan's work :)
Comment 5 Katrin Fischer 2018-04-24 05:45:54 UTC
Created attachment 74772 [details] [review]
Bug 20616: Prevent "edit serials" form submission if no serial is selected

In order to prevent the form to submit and gives an ugly error if no
issues are selected we will make sure at least one is checked otherwise
an alert will be displayed.

Test plan:
- create a subscrpition
- go to the serials collection page
- don't check any checkboxes for serials
- click 'Edit serials'

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Katrin Fischer 2018-04-24 05:46:19 UTC
Created attachment 74773 [details] [review]
Bug 20616: (QA follow-up)  Make alert translatable
Comment 7 Séverine Queune 2018-04-24 07:25:06 UTC
(In reply to Katrin Fischer from comment #4)
> It was Jonathan's work :)

oups... Thank you Cait for pointing this issue, and Jonathan for solving it !
You're a great team.
Comment 8 Jonathan Druart 2018-04-24 15:36:54 UTC
Pushed to master for 18.05, thanks to everybody involved!