https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35836
--- Comment #7 from Matthias Le Gac <matthias.le-...@inlibro.com> --- Created attachment 161836 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=161836&action=edit Bug 35836 - search_for_data_inconsistencies.pl - Search for loops in dependencies. We have guarantors who guarantee individuals who are, in turn, their guarantors. It is not clear if this should be allowed (bz35421), but it works, and has been working for a while. However, it breaks with bz12532, which produces a recursion that disrupts everything. Creation of a code in search_for_data_inconsistencies.pl that identifies loops in borrower_relationships. This must work in both directions for validation. This is the first bz I've made. Here's the test plan, let me know if there's anything to improve. Test Plan: 1 - Apply the patch. 2 - Create 4 different adult users. 3 - In the terminal, navigate to the database. 4 - Insert relationships into the "borrower_relationships" table: - Example: INSERT INTO borrower_relationships (id, guarantor_id, guarantee_id, relationship) VALUES (1, 52, 53, 'father'); INSERT INTO borrower_relationships (id, guarantor_id, guarantee_id, relationship) VALUES (2, 53, 54, 'father'); INSERT INTO borrower_relationships (id, guarantor_id, guarantee_id, relationship) VALUES (3, 54, 52, 'father'); - Ensure that the relationships created form a loop of guarantors. 5 - In the terminal, navigate to your Koha environment's git repository. 6 - Change directory to "cd misc/maintenance." 7 - Run the script to detect guarantor loops: ./search_for_data_inconsistencies.pl 8 - Verify that the output provides the borrower IDs involved in the guarantor loop. *Have fun creating intricate relationships to test the script's limit -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/