The script members/guarantor_search.pl makes the following call: my ($od,$issue,$fines)=GetMemberIssuesAndFines($results->[$i]{'borrowerid'}); Not only does this call always fail because borrowerid is not a valid key, but the results are never even used in the template!
Created attachment 27988 [details] [review] Bug 12198 - Guarantor search makes incorrect and unnecessary call to GetMemberIssuesAndFines The script members/guarantor_search.pl makes the following call: my ($od,$issue,$fines)=GetMemberIssuesAndFines($results->[$i]{'borrowerid'}); Not only does this call always fail because borrowerid is not a valid key, but the results are never even used in the template! Test Plan: 1) Apply this patch 2) Verify the gurantor search works as before, No changes in behavior should be noted
Created attachment 27989 [details] [review] Bug 12198 - Remove unused variables, tidy code
Created attachment 27996 [details] [review] Bug 12198: remove unnecessary call to GetMemberIssuesAndFines from guarantor search The script members/guarantor_search.pl made the following call: my ($od,$issue,$fines)=GetMemberIssuesAndFines($results->[$i]{'borrowerid'}); Not only does this call always fail because borrowerid is not a valid key, but the results are never even used in the template! Test Plan: 1) Apply this patch 2) Verify the gurantor search works as before, No changes in behavior should be noted Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Created attachment 27997 [details] [review] Bug 12198: (code cleanup) remove unused variables, tidy code To test: [1] Perform searches for guarantors and verify that there are no regressions. Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Created attachment 27998 [details] [review] Bug 12198: (follow-up) fix warning when opening guarantor search form To test: [1] Verify that act of running a guarantor search does not result in the following warning message in the Apache log: "guarantor_search.pl: Use of uninitialized value $member in string ne at guarantor_search.pl line 63" Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Created attachment 28108 [details] [review] Bug 12198: remove unnecessary call to GetMemberIssuesAndFines from guarantor search The script members/guarantor_search.pl made the following call: my ($od,$issue,$fines)=GetMemberIssuesAndFines($results->[$i]{'borrowerid'}); Not only does this call always fail because borrowerid is not a valid key, but the results are never even used in the template! Test Plan: 1) Apply this patch 2) Verify the gurantor search works as before, No changes in behavior should be noted Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Created attachment 28109 [details] [review] Bug 12198: (code cleanup) remove unused variables, tidy code To test: [1] Perform searches for guarantors and verify that there are no regressions. Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Created attachment 28110 [details] [review] Bug 12198: (follow-up) fix warning when opening guarantor search form To test: [1] Verify that act of running a guarantor search does not result in the following warning message in the Apache log: "guarantor_search.pl: Use of uninitialized value $member in string ne at guarantor_search.pl line 63" Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Pushed to master. Thanks, Kyle!