Bug 19443 - Error while attempting to duplicate a patron
Summary: Error while attempting to duplicate a patron
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Alex Arnaud
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-10 15:57 UTC by Alex Arnaud
Modified: 2017-10-12 12:14 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 19443 - wrong HTML in patron creation page (members/memberentry.pl) (3.96 KB, patch)
2017-10-11 07:45 UTC, Alex Arnaud
Details | Diff | Splinter Review
More problems with patron entry form (13.15 KB, image/png)
2017-10-11 08:30 UTC, Marc Véron
Details
Bug 19443 - remove duplicate message when editing existing patron (986 bytes, patch)
2017-10-12 07:25 UTC, Alex Arnaud
Details | Diff | Splinter Review
Bug 19443 - wrong HTML in patron creation page (members/memberentry.pl) (4.01 KB, patch)
2017-10-12 12:02 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 19443 - remove duplicate message when editing existing patron (1.01 KB, patch)
2017-10-12 12:02 UTC, Owen Leonard
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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>