There are two problems with the instructor search when entering a new course in Course Reserves: 1. The autofill box only displays up to 10 names so it is difficult to find an instructor who has a common last name. Is there a better way to handle this? 2. If the user enters a comma between the last name and first name it will often not find the instructor.
We could switch it to use the standard patron search used in other modules (for example: adding users to be informed on order lines)
Created attachment 103206 [details] [review] Adds regex to split() for parameters passed to search.
The patch only addresses the search problem, not the length of the list: 2. If the user enters a comma between the last name and first name it will often not find the instructor.
Hi Joe, maybe change the bug title to describe the problem a bit better and split out 1. into a separate bug. It will make it more visible to testers.
Hi Katrin. I changed the title and moved the first part of my original report to bug 25187. Thanks for the help. https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25187
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
Created attachment 103223 [details] [review] 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>
Hi Joe, when you plan to write a patch, please make sure you assign the bug to yourself (Assignee in the form). Thx!
Created attachment 103731 [details] [review] 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>
Welcome, Joe :)
Nice work everyone! Pushed to master for 20.05
Backported to 19.11.x for 19.11.06
backported to 19.05.x for 19.05.11