Bug 17521

Summary: Step 3 of patron modification editor not checking age limits
Product: Koha Reporter: Radek Šiman (R-Bit Technology, s.r.o.) <rbit>
Component: PatronsAssignee: Radek Šiman (R-Bit Technology, s.r.o.) <rbit>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: black23, gmcharlt, jonathan.druart, josef.moravec, kyle.m.hall, kyle, mtj
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17492
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 17548    
Bug Blocks: 17557    
Attachments: Bug 17521: Added missing age limit check
[SIGNED-OFF] Bug 17521: Added missing age limit check
Bug 17521: Added missing age limit check
Bug 17521: Added missing age limit check

Description Radek Šiman (R-Bit Technology, s.r.o.) 2016-10-31 13:42:04 UTC
The 3rd step of patron modification which can be displayed directly using the following link for instance
/cgi-bin/koha/members/memberentry.pl?op=modify&borrowernumber=3&step=3
is not checking patron's age, so it allows to set off-limit category.
Comment 1 Radek Šiman (R-Bit Technology, s.r.o.) 2016-10-31 13:46:23 UTC
This issue is filed after confirmation with Jonathan Druart and it has a connection to bug 17492.
Comment 2 Radek Šiman (R-Bit Technology, s.r.o.) 2016-10-31 22:54:22 UTC
Created attachment 57011 [details] [review]
Bug 17521: Added missing age limit check

Following patron modification partial editor had no age constraint
checking:
/cgi-bin/koha/members/memberentry.pl?op=modify&borrowernumber=3&step=3

Test plan:
1) Apply the patch
2) Open profile of a patron
3) Click Edit under "Library use": http://prntscr.com/d1ghim
4) Change category to an invalid one (eg. Adult instead of Kid)
5) Error saying "Patron's age is incorrect for their category." should
be displayed.
Comment 3 Josef Moravec 2016-11-03 09:33:07 UTC
Created attachment 57121 [details] [review]
[SIGNED-OFF] Bug 17521: Added missing age limit check

Following patron modification partial editor had no age constraint
checking:
/cgi-bin/koha/members/memberentry.pl?op=modify&borrowernumber=3&step=3

Test plan:
1) Apply the patch
2) Open profile of a patron
3) Click Edit under "Library use": http://prntscr.com/d1ghim
4) Change category to an invalid one (eg. Adult instead of Kid)
5) Error saying "Patron's age is incorrect for their category." should
be displayed.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 4 Lucio Moraes 2016-11-03 10:08:34 UTC
Created attachment 57122 [details] [review]
Bug 17521: Added missing age limit check

Following patron modification partial editor had no age constraint
checking:
/cgi-bin/koha/members/memberentry.pl?op=modify&borrowernumber=3&step=3

Test plan:
1) Apply the patch
2) Open profile of a patron
3) Click Edit under "Library use": http://prntscr.com/d1ghim
4) Change category to an invalid one (eg. Adult instead of Kid)
5) Error saying "Patron's age is incorrect for their category." should
be displayed.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Lucio Moraes <lmoraes@catalyst.net.nz>
Comment 5 Jonathan Druart 2016-11-04 09:24:20 UTC
Created attachment 57166 [details] [review]
Bug 17521: Added missing age limit check

Following patron modification partial editor had no age constraint
checking:
/cgi-bin/koha/members/memberentry.pl?op=modify&borrowernumber=3&step=3

Test plan:
1) Apply the patch
2) Open profile of a patron
3) Click Edit under "Library use": http://prntscr.com/d1ghim
4) Change category to an invalid one (eg. Adult instead of Kid)
5) Error saying "Patron's age is incorrect for their category." should
be displayed.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Lucio Moraes <lmoraes@catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 6 Jonathan Druart 2016-11-04 09:25:10 UTC
I have found another bug which is critical in the same area (bug 17548), I have rebased this one on top of it.
Comment 7 Kyle M Hall 2016-11-07 16:42:36 UTC
Pushed to master for 16.11, thanks Radek!
Comment 8 Mason James 2016-11-30 09:22:03 UTC
(In reply to Kyle M Hall from comment #7)
> Pushed to master for 16.11, thanks Radek!

blocked by skipped patchset (17548), passing for 16.05