To recreate: 1. In the main search header switch to 'Search patrons'. Bring up the dropdown and look at 'Search type:'. 2. It defaults to 'Starts with'. 3. Go to '/cgi-bin/koha/members/members-home.pl' and look at the 'Search type:' on the left side. 4. It defaults to 'Contains' 5. Do a patron search from both these places, setting the 'Search type' to contains. 6. The search bar in the header always resets to 'Starts with'
I think these should both default to 'contains'/ And if you do a search with 'contains' it should always retain that parameter.
Created attachment 152604 [details] [review] Bug 34106: Retain searchtype parameter in member-search-box To test: 1. In the main search header switch to 'Search patrons'. Bring up the dropdown and look at 'Search type:'. 2. It defaults to 'Starts with'. 3. Go to '/cgi-bin/koha/members/members-home.pl' and look at the 'Search type:' on the left side. 4. It defaults to 'Contains' 5. Do a patron search from both these places, setting the 'Search type' to contains. 6. The search bar in the header always resets to 'Starts with' 7. Apply patch 8. Try everything again. By default both places should default to contain. 9. If you change the 'Search type' the search in the main header should always retain that value.
Marked as major because this can severely effect library workflows.
Created attachment 152641 [details] [review] Bug 34106: Retain searchtype parameter in member-search-box To test: 1. In the main search header switch to 'Search patrons'. Bring up the dropdown and look at 'Search type:'. 2. It defaults to 'Starts with'. 3. Go to '/cgi-bin/koha/members/members-home.pl' and look at the 'Search type:' on the left side. 4. It defaults to 'Contains' 5. Do a patron search from both these places, setting the 'Search type' to contains. 6. The search bar in the header always resets to 'Starts with' 7. Apply patch 8. Try everything again. By default both places should default to contain. 9. If you change the 'Search type' the search in the main header should always retain that value. Signed-off-by: Ed Veal <eveal@mckinneytexas.org>
Please see also bug 34094 and bug 34092.. They both also resolve this issue I believe and attempt to ratify the code too.
Created attachment 152743 [details] [review] Bug 34106: Retain searchtype parameter in member-search-box To test: 1. In the main search header switch to 'Search patrons'. Bring up the dropdown and look at 'Search type:'. 2. It defaults to 'Starts with'. 3. Go to '/cgi-bin/koha/members/members-home.pl' and look at the 'Search type:' on the left side. 4. It defaults to 'Contains' 5. Do a patron search from both these places, setting the 'Search type' to contains. 6. The search bar in the header always resets to 'Starts with' 7. Apply patch 8. Try everything again. By default both places should default to contain. 9. If you change the 'Search type' the search in the main header should always retain that value. Signed-off-by: Ed Veal <eveal@mckinneytexas.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 152748 [details] [review] Bug 34106: Update header search box searchtype when form is submitted We're updating the side menu searchtype when the search header is submitted, we should also update the searchtype in the search header when the form is submitted
@Lucas For me it felt weird having it update one way but not the other. Can you test my patch and confirm it makes sense? Feel free to drop it if it doesn't!
Since this is fixed in Bug 34094 we can mark this as resolved. *** This bug has been marked as a duplicate of bug 34094 ***
Sorry Lucas, I don't think I was very clear here.. I rebased 34094 upon this removing the inline fixes there so we could keep the distinct parts of the fix clear and separate.. Pedro also added a follow-up to your patch here to improve the handling further. I've unmarked it as duplicate and restored the dependency chain.. just going to test and SO it myself here now.
Created attachment 152785 [details] [review] Bug 34106: Retain searchtype parameter in member-search-box To test: 1. In the main search header switch to 'Search patrons'. Bring up the dropdown and look at 'Search type:'. 2. It defaults to 'Starts with'. 3. Go to '/cgi-bin/koha/members/members-home.pl' and look at the 'Search type:' on the left side. 4. It defaults to 'Contains' 5. Do a patron search from both these places, setting the 'Search type' to contains. 6. The search bar in the header always resets to 'Starts with' 7. Apply patch 8. Try everything again. By default both places should default to contain. 9. If you change the 'Search type' the search in the main header should always retain that value. Signed-off-by: Ed Veal <eveal@mckinneytexas.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 152786 [details] [review] Bug 34106: Update header search box searchtype when form is submitted We're updating the side menu searchtype when the search header is submitted, we should also update the searchtype in the search header when the form is submitted Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Sorry for the confusion here. Thanks Martin and Pedro, the follow-up makes perfect sense to me.
Pushed to master for 23.11. Nice work everyone, thanks!
Thanks for all the hard work! Pushed to 23.05.x for the next release
Nice work everyone! Pushed to oldstable for 22.11.x