Bug 8196

Summary: members/memberentry.pl?op=add shows all extended attribute values from database
Product: Koha Reporter: Dobrica Pavlinusic <dpavlin>
Component: PatronsAssignee: Jonathan Druart <jonathan.druart+koha>
Status: CLOSED FIXED QA Contact:
Severity: minor    
Priority: P5 - low CC: gmcharlt, jonathan.druart+koha, koha.sekjal, paul.poulain
Version: 3.10   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 8196: FIX for Bug 5742: All extended attributes are shown when editing a patron
Bug 8196: FIX for Bug 5742: All extended attributes are shown when editing a patron

Description Dobrica Pavlinusic 2012-06-06 10:30:40 UTC
Adding new patrons with extended attributes shows all values from database as opposed to empty input boxes for attributes available. Bug 5742 changed code in C4/Members/Attributes.pm so that WHERE doesn't work correctly when used without borrowernumber (and it's undef when adding new patron)
Comment 1 Jonathan Druart 2012-06-06 11:54:12 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2012-06-06 11:56:57 UTC
I don't know why I change the behaviour of this routine for Bug 5742.
It appears useless and introduced side effect.
I put back the code like it was before the batch edit patron patch.
Comment 3 Dobrica Pavlinusic 2012-06-06 13:32:57 UTC
Created attachment 9951 [details] [review]
Bug 8196: FIX for Bug 5742: All extended attributes are shown when editing a patron

Test scenario:

1. make sure that you have ExtendedPatronAttributes enabled
2. open /cgi-bin/koha/members/memberentry.pl?op=add;categorycode=S0
   (you might need to modify categorycode according to your local config)
3. verify that you get all extended patron attributes in form

Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
Comment 4 Dobrica Pavlinusic 2012-06-06 13:33:54 UTC
Thanks Jonathan, I intended to fix this myself but was distracted by lunch break :-) Anyhow, least I can do is sign off :-))
Comment 5 Ian Walls 2012-06-08 18:51:04 UTC
It's unclear why the code was changed for bug 5742, as I cannot seem to find a valid situation where we should still get the attributes even without the borrowernumber.  As this is a small and clear revision to restore things to the way they behaved before, marking as Passed QA.
Comment 6 Paul Poulain 2012-06-09 10:39:11 UTC
bugfix, but consequence of an ENH that will be in 3.10, so no need for this patch in 3.8 I think
Comment 7 Jared Camins-Esakov 2012-12-31 01:03:57 UTC
There have been no further reports of problems so I am marking this bug resolved.