Bug 24113 - guarantor info lost when a duplicate is found
Summary: guarantor info lost when a duplicate is found
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low major (vote)
Assignee: Kyle M Hall
QA Contact: Testopia
URL:
Keywords:
Depends on: 14570
Blocks:
  Show dependency treegraph
 
Reported: 2019-11-26 09:23 UTC by Jonathan Druart
Modified: 2022-12-05 11:26 UTC (History)
4 users (show)

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


Attachments
Bug 24113: guarantor info lost when a duplicate is found (3.70 KB, patch)
2019-11-26 15:28 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 24113: guarantor info lost when a duplicate is found (3.78 KB, patch)
2019-11-26 15:57 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24113: guarantor info lost when a duplicate is found (3.80 KB, patch)
2019-11-27 07: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 Jonathan Druart 2019-11-26 09:23:48 UTC
When a patron is created with a guarantor but a duplicate is found (or any other warnings I guess) the guarantor's info are lost.

To recreate:
Create a patron with surname=toto
Create a kid with surname=toto and a guarantor
Save
Confirm that you want to create a new record
=> The guarantor info is not saved

It works prior to bug 14570.
Comment 1 Kyle M Hall 2019-11-26 15:28:12 UTC
Created attachment 95834 [details] [review]
Bug 24113: guarantor info lost when a duplicate is found

When a patron is created with a guarantor but a duplicate is found (or any other warnings I guess) the guarantor's info are lost.

This patch improves on previous functionality by retaining the select guarantor relationship as well.

Test Plan:
1) Create a new child with a name already used, add a guarantor
2) Attempt to save, no the guarantor is not shown when the editor is redisplayed
3) Apply this patch
4) Restart all the things!
5) Repeat 1
6) Note the guarantor is retained and the relationship is as well!
Comment 2 Jonathan Druart 2019-11-26 15:57:22 UTC
Created attachment 95835 [details] [review]
Bug 24113: guarantor info lost when a duplicate is found

When a patron is created with a guarantor but a duplicate is found (or any other warnings I guess) the guarantor's info are lost.

This patch improves on previous functionality by retaining the select guarantor relationship as well.

Test Plan:
1) Create a new child with a name already used, add a guarantor
2) Attempt to save, no the guarantor is not shown when the editor is redisplayed
3) Apply this patch
4) Restart all the things!
5) Repeat 1
6) Note the guarantor is retained and the relationship is as well!

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 3 Martin Renvoize 2019-11-27 07:51:49 UTC
Created attachment 95843 [details] [review]
Bug 24113: guarantor info lost when a duplicate is found

When a patron is created with a guarantor but a duplicate is found (or any other warnings I guess) the guarantor's info are lost.

This patch improves on previous functionality by retaining the select guarantor relationship as well.

Test Plan:
1) Create a new child with a name already used, add a guarantor
2) Attempt to save, no the guarantor is not shown when the editor is redisplayed
3) Apply this patch
4) Restart all the things!
5) Repeat 1
6) Note the guarantor is retained and the relationship is as well!

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 4 Martin Renvoize 2019-11-27 07:52:10 UTC
Thanks for the quick fix, Passing QA and Pushing.
Comment 5 Martin Renvoize 2019-11-27 07:52:37 UTC
Nice work!

Pushed to master for 19.11.00