Bug 21192 - Borrower Fields on OPAC's Personal Details Screen Use Self Register Field Options Incorrectly
Summary: Borrower Fields on OPAC's Personal Details Screen Use Self Register Field Opt...
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Julian Maurice
URL:
Keywords:
Depends on: 14658
Blocks:
  Show dependency treegraph
 
Reported: 2018-08-09 14:42 UTC by Chris Slone
Modified: 2019-02-25 07:06 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 21192: Do not pick SelfRegistration hidden fields for SelfModification (2.97 KB, patch)
2018-08-13 15:59 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 21192: Do not pick SelfRegistration hidden fields for SelfModification (3.37 KB, patch)
2018-09-16 18:48 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 21192: Do not pick SelfRegistration hidden fields for SelfModification (3.42 KB, patch)
2018-12-10 14:13 UTC, Devinim
Details | Diff | Splinter Review
Bug 21192: Do not pick SelfRegistration hidden fields for SelfModification (3.54 KB, patch)
2019-01-18 14:52 UTC, Julian Maurice
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Slone 2018-08-09 14:42:40 UTC
If a patron is logged into the OPAC and they attempt to submit changes to their personal details without having actually changed anything, the page reloads with a message stating 'No changes were made.' However, the fields that now appear are those that have been allowed/hidden according to the preferences set for patron self registration, even if patron self registration is disabled. This can lead to problems if there are discrepancies between the fields allowed for self register settings and those allowed for patron self modification settings.

To replicate:

1.) In Administration › System preferences > OPAC, set PatronSelfRegistration to 'don't allow'

2.) Modify the unwanted fields for PatronSelfModificationBorrowerUnwantedField and PatronSelfRegistrationBorrowerUnwantedField so that at least one field is different between the two settings and save (for example, specify 'mobile' to be hidden in the former, but don't include in the list of fields to be hidden in the latter).

3.) Log into the OPAC and navigate to the 'your personal details' tab. Notice that the editable fields correspond to those not hidden by PatronSelfModificationBorrowerUnwantedField

4.) Without making any changes, click on 'Submit update request'.

5.) Note that on this page the fields correspond to those not hidden by PatronSelfRegistrationBorrowerUnwantedField and are now editable (including any fields that would otherwise be hidden by the Self Modification settings).
Comment 1 Jonathan Druart 2018-08-13 15:59:48 UTC
Created attachment 77760 [details] [review]
Bug 21192: Do not pick SelfRegistration hidden fields for SelfModification

There was a mix up between "modification" and "edit" for $action in
opac-memberentry.pl.

If a patron is logged into the OPAC and they attempt to submit changes to their
personal details without having actually changed anything, the page reloads with
a message stating 'No changes were made.' However, the fields that now appear
are those that have been allowed/hidden according to the preferences set for
patron self registration, even if patron self registration is disabled. This can
lead to problems if there are discrepancies between the fields allowed for self
register settings and those allowed for patron self modification settings.

To replicate:

1.) In Administration › System preferences > OPAC, set PatronSelfRegistration to
'don't allow'

2.) Modify the unwanted fields for PatronSelfModificationBorrowerUnwantedField
and PatronSelfRegistrationBorrowerUnwantedField so that at least one field is
different between the two settings and save (for example, specify 'mobile' to be
hidden in the former, but don't include in the list of fields to be hidden in
the latter).

3.) Log into the OPAC and navigate to the 'your personal details' tab. Notice
that the editable fields correspond to those not hidden by
PatronSelfModificationBorrowerUnwantedField

4.) Without making any changes, click on 'Submit update request'.

5.) Note that on this page the fields correspond to those not hidden by
PatronSelfRegistrationBorrowerUnwantedField and are now editable (including any
fields that would otherwise be hidden by the Self Modification settings).
Comment 2 Caroline Cyr La Rose 2018-09-16 18:02:31 UTC
The behaviour is not changed with the patch. When I click submit changes, new fields appear anyway, even after I apply the patch... Do I have to restart something?
Comment 3 Jonathan Druart 2018-09-16 18:48:28 UTC
Created attachment 78980 [details] [review]
Bug 21192: Do not pick SelfRegistration hidden fields for SelfModification

There was a mix up between "modification" and "edit" for $action in
opac-memberentry.pl.

If a patron is logged into the OPAC and they attempt to submit changes to their
personal details without having actually changed anything, the page reloads with
a message stating 'No changes were made.' However, the fields that now appear
are those that have been allowed/hidden according to the preferences set for
patron self registration, even if patron self registration is disabled. This can
lead to problems if there are discrepancies between the fields allowed for self
register settings and those allowed for patron self modification settings.

To replicate:

1.) In Administration › System preferences > OPAC, set PatronSelfRegistration to
'don't allow'

2.) Modify the unwanted fields for PatronSelfModificationBorrowerUnwantedField
and PatronSelfRegistrationBorrowerUnwantedField so that at least one field is
different between the two settings and save (for example, specify 'mobile' to be
hidden in the former, but don't include in the list of fields to be hidden in
the latter).

3.) Log into the OPAC and navigate to the 'your personal details' tab. Notice
that the editable fields correspond to those not hidden by
PatronSelfModificationBorrowerUnwantedField

4.) Without making any changes, click on 'Submit update request'.

5.) Note that on this page the fields correspond to those not hidden by
PatronSelfRegistrationBorrowerUnwantedField and are now editable (including any
fields that would otherwise be hidden by the Self Modification settings).
Comment 4 Jonathan Druart 2018-09-16 18:49:08 UTC
PatronSelfModificationBorrowerUnwantedField
title|othernames|initials|country|fax|emailpro|phonepro|B_streetnumber|B_streettype|B_address|B_address2|B_city|B_state|B_zipcode|B_country|B_email|B_phone|altcontactfirstname|altcontactsurname|altcontactaddress1|altcontactaddress2|altcontactaddress3|altcontactstate|altcontactzipcode|altcontactcountry|altcontactphone

PatronSelfRegistrationBorrowerUnwantedField
title|othernames|initials|country|fax|emailpro|phonepro|B_streetnumber|B_streettype|B_address|B_address2|B_city|B_state|B_zipcode|B_country|B_email|B_phone|altcontactfirstname|altcontactsurname|altcontactphone
Comment 5 Devinim 2018-12-10 14:13:06 UTC
Created attachment 83017 [details] [review]
Bug 21192: Do not pick SelfRegistration hidden fields for SelfModification

There was a mix up between "modification" and "edit" for $action in
opac-memberentry.pl.

If a patron is logged into the OPAC and they attempt to submit changes to their
personal details without having actually changed anything, the page reloads with
a message stating 'No changes were made.' However, the fields that now appear
are those that have been allowed/hidden according to the preferences set for
patron self registration, even if patron self registration is disabled. This can
lead to problems if there are discrepancies between the fields allowed for self
register settings and those allowed for patron self modification settings.

To replicate:

1.) In Administration › System preferences > OPAC, set PatronSelfRegistration to
'don't allow'

2.) Modify the unwanted fields for PatronSelfModificationBorrowerUnwantedField
and PatronSelfRegistrationBorrowerUnwantedField so that at least one field is
different between the two settings and save (for example, specify 'mobile' to be
hidden in the former, but don't include in the list of fields to be hidden in
the latter).

3.) Log into the OPAC and navigate to the 'your personal details' tab. Notice
that the editable fields correspond to those not hidden by
PatronSelfModificationBorrowerUnwantedField

4.) Without making any changes, click on 'Submit update request'.

5.) Note that on this page the fields correspond to those not hidden by
PatronSelfRegistrationBorrowerUnwantedField and are now editable (including any
fields that would otherwise be hidden by the Self Modification settings).

Signed-off-by: Devinim <kohadevinim@devinim.com.tr>
Comment 6 Devinim 2018-12-10 14:20:05 UTC
(In reply to Caroline Cyr La Rose from comment #2)
> The behaviour is not changed with the patch. When I click submit changes,
> new fields appear anyway, even after I apply the patch... Do I have to
> restart something?

You can try to restart Plack.

sudo koha-plack --restart kohadev
Comment 7 Julian Maurice 2019-01-18 14:52:45 UTC
Created attachment 84196 [details] [review]
Bug 21192: Do not pick SelfRegistration hidden fields for SelfModification

There was a mix up between "modification" and "edit" for $action in
opac-memberentry.pl.

If a patron is logged into the OPAC and they attempt to submit changes to their
personal details without having actually changed anything, the page reloads with
a message stating 'No changes were made.' However, the fields that now appear
are those that have been allowed/hidden according to the preferences set for
patron self registration, even if patron self registration is disabled. This can
lead to problems if there are discrepancies between the fields allowed for self
register settings and those allowed for patron self modification settings.

To replicate:

1.) In Administration › System preferences > OPAC, set PatronSelfRegistration to
'don't allow'

2.) Modify the unwanted fields for PatronSelfModificationBorrowerUnwantedField
and PatronSelfRegistrationBorrowerUnwantedField so that at least one field is
different between the two settings and save (for example, specify 'mobile' to be
hidden in the former, but don't include in the list of fields to be hidden in
the latter).

3.) Log into the OPAC and navigate to the 'your personal details' tab. Notice
that the editable fields correspond to those not hidden by
PatronSelfModificationBorrowerUnwantedField

4.) Without making any changes, click on 'Submit update request'.

5.) Note that on this page the fields correspond to those not hidden by
PatronSelfRegistrationBorrowerUnwantedField and are now editable (including any
fields that would otherwise be hidden by the Self Modification settings).

Reported-By: Chris Slone <cslone@camdencountylibrary.org>
Signed-off-by: Devinim <kohadevinim@devinim.com.tr>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 8 Nick Clemens 2019-01-18 20:57:52 UTC
Awesome work all!

Pushed to master for 19.05
Comment 9 Martin Renvoize 2019-01-31 16:13:10 UTC
Pushed to 18.11.x for 18.11.03
Comment 10 Lucas Gass 2019-02-01 17:12:54 UTC
pushed to 18.05.x for 18.05.09
Comment 11 Fridolin SOMERS 2019-02-04 09:33:51 UTC
Pushed to 17.11.x for 17.11.15