Bug 16795

Summary: Patron categories: Accept integers only for enrolment period and age limits
Product: Koha Reporter: Marc Véron <veron>
Component: PatronsAssignee: Marc Véron <veron>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low CC: f.demians, gmcharlt, julian.maurice, kyle.m.hall, kyle
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 16286    
Bug Blocks:    
Attachments: Bug 16795 - Patron categories: Accept integers only for enrolment period and age limits
[SIGNED-OFF] Bug 16795 - Patron categories: Accept integers only for enrolment period and age limits
Bug 16795 - Patron categories: Accept integers only for enrolment period and age limits

Description Marc Véron 2016-06-22 05:50:02 UTC
When creating / editing patron categories, it is possible to enter decimal values for enrolment period and age limits, but vaules are stored as integers (rounded up or down). 

For example it is possible to enter 0.1 for enrolment period, the value stored will be 0, and the table on page "Patron categories" will show a bare 'until' in column 'Enrolment period'.

The fields 'Enrolmentperiod', 'Age required' and  'Upperage limit' should accept integers only.
Comment 1 Marc Véron 2016-06-22 07:13:44 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2016-06-22 12:28:38 UTC Comment hidden (obsolete)
Comment 3 Kyle M Hall 2016-06-24 16:00:51 UTC
Created attachment 52826 [details] [review]
Bug 16795 - Patron categories: Accept integers only for enrolment period and age limits

To test:
- Apply patch
- Clear browser cache
- Go to Home > Administration > Patron categories
- Create or edit a category
- Verify that field 'In months', 'Age required' and 'Upperage limit'
  accept digits only

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 4 Kyle M Hall 2016-07-08 13:16:02 UTC
Pushed to master for 16.11, thanks Marc!
Comment 5 Frédéric Demians 2016-08-01 13:29:50 UTC
Pushed in 16.05. Will be in 16.05.02.