]> git.koha-community.org Git - koha.git/commit
Bug 9302: Add ability to merge patron records
authorKyle M Hall <kyle@bywatersolutions.com>
Tue, 29 Aug 2017 17:55:59 +0000 (13:55 -0400)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 20 Apr 2018 16:34:41 +0000 (13:34 -0300)
commit11a2970d0e6c57752e6993c2ec162405878b0c95
tree5262d23818944ef3d06eb4f39d07dfb1d6cc3f38
parentfe5f6c8efdf46cfc8e8c93130256bbacf77b5a0b
Bug 9302: Add ability to merge patron records

It would be great if there were a merge patrons feature. If you
accidentally end up with one patron with two cards it would be nice to
merge their records together so that you don't lose their history or
holds or anything.

This patch adds a basic patron merge feature. It attempts to relink all
patron related tables from the patron(s) to be merged. It does not
attempt to relink librarian account related tables at this time. This
feature does not attempt to automatically resolve issues such as
duplicate holds. Such a feature could build upon this one though.

Test Plan:
1) Apply this patch
2) Find two or more patrons
3) Perform a patron search that will bring them up on the same page of
   results, or add them all to a list of patrons.
4) Use the 'merge' button to begin the merging process
5) Choose a patron to keep
6) Verify the deleted patrons data ( checkouts, holds, etc )
   are now linked to the kept patron

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Ed Veal <eveal@mckinneytexas.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/Patrons.pm
koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/merge-patrons.tt [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt
members/merge-patrons.pl [new file with mode: 0755]
t/db_dependent/Patrons.t