Bug 23431 - having Date of birth in PatronSelfModificationBorrowerUnwantedField causes DOB to be nullified
Summary: having Date of birth in PatronSelfModificationBorrowerUnwantedField causes DO...
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: 18.11
Hardware: All All
: P5 - low major (vote)
Assignee: Liz Rea
QA Contact: Martin Renvoize
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-05 14:49 UTC by Liz Rea
Modified: 2019-08-28 14:36 UTC (History)
5 users (show)

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


Attachments
Bug 23431 - Don't nullify DOB if it's hidden by sysprefs (1.65 KB, patch)
2019-08-05 22:42 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 23431: Don't nullify DOB if it's hidden by sysprefs (1.64 KB, patch)
2019-08-06 14:00 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 23431: Don't nullify DOB if it's hidden by sysprefs (1.69 KB, patch)
2019-08-06 16:31 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 23431: Don't nullify DOB if it's hidden by sysprefs (1.75 KB, patch)
2019-08-08 11:50 UTC, Martin Renvoize
Details | Diff | Splinter Review

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