Bug 24750: Instructor Search Results

Adds regex to the split() of the passed parameters to improve searching.

Test plan
1. Go to Course Reserves module.
2. Press New course button.
3. Make active the instructor search box.
4. Start typing the last name of a patron that exists in your database.
5. At the end of the last name type ", " and try to add a first name.
6. The search should fail.
7. Apply the patch.
8. Follow steps 1-5 again.
9. You should now be able to search using the following methods
9a. surname, firstname
9b. firstname surname

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Joseph Sikowitz 2020-04-18 16:06:05 -04:00 committed by Martin Renvoize
parent 866c6850e0
commit b50641b479
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 1 additions and 1 deletions

View File

@ -52,7 +52,7 @@ if ( C4::Context->preference("IndependentBranches")
$limit_on_branch = 1;
}
my @parts = split( / /, $query );
my @parts = split( /,\s|\s/, $query );
my @params;
foreach my $p (@parts) {
push(