Bug 33354 - Error 400 Bad Request when submitting form in ERM
Summary: Error 400 Bad Request when submitting form in ERM
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: ERM (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Pedro Amorim
QA Contact:
URL:
Keywords:
Depends on: 32030
Blocks:
  Show dependency treegraph
 
Reported: 2023-03-29 08:26 UTC by Pedro Amorim
Modified: 2023-12-28 20:43 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00,22.11.06


Attachments
Bug 33354: Add 'required' UI elements (1.31 KB, patch)
2023-03-29 15:12 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 33354: Add error if related user open but user is missing (2.13 KB, patch)
2023-03-29 15:12 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 33354: Show all form error messages in the warning dialog (1.71 KB, patch)
2023-03-29 15:12 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 33354: Add 'required' UI elements (1.38 KB, patch)
2023-04-04 07:35 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33354: Add error if related user open but user is missing (2.20 KB, patch)
2023-04-04 07:35 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33354: Show all form error messages in the warning dialog (1.78 KB, patch)
2023-04-04 07:35 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33354: Add 'required' UI elements (1.44 KB, patch)
2023-04-19 09:51 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 33354: Add error if related user open but user is missing (2.26 KB, patch)
2023-04-19 09:51 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 33354: Show all form error messages in the warning dialog (1.84 KB, patch)
2023-04-19 09:51 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 Pedro Amorim 2023-03-29 08:26:30 UTC
To reproduce:
* Add new agreement
* Fill in the preliminary mandatory fields (name and status)
* Click "add new user"
* Select a user role, do not pick a user
* Submit

You will get a 400 Bad Request error.

This is likely also happening in Licenses.

---

This would likely be fixed by making the user field mandatory
Comment 1 Pedro Amorim 2023-03-29 15:12:15 UTC
Created attachment 148931 [details] [review]
Bug 33354: Add 'required' UI elements
Comment 2 Pedro Amorim 2023-03-29 15:12:18 UTC
Created attachment 148932 [details] [review]
Bug 33354: Add error if related user open but user is missing
Comment 3 Pedro Amorim 2023-03-29 15:12:20 UTC
Created attachment 148933 [details] [review]
Bug 33354: Show all form error messages in the warning dialog
Comment 4 Jonathan Druart 2023-04-04 07:35:40 UTC
Created attachment 149113 [details] [review]
Bug 33354: Add 'required' UI elements

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 5 Jonathan Druart 2023-04-04 07:35:42 UTC
Created attachment 149114 [details] [review]
Bug 33354: Add error if related user open but user is missing

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 6 Jonathan Druart 2023-04-04 07:35:45 UTC
Created attachment 149115 [details] [review]
Bug 33354: Show all form error messages in the warning dialog

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 7 Martin Renvoize 2023-04-19 09:51:49 UTC
Created attachment 149854 [details] [review]
Bug 33354: Add 'required' UI elements

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 8 Martin Renvoize 2023-04-19 09:51:51 UTC
Created attachment 149855 [details] [review]
Bug 33354: Add error if related user open but user is missing

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 9 Martin Renvoize 2023-04-19 09:51:54 UTC
Created attachment 149856 [details] [review]
Bug 33354: Show all form error messages in the warning dialog

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 10 Martin Renvoize 2023-04-19 09:53:23 UTC
Reasonable solution, Passing QA.

I'd like to have seen a corresponding cyrpess test, but after a quick discussion with Pedro I understand there's a medium term plan to look at migrating this from new window to modal operation and then write the tests there.. writing new window tests is beyond scope here (and isn't trivial apparently)
Comment 11 Tomás Cohen Arazi 2023-04-19 12:22:06 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 12 Jacob O'Mara 2023-05-09 20:52:33 UTC
Nice work, thanks everyone!

Pushed to 22.11.x for the next release.
Comment 13 Lucas Gass 2023-05-15 14:42:12 UTC
Missing dependencies for 22.05.x, no backport.