Bug 19443

Summary: Error while attempting to duplicate a patron
Product: Koha Reporter: Alex Arnaud <alex.arnaud>
Component: PatronsAssignee: Alex Arnaud <alex.arnaud>
Status: CLOSED FIXED QA Contact: Kyle M Hall (khall) <kyle>
Severity: normal    
Priority: P5 - low CC: fridolin.somers, gmcharlt, kyle.m.hall, kyle, veron
Version: Main   
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:
Circulation function:
Attachments: Bug 19443 - wrong HTML in patron creation page (members/memberentry.pl)
More problems with patron entry form
Bug 19443 - remove duplicate message when editing existing patron
Bug 19443 - wrong HTML in patron creation page (members/memberentry.pl)
Bug 19443 - remove duplicate message when editing existing patron
Bug 19443 - wrong HTML in patron creation page (members/memberentry.pl)
Bug 19443 - remove duplicate message when editing existing patron

Description Alex Arnaud 2017-10-10 15:57:55 UTC
HTML in the patron creating/editing form is not correct.
If you create a patron and Koha detect a duplicate one, the new page
loaded contains a new form at the top with a button inside: 
"Not a duplicate. Save as new record"

This form is not closed (</form>) and in some situations this could
be problematic.

Try this test plan:

 - Edit the syspref IntranetUserJS and type the following code:
   "$(document).ready(function() { $("#memberentry_library_management").insertBefore("#memberentry_identity"); });"
   This code move the "Library management" part (cardnumber, Library, Category etc...) on the top of the page.
 - create a patron so that Koha will warn you about a duplicate one,
 - click on "Not a duplicate. Save as new record",
 - you should get error(s) about empty field(s).
   Note that now, the library management part's fields are empty or reset to default
Comment 1 Alex Arnaud 2017-10-11 07:45:40 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2017-10-11 08:30:12 UTC
Created attachment 67927 [details]
More problems with patron entry form

There are more problems with the form, additional attributes display outside, see screenshot attached.
Comment 3 Alex Arnaud 2017-10-11 09:14:10 UTC
(In reply to Marc Véron from comment #2)
> Created attachment 67927 [details]
> More problems with patron entry form
> 
> There are more problems with the form, additional attributes display
> outside, see screenshot attached.

Can not reproduce this issue. On which step? Is there custom js?
Comment 4 Marc Véron 2017-10-11 09:46:26 UTC
(In reply to Alex Arnaud from comment #3)
> (In reply to Marc Véron from comment #2)
> > Created attachment 67927 [details]
> > More problems with patron entry form
> > 
> > There are more problems with the form, additional attributes display
> > outside, see screenshot attached.
> 
> Can not reproduce this issue. On which step? Is there custom js?

- No custom JS
- Screenshot is from Home > Patrons > New patron

I mentioned it here because this bug is related to HTML in patron entry form that is not correct.
Comment 5 Owen Leonard 2017-10-11 13:57:42 UTC
I can't reproduce the problem Marc shows in the screenshot, but I have another problem: If I click the "Edit existing record" button the existing patron's record is displayed, but it still has the "Duplicate patron record?" warning at the top.
Comment 6 Alex Arnaud 2017-10-12 07:25:02 UTC Comment hidden (obsolete)
Comment 7 Owen Leonard 2017-10-12 12:02:50 UTC
Created attachment 67990 [details] [review]
Bug 19443 - wrong HTML in patron creation page (members/memberentry.pl)

The form provided on top of the page if Koha find a duplicate
patron is not closed. This cause some trouble.

Test plan:

 - Edit the syspref IntranetUserJS and type the following code:
   "$(document).ready(function() {
    $("#memberentry_library_management").insertBefore("#memberentry_identity");
    });"
 - create a patron so that Koha will warn you about a duplicate one,
 - click on "Not a duplicate. Save as new record",
 - you should get error(s) about empty field(s).
   Note that now, the library management part's fields are empty or
   reset to default

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 8 Owen Leonard 2017-10-12 12:02:54 UTC
Created attachment 67991 [details] [review]
Bug 19443 - remove duplicate message when editing existing patron

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 9 Kyle M Hall (khall) 2017-10-27 12:58:37 UTC
Created attachment 68691 [details] [review]
Bug 19443 - wrong HTML in patron creation page (members/memberentry.pl)

The form provided on top of the page if Koha find a duplicate
patron is not closed. This cause some trouble.

Test plan:

 - Edit the syspref IntranetUserJS and type the following code:
   "$(document).ready(function() {
    $("#memberentry_library_management").insertBefore("#memberentry_identity");
    });"
 - create a patron so that Koha will warn you about a duplicate one,
 - click on "Not a duplicate. Save as new record",
 - you should get error(s) about empty field(s).
   Note that now, the library management part's fields are empty or
   reset to default

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 10 Kyle M Hall (khall) 2017-10-27 12:58:43 UTC
Created attachment 68692 [details] [review]
Bug 19443 - remove duplicate message when editing existing patron

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 11 Jonathan Druart 2017-10-27 17:16:39 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 12 Fridolin Somers 2018-02-19 10:43:33 UTC
Pushed to 17.05.x for v17.05.09