[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Nov 27 11:52:08 CET 2015
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206
--- Comment #8 from Frédéric Demians <frederic at tamil.fr> ---
> The main goal is to have directly the age under the datepiker while typing
> the date of birth. This allows librarian, for example, to change the
> category consequently
OK. Interesting for librarian, indeed. Would be great to have it also on
borrower detail page.
> > Have you seen that there is already a Perl function calculating age in Koha?
> > C4::Members::GetAge(). There is a risk that your javascript code and Perl
> > GetAge() produce a different age.
> So, i should make an Ajax call to a perl script to use this existing sub.
> But why not
With Koha brand new REST API... Or you can alternatively do it JS but adding
some tests to guaranty consistency.
I even see in my crystal ball GetAge() modified to delegate to MySQL the age
calculation for stability reason. For example:
SELECT TIMESTAMPDIFF(YEAR,'2010-09-10',CURDATE())
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list