[Bug 14794] New: Searching patron by birthday is slow / never gives a result
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14794 Bug ID: 14794 Summary: Searching patron by birthday is slow / never gives a result Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Searching Assignee: gmcharlt@gmail.com Reporter: j.kylmala@gmail.com QA Contact: testopia@bugs.koha-community.org When searching patrons by patrons' birthday in staff side (Home › Patrons & choose search field Date of Birth), it seems like the web page gives never an answer to the user. It just keeps showing that "Processing..." thingie. So this happened when I gave only the day and month of the full birth day / or if I gave only the year of the birthday. With the full xx/xx/xxxx form it works. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14794 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch Severity|enhancement |minor --- Comment #1 from Marc Véron <veron@veron.ch> --- I did following tests: Set datefomat syspref to dd/mm/yyy Do a search from the header section on Home > Patrons Expand search option with [+] Select "Date of birth" A small hint appears explaining that dates should be entered as DD/MM/YYYY Select "Contains" Search for 16/09/1946 (I have one patron with this birth date) Result OK Do the same with "Starts with" Result OK Do the same with 16/09 Do the same with 16.09.1946 Result (for both): Software error: The given date (16.09.1946) does not match the date format (metric) at /usr/share/kohaclone/Koha/DateUtils.pm line 144. Repeat search in the filter section at the left: Select "Date of birth" (No hint about format appears) Search for 16/09/1946 Result OK Do the same with 16/09 or 16.09.1946 Result: Data table appears with endless "Processing..." as described by Joonas Setting importance to "Minor" (The component mostly works, but causes some irritation to users.) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14794 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=13601 --- Comment #2 from Marc Véron <veron@veron.ch> --- For the case of the search at the left (endless 'Processing'): It dies inside a call to dt_from_string($searchmember) in svc/members/search, line 51 For the search from the header, it dies dies inside a call to dt_from_string($searchmember) in members/member.pl , line 70 dt_from_string dies in Koha/DateUtils.pm at line 144 if it does not get a valid date string (in the current syspref format or in the iso format). I think that this part of dt_from_string should go to a separate sub. See http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13601#c27 It could then be used for pre-testing date strings from user inputs like the ones in this bug. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14794 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=12072 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14794 --- Comment #3 from Joonas Kylmälä <j.kylmala@gmail.com> --- (In reply to Marc Véron from comment #2)
For the case of the search at the left (endless 'Processing'):
It dies inside a call to dt_from_string($searchmember) in svc/members/search, line 51
For the search from the header, it dies dies inside a call to dt_from_string($searchmember) in members/member.pl , line 70
dt_from_string dies in Koha/DateUtils.pm at line 144 if it does not get a valid date string (in the current syspref format or in the iso format).
I think that this part of dt_from_string should go to a separate sub. See http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13601#c27
It could then be used for pre-testing date strings from user inputs like the ones in this bug.
I can agree with you that we should move it to another sub and then we could test it. However, I think the user should be able to do a search with just a year / day / month set, not all of them.. We could do it so that if the user wants to search by year the input could be, for example, 1990/??/?? or maybe just 1990. With days and months it is hard to separate them from each other, so that's why I used the marking ?. So if someone wants to search patrons by birthday day it would be ????/??/20 (yyyy/mm/dd). If we want to do my proposal we would need to add a new argument (flag) in the testing subroutine's arguments to indicate that this is a date string in ????/??/?? format, where some ? can be digits. But if we now just focus on solving the endless processing text showing, lets fix that first, and maybe I'll do another bug report for my proposal! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14794 Joonas Kylmälä <j.kylmala@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |In Discussion -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14794 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I think we need a patch to fix the software error (maybe JS side). We could imagine to accept a year also (YYYY), but something like ????/??/20 looks to me a bit too much. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org