Bug 12342 - Patron registration datepicker dropdown shows only 10 years
Summary: Patron registration datepicker dropdown shows only 10 years
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Martin Persson
QA Contact: Testopia
URL:
Keywords:
: 15515 (view as bug list)
Depends on:
Blocks: 18447
  Show dependency treegraph
 
Reported: 2014-06-02 10:36 UTC by paxed
Modified: 2018-12-03 20:04 UTC (History)
12 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 12342: Patron registration datepicker dropdown shows only 10 years (1.87 KB, patch)
2015-05-12 15:09 UTC, Martin Persson
Details | Diff | Splinter Review
Bug 12342: Patron registration datepicker dropdown shows only 10 years (1.93 KB, patch)
2015-05-12 17:04 UTC, Eivin Giske Skaaren
Details | Diff | Splinter Review
Bug 12342: Patron registration datepicker dropdown shows only 10 years (1.82 KB, patch)
2015-12-03 16:40 UTC, Martin Persson
Details | Diff | Splinter Review
Bug 12342: Patron registration datepicker dropdown shows only 10 years (1.63 KB, patch)
2015-12-03 17:05 UTC, Martin Persson
Details | Diff | Splinter Review
Bug 12342: Patron registration datepicker dropdown shows only 10 years (1.51 KB, patch)
2015-12-03 17:07 UTC, Martin Persson
Details | Diff | Splinter Review
[SIGNED-OFF]Bug 12342: Patron registration datepicker dropdown shows only 10 years (1.61 KB, patch)
2015-12-03 21:06 UTC, Héctor Eduardo Castro Avalos
Details | Diff | Splinter Review
[PASSED QA] Bug 12342: Patron registration datepicker dropdown shows only 10 years (1.66 KB, patch)
2015-12-06 20:24 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description paxed 2014-06-02 10:36:39 UTC
Registering a new patron, click on the date of birth -date picker, the year dropdown only shows 10 years (eg. 2004 - 2014).  It should show 20 years, to catch most patrons to be registered.
Comment 1 IT-and-COMM 2015-04-02 07:57:38 UTC
Well it should show _at least_ 20 entries.
And it should start five years in the past, since patrons creation requests for the age from 0 years to 5 years are not dropping in that frequently.
Do they?
Comment 2 Martin Persson 2015-05-12 15:09:25 UTC Comment hidden (obsolete)
Comment 3 Eivin Giske Skaaren 2015-05-12 17:04:34 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2015-05-26 13:33:53 UTC
Hello Martin
Very useful patch, thanks!

Could you have a look at the following template:
opac-memberentry.tt:                $( "#borrower_dateofbirth" ).datepicker({ yearRange: "c-120:c" });

To be consistent, it would be good to have the same value everywhere.
Feel free to replace 120 with 100 or vice versa.
Comment 5 Jonathan Druart 2015-05-26 13:36:06 UTC
Switch the status back to Signed Off when done.
Comment 6 Martin Persson 2015-12-03 16:40:47 UTC Comment hidden (obsolete)
Comment 7 Martin Persson 2015-12-03 17:05:45 UTC Comment hidden (obsolete)
Comment 8 Martin Persson 2015-12-03 17:07:53 UTC Comment hidden (obsolete)
Comment 9 Héctor Eduardo Castro Avalos 2015-12-03 21:06:28 UTC Comment hidden (obsolete)
Comment 10 Martin Persson 2015-12-04 13:07:19 UTC
I realized I should have changed the format string to "c-120:c", but since it is signed off.. well, hardly worth it. Doing it would allow us to drop the "maxDate" attribute.
Comment 11 Héctor Eduardo Castro Avalos 2015-12-04 15:20:33 UTC
(In reply to Martin Persson from comment #10)
> I realized I should have changed the format string to "c-120:c", but since
> it is signed off.. well, hardly worth it. Doing it would allow us to drop
> the "maxDate" attribute.

Hi Martin

If you want to do another change in patch, do it, I will sign-off again.

Regards
Comment 12 Katrin Fischer 2015-12-06 20:23:12 UTC
This seems to work fine as it is - passing QA. Please let me know if you want to do a follow-up.
Comment 13 Katrin Fischer 2015-12-06 20:24:38 UTC
Created attachment 45433 [details] [review]
[PASSED QA] Bug 12342: Patron registration datepicker dropdown shows only 10 years

This patch changes the options to the date picker, allowing easy
selection of dates up to 120 years from the current date.

To test:
- Click on 'Patrons' from the main menu, select 'New patron'
- Set input focus to the 'Date of birth' input field,
  the date selection widget should show up.
- The year selection drop-down will only show current year minus 10.
- Apply the patch
- Go back to the same screen, set input focus to the 'Date of birth' field.
- The year selection drop-down should show current year minus 120.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 14 Kyle M Hall 2015-12-31 15:09:29 UTC
Pushed to master, thanks Martin!
Comment 15 Katrin Fischer 2016-06-10 08:47:18 UTC
This is quite annoying for circulation staff - marking as 'minor' in hope for it to get picked up by rmaints.
Comment 16 Chris Cormack 2017-01-10 19:57:12 UTC
*** Bug 15515 has been marked as a duplicate of this bug. ***
Comment 17 Colin Campbell 2017-05-16 10:35:48 UTC
(In reply to Kyle M Hall from comment #14)
> Pushed to master, thanks Martin!

Cant see it in current master has the patch been dropped?
Comment 18 Jonathan Druart 2017-05-16 13:45:42 UTC
(In reply to Colin Campbell from comment #17)
> (In reply to Kyle M Hall from comment #14)
> > Pushed to master, thanks Martin!
> 
> Cant see it in current master has the patch been dropped?

7d3772503c Bug 12342: Patron registration datepicker dropdown shows only 10 years
Comment 19 Colin Campbell 2017-05-19 09:58:36 UTC
Although the patch was applied patch code no longer there the bug has been reinstated and is being reported - marking as reopened
Comment 20 Jon Knight 2017-11-08 19:58:19 UTC
Been doing some detective work on this one.  It seems Bug 15692 moved the datepicker jquery javascript into /koha-tmpl/intranet-tmpl/prog/en/js/members.js, with the patch from this bug still intact.

Then Bug 16242 moved the staff client javascript out of the language directory, so /koha-tmpl/intranet-tmpl/prog/en/js/members.js became /koha-tmpl/intranet-tmpl/prog/js/members.js

Looking at the log history of this moved file, it appears that the code was then changed in bug 18477, which references this bug.  That's been pushed to master more recently than this bug has last been updated, so can we assume that this bug can now be closed again?