Bug 20616

Summary: Using "Edit serials" with no issues selected gives an ugly error
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: SerialsAssignee: Bugs List <koha-bugs>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: colin.campbell, fridolin.somers, martin.renvoize, severine.queune
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:
Attachments: Bug 20616: Prevent "edit serials" form submission if no serial is selected
Bug 20616: Prevent "edit serials" form submission if no serial is selected
Bug 20616: Prevent "edit serials" form submission if no serial is selected
Bug 20616: (QA follow-up) Make alert translatable

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!
Comment 9 Fridolin Somers 2018-10-09 11:02:57 UTC
Pushed to 17.11.x for 17.11.11