Bug 23431

Summary: having Date of birth in PatronSelfModificationBorrowerUnwantedField causes DOB to be nullified
Product: Koha Reporter: Liz Rea <wizzyrea>
Component: OPACAssignee: Liz Rea <wizzyrea>
Status: CLOSED FIXED QA Contact: Martin Renvoize <martin.renvoize>
Severity: major    
Priority: P5 - low CC: cbrannon, fridolin.somers, lucas, martin.renvoize, wizzyrea
Version: 18.11   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23151
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.11.00,19.05.03,18.11.09
Attachments: Bug 23431 - Don't nullify DOB if it's hidden by sysprefs
Bug 23431: Don't nullify DOB if it's hidden by sysprefs
Bug 23431: Don't nullify DOB if it's hidden by sysprefs
Bug 23431: Don't nullify DOB if it's hidden by sysprefs

Description Liz Rea 2019-08-05 14:49:23 UTC
Similar to bug 23151, if DOB is a field removed by PatronSelfModificationBorrowerUnwantedField, the date of birth gets nullified when the changes are submitted.

To replicate:

Turn on  OPACPatronDetails 
put dateofbirth in PatronSelfModificationBorrowerUnwantedField
Have a patron with a set date of birth
Attempt any modification on that patron through the OPAC
The date of birth will be one of the fields changed for that borrower when you check it in the OPAC.

A work around is to remove dateofbirth from PatronSelfModificationBorrowerUnwantedField
and hide the field from that form, if that is desired, with jquery; something like 

$("#opac-patron-update #memberentry_identity > ol:nth-child(2) > li:nth-child(3)").hide();

Note that it is .hide() and not .remove(). .remove() will cause the same behaviour as DOB being in PatronSelfModificationBorrowerUnwantedField.
Comment 1 Christopher Brannon 2019-08-05 15:53:42 UTC
+1 Confirmed
Comment 2 Liz Rea 2019-08-05 22:42:26 UTC Comment hidden (obsolete)
Comment 3 Liz Rea 2019-08-06 14:00:50 UTC
Created attachment 92027 [details] [review]
Bug 23431: Don't nullify DOB if it's hidden by sysprefs

To test:

Turn on  OPACPatronDetails
put dateofbirth in PatronSelfModificationBorrowerUnwantedField
Have a patron with a set date of birth
Attempt any modification on that patron through the OPAC
The date of birth will be one of the fields changed for that borrower
when you check it in the staff intranet.

Apply this patch, repeat the above.
Date of birth will not be one of the changed fields.
Comment 4 Owen Leonard 2019-08-06 16:31:16 UTC
Created attachment 92033 [details] [review]
Bug 23431: Don't nullify DOB if it's hidden by sysprefs

To test:

Turn on  OPACPatronDetails
put dateofbirth in PatronSelfModificationBorrowerUnwantedField
Have a patron with a set date of birth
Attempt any modification on that patron through the OPAC
The date of birth will be one of the fields changed for that borrower
when you check it in the staff intranet.

Apply this patch, repeat the above.
Date of birth will not be one of the changed fields.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 5 Martin Renvoize 2019-08-08 11:50:04 UTC
Created attachment 92068 [details] [review]
Bug 23431: Don't nullify DOB if it's hidden by sysprefs

To test:

Turn on  OPACPatronDetails
put dateofbirth in PatronSelfModificationBorrowerUnwantedField
Have a patron with a set date of birth
Attempt any modification on that patron through the OPAC
The date of birth will be one of the fields changed for that borrower
when you check it in the staff intranet.

Apply this patch, repeat the above.
Date of birth will not be one of the changed fields.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize 2019-08-08 11:51:04 UTC
Trivial patch that works as expected.. It would have been nice to have an accompanying selenium regression test, but I don't feel it warrants a QA failure for it (especially as it's a major).

Passing QA
Comment 7 Martin Renvoize 2019-08-08 12:07:12 UTC
Nice work!

Pushed to master for 19.11.00
Comment 8 Fridolin Somers 2019-08-09 12:08:57 UTC
Pushed to 19.05.x for 19.05.03
Comment 9 Lucas Gass 2019-08-28 14:36:30 UTC
backported to 18.11.x for 18.11.09