[Koha-bugs] [Bug 14794] Searching patron by birthday is slow / never gives a result
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Sep 11 09:52:23 CEST 2015
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14794
--- Comment #3 from Joonas Kylmälä <j.kylmala at 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.
More information about the Koha-bugs
mailing list