[Bug 25311] New: Better error handling when creating a patron
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25311 Bug ID: 25311 Summary: Better error handling when creating a patron Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: ASSIGNED Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org When a new patron is created from the staff interface, the error is not correctly handled and the real cause of the issue is hidden in the logs. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25311 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Better error handling when |Better error handling when |creating a patron |creating/updating a patron -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25311 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25311 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 103930 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=103930&action=edit Bug 25311: Better error handling when creating a patron This is still not ideal but brings a bit of enhancement. One possible problem is that the patron creation will fail if the streetnumber field is too long (borrowers.streetnumber is varchar(10). Test plan: 0. Don't apply this patch 1. Create a new patron with a streetnumber longer than 10 characters 2. Save => The patron has not been created and the app explodes The error is about extended_attributes and not meaningful Can't call method "extended_attributes" on an undefined value at /kohadevbox/koha/members/memberentry.pl line 560 3. Apply the patch 4. Repeat 1. and 2 => You get a warning on the interface and you still see the creation form 5. Check the logs => The error is meaningful "Data too long for column 'streetnumber'" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25311 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 103931 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=103931&action=edit Bug 25311: Better error handling when updating a patron Same as the precedent patch for patron's modification Test plan is identical but with an existing patron -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25311 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |25309 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25309 [Bug 25309] Unable to save patron if streetnumber is too long -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25311 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com --- Comment #3 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Code looks good.. just running through testing it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25311 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #103930|0 |1 is obsolete| | --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 103939 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=103939&action=edit Bug 25311: Better error handling when creating a patron This is still not ideal but brings a bit of enhancement. One possible problem is that the patron creation will fail if the streetnumber field is too long (borrowers.streetnumber is varchar(10). Test plan: 0. Don't apply this patch 1. Create a new patron with a streetnumber longer than 10 characters 2. Save => The patron has not been created and the app explodes The error is about extended_attributes and not meaningful Can't call method "extended_attributes" on an undefined value at /kohadevbox/koha/members/memberentry.pl line 560 3. Apply the patch 4. Repeat 1. and 2 => You get a warning on the interface and you still see the creation form 5. Check the logs => The error is meaningful "Data too long for column 'streetnumber'" Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25311 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #103931|0 |1 is obsolete| | --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 103940 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=103940&action=edit Bug 25311: Better error handling when updating a patron Same as the precedent patch for patron's modification Test plan is identical but with an existing patron Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25311 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Works well for me following the test plan and is a clear improvement. I also tested housebound modifications, patron messaging preference modifications too. Signing off. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25311 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25311 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_20_05_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25311 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |normal -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25311 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- This doesn't work like described in the test plan for me. When I create or update a patron with a streetnumber longer than 10 charactres, it saves nicely, but the entry is cut off at 10 characters. Am I missing something? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25311 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Ok, the message only shows when <strict_sql_modes>1</strict_sql_modes> is set. I don't like the silent failure, but I think that's because the DBMS is silently being mean. Need to fix that elsewhere. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25311 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25311 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #103940|0 |1 is obsolete| | --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 104154 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104154&action=edit Bug 25311: Better error handling when updating a patron Same as the precedent patch for patron's modification Test plan is identical but with an existing patron Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25311 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 104155 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104155&action=edit Bug 25311: (QA follow-up) Add misssing filter Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25311 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #103939|0 |1 is obsolete| | --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 104156 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104156&action=edit Bug 25311: Better error handling when creating a patron This is still not ideal but brings a bit of enhancement. One possible problem is that the patron creation will fail if the streetnumber field is too long (borrowers.streetnumber is varchar(10). Test plan: 0. Don't apply this patch 1. Create a new patron with a streetnumber longer than 10 characters 2. Save => The patron has not been created and the app explodes The error is about extended_attributes and not meaningful Can't call method "extended_attributes" on an undefined value at /kohadevbox/koha/members/memberentry.pl line 560 3. Apply the patch 4. Repeat 1. and 2 => You get a warning on the interface and you still see the creation form 5. Check the logs => The error is meaningful "Data too long for column 'streetnumber'" Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25311 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #104154|0 |1 is obsolete| | --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 104157 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104157&action=edit Bug 25311: Better error handling when updating a patron Same as the precedent patch for patron's modification Test plan is identical but with an existing patron Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25311 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #104155|0 |1 is obsolete| | --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 104158 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104158&action=edit Bug 25311: (QA follow-up) Add misssing filter Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25311 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |20.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25311 --- Comment #14 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work everyone! Pushed to master for 20.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25311 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_20_05_candidate | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25311 Joy Nelson <joy@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joy@bywatersolutions.com --- Comment #15 from Joy Nelson <joy@bywatersolutions.com> --- the recent devs on memberentrygen.tt has made this too difficult for me to rebase to 19.11.x Can this be rebased to 19.11.x? Thanks -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25311 --- Comment #16 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 104743 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104743&action=edit [19.11.x] Bug 25311: Better error handling when creating a patron This is still not ideal but brings a bit of enhancement. One possible problem is that the patron creation will fail if the streetnumber field is too long (borrowers.streetnumber is varchar(10). Test plan: 0. Don't apply this patch 1. Create a new patron with a streetnumber longer than 10 characters 2. Save => The patron has not been created and the app explodes The error is about extended_attributes and not meaningful Can't call method "extended_attributes" on an undefined value at /kohadevbox/koha/members/memberentry.pl line 560 3. Apply the patch 4. Repeat 1. and 2 => You get a warning on the interface and you still see the creation form 5. Check the logs => The error is meaningful "Data too long for column 'streetnumber'" Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25311 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #104157|0 |1 is obsolete| | --- Comment #17 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 104744 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104744&action=edit Bug 25311: Better error handling when updating a patron Same as the precedent patch for patron's modification Test plan is identical but with an existing patron Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25311 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #104158|0 |1 is obsolete| | --- Comment #18 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 104745 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=104745&action=edit Bug 25311: (QA follow-up) Add misssing filter Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25311 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #104157|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25311 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #104158|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25311 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #104744|Bug 25311: Better error |[19.11.x] Bug 25311: Better description|handling when updating a |error handling when |patron |updating a patron -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25311 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #104745|Bug 25311: (QA follow-up) |[19.11.x] Bug 25311: (QA description|Add misssing filter |follow-up) Add misssing | |filter -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25311 Joy Nelson <joy@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|20.05.00 |20.05.00, 19.11.06 released in| | Status|Pushed to master |Pushed to stable --- Comment #19 from Joy Nelson <joy@bywatersolutions.com> --- Backported to 19.11.x for 19.11.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25311 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net --- Comment #20 from Victor Grousset/tuxayo <victor@tuxayo.net> --- It doesn't apply cleanly on 19.05.x and the conflict isn't simple to solve. If there is an interest in having this backported, feel free to submit a patch for 19.05. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org