Bug 17213

Summary: Self registration cardnumber is not editable if errors found when form submitted
Product: Koha Reporter: Nick Clemens <nick>
Component: PatronsAssignee: Nick Clemens <nick>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: f.demians, gmcharlt, jonathan.druart, katrin.fischer, kyle.m.hall, kyle
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 14659    
Bug Blocks:    
Attachments: Bug 17213 - Self registration cardnumber is not editable if errors found when form submitted
Bug 17213 - Add HTML5 validation to cardnumber field on patron self registration
Bug 17213 - Add HTML5 validation to cardnumber field on patron self registration
[SIGNED-OFF] Bug 17213 - Self registration cardnumber is not editable if errors found when form submitted
[SIGNED-OFF] Bug 17213 - Add HTML5 validation to cardnumber field on patron self registration
Bug 17213 - Self registration cardnumber is not editable if errors found when form submitted
Bug 17213 - Add HTML5 validation to cardnumber field on patron self registration
[PASSED QA] Bug 17213 - Add HTML5 validation to cardnumber field on patron self registration
[PASSED QA] Bug 17213 - Self registration cardnumber is not editable if errors found when form submitted
[PASSED QA] Bug 17213 - Add HTML5 validation to cardnumber field on patron self registration

Description Nick Clemens 2016-08-29 10:32:22 UTC
To recreate:
Make sure cardnumber is not in 'PatronSelfRegistrationBorrowerUnwantedField' 
Register a new patron using an existing cardnumber
You get a 'card number is in use' error, but you can't edit the field
Comment 1 Nick Clemens 2016-08-29 10:56:36 UTC Comment hidden (obsolete)
Comment 2 Nick Clemens 2016-08-29 10:56:42 UTC Comment hidden (obsolete)
Comment 3 Kyle M Hall 2016-09-01 18:01:26 UTC
With the patch applied, instead of getting the 'cardnumber in use' error, the account is created with a NULL cardnumber!
Comment 4 Nick Clemens 2016-09-01 18:31:03 UTC Comment hidden (obsolete)
Comment 5 Nick Clemens 2016-09-01 18:31:48 UTC
(In reply to Kyle M Hall from comment #3)
> With the patch applied, instead of getting the 'cardnumber in use' error,
> the account is created with a NULL cardnumber!

Fixed bad copy paste error (wrong variable names)
Comment 6 Owen Leonard 2016-09-09 16:38:51 UTC Comment hidden (obsolete)
Comment 7 Owen Leonard 2016-09-09 16:38:57 UTC Comment hidden (obsolete)
Comment 8 Jonathan Druart 2016-09-13 08:16:43 UTC
fatal: sha1 information is lacking or useless (koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt).
Comment 9 Nick Clemens 2016-09-13 13:37:22 UTC
Created attachment 55530 [details] [review]
Bug 17213 - Self registration cardnumber is not editable if errors found when form submitted

To test:
Enable self registration
Make sure cardnumber is not in
'PatronSelfRegistrationBorrowerUnwantedField'
Enter an invalid or used cardnumber
Submit form
Note errors appears correctly but cardnumber is not editable
Apply Patch
Enter an invalid or used cardnumber
Submit form
Note errors appears correctly and cardnumber is editable

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 10 Nick Clemens 2016-09-13 13:37:31 UTC
Created attachment 55531 [details] [review]
Bug 17213 - Add HTML5 validation to cardnumber field on patron self registration

To test:
Verify that different values in 'CardnumberLength' system preference
display correctly in the self reigstration form

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 11 Katrin Fischer 2016-09-18 16:47:04 UTC
The cardnumber is not unwanted... but still doesn't show up in my tests. What am I missing?
Comment 12 Nick Clemens 2016-09-18 17:19:39 UTC
(In reply to Katrin Fischer from comment #11)
> The cardnumber is not unwanted... but still doesn't show up in my tests.
> What am I missing?

Do you have AutoMemberNum enabled? That must be turned off to see card number
Comment 13 Katrin Fischer 2016-09-18 21:02:24 UTC
Created attachment 55665 [details] [review]
[PASSED QA] Bug 17213 - Add HTML5 validation to cardnumber field on patron self registration

To test:
Verify that different values in 'CardnumberLength' system preference
display correctly in the self reigstration form

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

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>
Comment 14 Katrin Fischer 2016-09-18 21:02:57 UTC
Created attachment 55666 [details] [review]
[PASSED QA] Bug 17213 - Self registration cardnumber is not editable if errors found when form submitted

To test:
Enable self registration
Make sure cardnumber is not in
'PatronSelfRegistrationBorrowerUnwantedField'
Enter an invalid or used cardnumber
Submit form
Note errors appears correctly but cardnumber is not editable
Apply Patch
Enter an invalid or used cardnumber
Submit form
Note errors appears correctly and cardnumber is editable

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

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>
Comment 15 Katrin Fischer 2016-09-18 21:04:08 UTC
Created attachment 55667 [details] [review]
[PASSED QA] Bug 17213 - Add HTML5 validation to cardnumber field on patron self registration

To test:
Verify that different values in 'CardnumberLength' system preference
display correctly in the self reigstration form

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

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>
Comment 16 Kyle M Hall 2016-09-27 11:07:39 UTC
Pushed to master for 16.11, thanks Nick!
Comment 17 Frédéric Demians 2016-09-30 08:30:31 UTC
It doesn't apply on 16.05 branch. If it's required, a version of this patch for 16.05 should be submitted.