[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Julian Mauricechanged: What|Removed |Added Blocks||16285 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16285 [Bug 16285] write_age() function throws error for patron categories that don't include dateofbirth in form -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Owen Leonardchanged: What|Removed |Added See Also||https://bugs.koha-community ||.org/bugzilla3/show_bug.cgi ||?id=16228 -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Jonathan Druartchanged: What|Removed |Added Blocks||16178 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16178 [Bug 16178] Tests for xt/single_quotes.t are failing -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Jonathan Druartchanged: What|Removed |Added Blocks||16066 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16066 [Bug 16066] JavaScript error on new patron form when duplicate is suspected -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Brendan Gallagherchanged: What|Removed |Added CC||bren...@bywatersolutions.co ||m Status|Passed QA |Pushed to Master --- Comment #59 from Brendan Gallagher --- Pushed to Master - Should be in the May 2016 release. Thanks! -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Alex Arnaudchanged: What|Removed |Added Status|Patch doesn't apply |Passed QA -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Alex Arnaudchanged: What|Removed |Added Attachment #47541|0 |1 is obsolete|| --- Comment #57 from Alex Arnaud --- Created attachment 49033 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49033=edit Bug 15206 - Make CalculateAge a reusable function Signed-off-by: Owen Leonard Signed-off-by: Jonathan Druart -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Alex Arnaudchanged: What|Removed |Added Attachment #47542|0 |1 is obsolete|| --- Comment #58 from Alex Arnaud --- Created attachment 49034 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49034=edit Bug 15206: Make strings translatable Signed-off-by: Jonathan Druart -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Alex Arnaudchanged: What|Removed |Added Attachment #47540|0 |1 is obsolete|| --- Comment #56 from Alex Arnaud --- Created attachment 49032 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49032=edit Bug 15206 - Show patron's age under date of birth in memberentry.pl Test plan: Create or edit a patron (members/memberentry.pl), enter a date of birth (for a new patron), patron'a age should be shown under Signed-off-by: Owen Leonard Signed-off-by: Jonathan Druart -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Kyle M Hallchanged: What|Removed |Added Status|Passed QA |Patch doesn't apply CC||k...@bywatersolutions.com --- Comment #55 from Kyle M Hall --- Patch no longer applies. Please rebase and re-set status go "Passed QA". -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 --- Comment #52 from Jonathan Druart--- Created attachment 47541 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47541=edit Bug 15206 - Make CalculateAge a reusable function Signed-off-by: Owen Leonard Signed-off-by: Jonathan Druart -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Jonathan Druartchanged: What|Removed |Added Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 --- Comment #53 from Jonathan Druart--- Created attachment 47542 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47542=edit Bug 15206: Make strings translatable Signed-off-by: Jonathan Druart -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Jonathan Druartchanged: What|Removed |Added Attachment #47505|0 |1 is obsolete|| Attachment #47506|0 |1 is obsolete|| --- Comment #51 from Jonathan Druart --- Created attachment 47540 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47540=edit Bug 15206 - Show patron's age under date of birth in memberentry.pl Test plan: Create or edit a patron (members/memberentry.pl), enter a date of birth (for a new patron), patron'a age should be shown under Signed-off-by: Owen Leonard Signed-off-by: Jonathan Druart -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 --- Comment #54 from Jonathan Druart--- Maybe "display_age" is a better function name than "write_age", I let the RM cut. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Owen Leonardchanged: What|Removed |Added Attachment #47301|0 |1 is obsolete|| --- Comment #50 from Owen Leonard --- Created attachment 47506 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47506=edit [SIGNED-OFF] Bug 15206 - Make CalculateAge a reusable function Signed-off-by: Owen Leonard -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Owen Leonardchanged: What|Removed |Added Attachment #46396|0 |1 is obsolete|| --- Comment #49 from Owen Leonard --- Created attachment 47505 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47505=edit [SIGNED-OFF] Bug 15206 - Show patron's age under date of birth in memberentry.pl Test plan: Create or edit a patron (members/memberentry.pl), enter a date of birth (for a new patron), patron'a age should be shown under Signed-off-by: Owen Leonard -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Owen Leonardchanged: What|Removed |Added Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 --- Comment #48 from Alex Arnaud--- (In reply to Aleisha Amohia from comment #46) > There is a GetAge function already in C4::Members which I used to write a > patch for Bug 14763. I am not saying this is a duplicate of that bug, > because I feel this is slightly different to what my patch does, but is it > possible to use that function for this? I tried to use it by making an ajax call to a perl script but response times are too long. Now CalculateAge function is quite simple and reusable. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 --- Comment #47 from Alex Arnaud--- Created attachment 47301 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=47301=edit Bug 15206 - Make CalculateAge a reusable function -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Alex Arnaudchanged: What|Removed |Added Status|ASSIGNED|Needs Signoff -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Aleisha Amohiachanged: What|Removed |Added CC||aleishaamo...@hotmail.com --- Comment #46 from Aleisha Amohia --- There is a GetAge function already in C4::Members which I used to write a patch for Bug 14763. I am not saying this is a duplicate of that bug, because I feel this is slightly different to what my patch does, but is it possible to use that function for this? -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Jonathan Druartchanged: What|Removed |Added Status|Signed Off |ASSIGNED -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 --- Comment #45 from Jonathan Druart--- I don't understand your issue, what about something like: function CalculateAge(date) { // Caculate age return (years, months); } onchange( age = CalculateAge(date); add_age_string_to_the_div ); -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Marc Véronchanged: What|Removed |Added Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Marc Véronchanged: What|Removed |Added Attachment #46228|0 |1 is obsolete|| --- Comment #37 from Marc Véron --- Created attachment 46245 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46245=edit Bug 15206 - Show patron's age under date of birth in memberentry.pl Test plan: Create or edit a patron (members/memberentry.pl), enter a date of birth (for a new patron), patron'a age should be shown under Followed test plan, works as expected. Signed-off-by: Marc Véron -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Alex Arnaudchanged: What|Removed |Added Status|In Discussion |Needs Signoff --- Comment #36 from Alex Arnaud --- The last patch replace all others. It removes showing of age in patron's detail page (duplicate of bug 14763) and it remove the use of perl sub getAge() via ajax call (bad performances). Also it handles better plural forms. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Alex Arnaudchanged: What|Removed |Added Attachment #45597|0 |1 is obsolete|| Attachment #45598|0 |1 is obsolete|| Attachment #45599|0 |1 is obsolete|| Attachment #45600|0 |1 is obsolete|| Attachment #45601|0 |1 is obsolete|| --- Comment #35 from Alex Arnaud --- Created attachment 46228 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=46228=edit Bug 15206 - Show patron's age under date of birth in memberentry.pl Test plan: Create or edit a patron (members/memberentry.pl), enter a date of birth (for a new patron), patron'a age should be shown under -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Marc Véronchanged: What|Removed |Added See Also||http://bugs.koha-community. ||org/bugzilla3/show_bug.cgi? ||id=15400 -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Jonathan Druartchanged: What|Removed |Added See Also||http://bugs.koha-community. ||org/bugzilla3/show_bug.cgi? ||id=14763 -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Jonathan Druartchanged: What|Removed |Added See Also||http://bugs.koha-community. ||org/bugzilla3/show_bug.cgi? ||id=15395 -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 --- Comment #34 from Marc Véron--- (In reply to Frédéric Demians from comment #33) (...) > > Something like that would do it: > > Age: years: 10 / months: 2 +1 for better translatability -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 --- Comment #33 from Frédéric Demians--- > > > 5/ I think "year(s)" could be replaced with "year" :) And manage the > > > plural > > > for month/months should not be too difficult. > > ? > if months == 1 then display 'month' elsif months > 1 then display 'months' If possible, it should be avoided. Some languages have more than two nouns forms (one for unit, and one for plural). See: http://www.unicode.org/cldr/charts/27/supplemental/language_plural_rules.html Something like that would do it: Age: years: 10 / months: 2 -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 --- Comment #32 from Jonathan Druart--- (In reply to Alex Arnaud from comment #31) > > 3/ Use string_var.format(number) in JS code to display the string > can you be more explicit ? git grep '\.format(' will give you some examples. > > 4/ Why do you use gettext? pass age_month and age_year to the template and > > let it display/translate the string accordingly > I think it's better than use some [% if %]/[% else %] in templates that make > them less readable imo. And now we have (thx Julian Maurice) Koha::I18N. Why > don't use it ? You will have to test the plurial/existence of the vars in the pl, it's the same :) There is absolutely no need to use Koha::I18N here. Pass the values to the template and let it displays the strings as it wants. > > 5/ I think "year(s)" could be replaced with "year" :) And manage the plural > > for month/months should not be too difficult. > ? if months == 1 then display 'month' elsif months > 1 then display 'months' -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 --- Comment #23 from Alex Arnaud--- Created attachment 45593 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45593=edit Bug 15206 - Make string translatable and fix months calculation -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Alex Arnaudchanged: What|Removed |Added Status|ASSIGNED|Needs Signoff -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Marc Véronchanged: What|Removed |Added Attachment #45591|0 |1 is obsolete|| --- Comment #26 from Marc Véron --- Created attachment 45599 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45599=edit Bug 15206 - CalculateAge in memberentry use C4::Members::GetAge() Tested all patches together, works as expected. Signed-off-by: Marc Véron -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Marc Véronchanged: What|Removed |Added Attachment #45592|0 |1 is obsolete|| --- Comment #27 from Marc Véron --- Created attachment 45600 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45600=edit Bug 15206 - Show patron's age in moremenber page near date of birth Tested all patches together, works as expected. Signed-off-by: Marc Véron -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Marc Véronchanged: What|Removed |Added Status|Needs Signoff |Signed Off Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Marc Véronchanged: What|Removed |Added Attachment #45589|0 |1 is obsolete|| --- Comment #24 from Marc Véron --- Created attachment 45597 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45597=edit Bug 15206 - Show patron's age under date of birth in memberentry.pl Test plan: Create a new patron (members/memberentry.pl), enter a date of birth, patron'a age should be shown under Tested all patches together, works as expected. Signed-off-by: Marc Véron -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Marc Véronchanged: What|Removed |Added Attachment #45593|0 |1 is obsolete|| --- Comment #28 from Marc Véron --- Created attachment 45601 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45601=edit Bug 15206 - Make string translatable and fix months calculation Tested all patches together, works as expected. Signed-off-by: Marc Véron -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Jonathan Druartchanged: What|Removed |Added CC||jonathan.dru...@bugs.koha-c ||ommunity.org Status|Signed Off |Failed QA --- Comment #29 from Jonathan Druart --- Whaou, an ajax request looks like a bit overkill imo... Anyway, now it's done. Quick QA comments: 1/ catch error when retrieving the answer of the ajax request (empty .hint) 2/ CalculateAge should only be done if CheckDate return success (otherwise empty .hint) 3/ Use string_var.format(number) in JS code to display the string 4/ Why do you use gettext? pass age_month and age_year to the template and let it display/translate the string accordingly 5/ I think "year(s)" could be replaced with "year" :) And manage the plural for month/months should not be too difficult. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 --- Comment #18 from Alex Arnaud--- (In reply to Alex Arnaud from comment #17) > (In reply to Owen Leonard from comment #16) > > When I try setting a patron's birth date in the patron edit form I get a > > JavaScript error: > > > > "NetworkError: 404 Not Found - > > /cgi-bin/koha/svc/members/age?dateofbirth=2015-11-9" > Oops. Sorry, i forgot to commit the script svc/members/age > > > > I also notice that the date I enter isn't the date which is passed in the > > AJAX call. With MM/DD/ as my system's dateformat preference, I've tried > > these: > > > > Typed 01/03/1990, date passed: 1990-0-3 > > Typed 12/13/1970, date passed: 1970-11-13 > > Typed 06/09/2003, date passed: 2003-5-9 > > It's not a pbm. Months start from 0 to 11. But the result is the same. In fact you are right. Since C4::Members::GetAge() use months from 1 to 12 we have an intervall... Fix is coming -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Alex Arnaudchanged: What|Removed |Added Attachment #44978|0 |1 is obsolete|| --- Comment #19 from Alex Arnaud --- Created attachment 45589 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45589=edit Bug 15206 - Show patron's age under date of birth in memberentry.pl Test plan: Create a new patron (members/memberentry.pl), enter a date of birth, patron'a age should be shown under -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Alex Arnaudchanged: What|Removed |Added Attachment #45581|0 |1 is obsolete|| --- Comment #22 from Alex Arnaud --- Created attachment 45592 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45592=edit Bug 15206 - Show patron's age in moremenber page near date of birth -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Alex Arnaudchanged: What|Removed |Added Attachment #45580|0 |1 is obsolete|| --- Comment #21 from Alex Arnaud --- Created attachment 45591 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45591=edit Bug 15206 - CalculateAge in memberentry use C4::Members::GetAge() -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Alex Arnaudchanged: What|Removed |Added Attachment #45579|0 |1 is obsolete|| --- Comment #20 from Alex Arnaud --- Created attachment 45590 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45590=edit Bug 15206 - C4::Member::GetAge returns years and months -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 --- Comment #30 from Frédéric Demians--- And if you could attach here a single patch rather than a sequence of patches... -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Marc Véronchanged: What|Removed |Added Attachment #45590|0 |1 is obsolete|| --- Comment #25 from Marc Véron --- Created attachment 45598 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45598=edit Bug 15206 - C4::Member::GetAge returns years and months Tested all patches together, works as expected. Signed-off-by: Marc Véron -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Alex Arnaudchanged: What|Removed |Added Status|Failed QA |In Discussion --- Comment #31 from Alex Arnaud --- (In reply to Jonathan Druart from comment #29) > Whaou, an ajax request looks like a bit overkill imo... > Anyway, now it's done. > > Quick QA comments: > 1/ catch error when retrieving the answer of the ajax request (empty .hint) > 2/ CalculateAge should only be done if CheckDate return success (otherwise > empty .hint) right > 3/ Use string_var.format(number) in JS code to display the string can you be more explicit ? > 4/ Why do you use gettext? pass age_month and age_year to the template and > let it display/translate the string accordingly I think it's better than use some [% if %]/[% else %] in templates that make them less readable imo. And now we have (thx Julian Maurice) Koha::I18N. Why don't use it ? > 5/ I think "year(s)" could be replaced with "year" :) And manage the plural > for month/months should not be too difficult. ? -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Alex Arnaudchanged: What|Removed |Added Status|Failed QA |ASSIGNED --- Comment #17 from Alex Arnaud --- (In reply to Owen Leonard from comment #16) > When I try setting a patron's birth date in the patron edit form I get a > JavaScript error: > > "NetworkError: 404 Not Found - > /cgi-bin/koha/svc/members/age?dateofbirth=2015-11-9" Oops. Sorry, i forgot to commit the script svc/members/age > > I also notice that the date I enter isn't the date which is passed in the > AJAX call. With MM/DD/ as my system's dateformat preference, I've tried > these: > > Typed 01/03/1990, date passed: 1990-0-3 > Typed 12/13/1970, date passed: 1970-11-13 > Typed 06/09/2003, date passed: 2003-5-9 It's not a pbm. Months start from 0 to 11. But the result is the same. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 --- Comment #15 from Frédéric Demians--- Otherwise, jQuery ajax call seem great :-) -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Owen Leonardchanged: What|Removed |Added Status|Needs Signoff |Failed QA --- Comment #16 from Owen Leonard --- When I try setting a patron's birth date in the patron edit form I get a JavaScript error: "NetworkError: 404 Not Found - /cgi-bin/koha/svc/members/age?dateofbirth=2015-11-9" I also notice that the date I enter isn't the date which is passed in the AJAX call. With MM/DD/ as my system's dateformat preference, I've tried these: Typed 01/03/1990, date passed: 1990-0-3 Typed 12/13/1970, date passed: 1970-11-13 Typed 06/09/2003, date passed: 2003-5-9 -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 --- Comment #14 from Frédéric Demians--- Comment on attachment 45580 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45580 Bug 15206 - CalculateAge in memberentry use C4::Members::GetAge() Review of attachment 45580: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html=15206=45580) - ::: koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ +163,5 @@ > +data: 'dateofbirth=' + year + '-' + month + '-' + day, > +dataType: 'json', > +success : function(json, statut){ > +var age_string = "Age: "; > +if (json.years) { age_string += json.years + " year(s) "; } Translation issue here also. http://wiki.koha-community.org/wiki/Coding_Guidelines#JavaScript -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 --- Comment #13 from Frédéric Demians--- Comment on attachment 45581 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45581 Bug 15206 - Show patron's age in moremenber page near date of birth Review of attachment 45581: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html=15206=45581) - ::: koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ +225,4 @@ > [% IF ( emailpro ) %]Secondary email: > mailto:[% emailpro %]">[% emailpro %][% END %] > [% END %] > [% IF ( initials ) %]Initials: [% > initials %][% END %] > +[% IF ( dateofbirth ) %]Date of birth:[% > dateofbirth | $KohaDates %] ([% age %])[% END %] I don't know how to have something translatable here. ::: members/moremember.pl @@ +140,5 @@ > $data->{'IS_ADULT'} = ( $data->{'categorycode'} ne 'I' ); > > +my @age; > +my ($years, $months) = GetAge($data->{dateofbirth}); > +push @age, "$years year(s)" if $years; This line, and the next one, will not be translatable. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 --- Comment #11 from Alex Arnaud--- Created attachment 45581 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45581=edit Bug 15206 - Show patron's age in moremenber page near date of birth -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 --- Comment #9 from Alex Arnaud--- Created attachment 45579 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45579=edit Bug 15206 - C4::Member::GetAge returns years and months -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 --- Comment #10 from Alex Arnaud--- Created attachment 45580 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=45580=edit Bug 15206 - CalculateAge in memberentry use C4::Members::GetAge() -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Alex Arnaudchanged: What|Removed |Added Status|In Discussion |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 --- Comment #12 from Alex Arnaud--- Test plan: Create a new patron (members/memberentry.pl), enter a date of birth, patron'a age should be shown under Got to a patron's detail page and check his age near date of birth. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Alex Arnaudchanged: What|Removed |Added Status|Needs Signoff |In Discussion --- Comment #7 from Alex Arnaud --- (In reply to Frédéric Demians from comment #6) > Code review: > > You have: > > function CalculateAge(dateofbirth) { > > Then, you don't use "dateofbirth". > > You have: > > onchange="CalculateAge(document.form.dateofbirth);" >value="[% UNLESS opduplicate %][% dateofbirth %][% END %]" /> > > You rather should use jQuery: > > $( "#dateofbirth" ).change(CalculateAge); You are right. I forgot to remove the function parameter. Using "$("#dateofbirth").datepicker( 'getDate' )" is bettre because it gives me the correct date format > > From an UI point of view, it seems awkward to have displayed firstly > "DD/MM/" under the Date of birth text box, and then having this info > replaced by the age. This way, it's not possible to see the age without > modifying the date of birth. Wouldn't it be better/simpler to display the age > on the detail page (moremember.pl), rather than on the editing page > (memberentry.pl)? 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 > > 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 -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 --- Comment #8 from Frédéric Demians--- > 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. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Frédéric Demianschanged: What|Removed |Added CC||frede...@tamil.fr --- Comment #6 from Frédéric Demians --- Code review: You have: function CalculateAge(dateofbirth) { Then, you don't use "dateofbirth". You have: You rather should use jQuery: $( "#dateofbirth" ).change(CalculateAge); From an UI point of view, it seems awkward to have displayed firstly "DD/MM/" under the Date of birth text box, and then having this info replaced by the age. This way, it's not possible to see the age without modifying the date of birth. Wouldn't it be better/simpler to display the age on the detail page (moremember.pl), rather than on the editing page (memberentry.pl)? 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. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Alex Arnaudchanged: What|Removed |Added Attachment #44953|0 |1 is obsolete|| --- Comment #4 from Alex Arnaud --- Created attachment 44978 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44978=edit Bug 15206 - Show patron's age under date of birth in memberentry.pl Test plan: Create a new patron (members/memberentry.pl), enter a date of birth, patron'a age should be shown under -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Alex Arnaudchanged: What|Removed |Added Status|ASSIGNED|Needs Signoff --- Comment #5 from Alex Arnaud --- I removed the number of days because it's quite imprecise since months haven't the same number of days. If anyone can do better or knows a javascript library that can do it with more accurate feel free to tell me. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Alex Arnaudchanged: What|Removed |Added Status|Needs Signoff |ASSIGNED --- Comment #3 from Alex Arnaud --- (In reply to Marc Véron from comment #2) > Hi Alex, I like thsi feature. > > I played around with a 10 year old kid. > > Today we have 18/11/2015 > > This are my results: > 18/11/2005 -> Age: 10 year(s) 2 day(s) > 18/11/2005 -> Age: 10 year(s) 1 day(s) > 20/11/2005 -> Age: 10 year(s) > 21/11/2005 -> Age: 9 year(s) 11 month(s) 30 day(s) > 22/11/2005 -> Age: 9 year(s) 11 month(s) 29 day(s) > > There seems to be an offset of some days. Hello Marc, Tanks for testing. Indeed there's a problem and i understand why. Patch is coming soon... -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 --- Comment #1 from Alex Arnaud--- Created attachment 44953 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44953=edit Bug 15206 - Show patron's age under date of birth in memberentry.pl Test plan: Create a new patron (members/memberentry.pl), enter a date of birth, patron'a age should be shown under -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Alex Arnaudchanged: What|Removed |Added Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Alex Arnaudchanged: What|Removed |Added Assignee|koha-b...@lists.koha-commun |alex.arn...@biblibre.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 15206] Show patron's age when filling date of birth in memberentry.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15206 Marc Véronchanged: What|Removed |Added CC||ve...@veron.ch --- Comment #2 from Marc Véron --- Hi Alex, I like thsi feature. I played around with a 10 year old kid. Today we have 18/11/2015 This are my results: 18/11/2005 -> Age: 10 year(s) 2 day(s) 18/11/2005 -> Age: 10 year(s) 1 day(s) 20/11/2005 -> Age: 10 year(s) 21/11/2005 -> Age: 9 year(s) 11 month(s) 30 day(s) 22/11/2005 -> Age: 9 year(s) 11 month(s) 29 day(s) There seems to be an offset of some days. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/