Bug 12784

Summary: A patron cannot change his personal details
Product: Koha Reporter: Yohann Dufour <yohann.dufour>
Component: OPACAssignee: Yohann Dufour <yohann.dufour>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: critical    
Priority: P5 - low CC: katrin.fischer, tomascohen, veron
Version: Main   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12623
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 12781    
Bug Blocks:    
Attachments: Bug 12784: Patron cannot change his personal details
[Signed-off] Bug 12784: Patron cannot change his personal details
[PASSED QA] Bug 12784: Patron cannot change his personal details

Description Yohann Dufour 2014-08-19 08:50:19 UTC
From OPAC, a patron cannot change twice his personal details, an error occurs :
DBIx::Class::Storage::DBI::_dbh_execute(): Duplicate entry '51' for key 'PRIMARY' at /home/katrin/kohaclone/Koha/Borrower/Modifications.pm line 63

To reproduce :
1/ Login with a user in the opac
2/ Request some modification (surname for example)
3/ Repeat 2/
Comment 1 Yohann Dufour 2014-08-19 09:07:26 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2014-08-19 16:22:06 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2014-08-21 07:02:03 UTC
Created attachment 31036 [details] [review]
[PASSED QA] Bug 12784: Patron cannot change his personal details

This patch fixes the regression introduced by the bug 12623 : a patron cannot change his personal details from OPAC.

Test plans :
In order to test this patch, first you have to apply the patch of bug 12781

a1/ Login with a user in OPAC
a2/ Request some modification (surname for example)
a3/ Repeat 2/
a4/ There are no errors

b1/ Register a new user from OPAC with the syspref :
PatronSelfRegistrationVerifyByEmail with the value "Require"
b2/ There are no errors

Followed test plan. Patch behaves as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Patch works as expected, passes tests and QA script.

Note: The second patron modification request
of one patron will overwrite his/her first request.
Comment 4 Tomás Cohen Arazi 2014-08-21 12:57:37 UTC
Patch pushed to master.

Thanks Yohann!