Bug 7878

Summary: When duplicating a patron too many fields carrying over
Product: Koha Reporter: Nicole C. Engard <nengard>
Component: PatronsAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P5 - low CC: cbrannon, gmcharlt, jonathan.druart, tomascohen
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 7878 - When duplicating a patron too many fields carrying over
[SIGNED OFF] Bug 7878 - When duplicating a patron too many fields carrying over
Bug 7878 - When duplicating a patron too many fields carrying over
Bug 7878: (qa follow-up) Fix the sex default value

Description Nicole C. Engard 2012-04-02 20:56:01 UTC
When duplicating the patron in the top section only the Surname should carry over - right now the other name and initials carry over.

Along the same lines at the bottom the expiration date is coming over and that could be different based on when you're doing the duplication and your patron category rules.
Comment 1 Christopher Brannon 2012-04-10 14:41:44 UTC
I see that gender, OPAC & Staff notes, and restrictions also carry over.

I have confirmed all the Nicole has mentioned, and agree that copying the expiration is a problem.

Christopher Brannon
Comment 2 Owen Leonard 2014-09-26 18:58:37 UTC Comment hidden (obsolete)
Comment 3 Nick Clemens (kidclamp) 2014-10-05 21:54:07 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2014-10-06 21:17:22 UTC
Is there a reason not to use UNLESS instead of "IF do nothing ELSE do something"?
Comment 5 Owen Leonard 2014-10-07 12:08:14 UTC
(In reply to Jonathan Druart from comment #4)
> Is there a reason not to use UNLESS instead of "IF do nothing ELSE do
> something"?

Probably not, just following the pattern already established in the template.
Comment 6 Jonathan Druart 2014-10-11 14:28:17 UTC
Created attachment 32234 [details] [review]
Bug 7878 - When duplicating a patron too many fields carrying over

When duplicating a patron the resulting entry form contains the data
from the original patron in the following fields: Other names, Initials,
Gender, OPAC note, Staff note, and expiration date. These should be
blank for a new duplicated patron. This patch corrects this.

To test, locate or create a patron record which contains data in the
fields listed above. Duplicate that patron and confirm that those fields
are blank in the resulting patron entry form.

Confirm also that editing an existing patron with data in those fields
works correctly.

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 7 Jonathan Druart 2014-10-11 14:28:30 UTC
Created attachment 32235 [details] [review]
Bug 7878: (qa follow-up) Fix the sex default value

Without the previous patch, when you edited a patron, the "N/A" value
was selected for sex.
With, no checkboxes were selected.

This patch also replaces the
    IF opduplicate do nothing ELSE do something END
statement with
    UNLESS opduplicate do something END
which is more readable.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 8 Tomás Cohen Arazi (tcohen) 2014-11-20 12:51:38 UTC
Patches pushed to master.

Thanks Owen!