Bug 11853 - Cannot clear date of birth via OPAC patron update
Summary: Cannot clear date of birth via OPAC patron update
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 23151
  Show dependency treegraph
 
Reported: 2014-02-26 17:44 UTC by Galen Charlton
Modified: 2019-10-14 20:02 UTC (History)
5 users (show)

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


Attachments
Bug 11853: Add tests (2.46 KB, patch)
2019-05-08 21:43 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 11853: Allow to clear the date of birth at the OPAC (2.42 KB, patch)
2019-05-08 21:43 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 11853: Allow to clear the date of birth at the OPAC (2.46 KB, patch)
2019-05-08 22:25 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 11853: Add tests (2.50 KB, patch)
2019-05-08 22:27 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 11853: Allow to clear the date of birth at the OPAC (2.52 KB, patch)
2019-05-11 09:20 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 11853: Add tests (2.56 KB, patch)
2019-05-11 09:20 UTC, Katrin Fischer
Details | Diff | Splinter Review
[18.05.x] Bug 11853: Add tests (2.53 KB, patch)
2019-06-04 23:45 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Galen Charlton 2014-02-26 17:44:50 UTC
If the date of birth is not mandatory, if a patron tries to submit a modification request that clears their birth date, it shows up in the patron update queue as an entry that changes no fields.  Attempt to approve the change does not affect the patron record, and does not remove the modification from the queue.

Expected behavior:

- that patrons be able to clear the date of birth if it's not mandatory
- that the patron modification system be able to recognize and correctly process such an update
Comment 1 Katrin Fischer 2019-02-10 22:18:56 UTC
Confirmed, the bug is still there.

Date of birth is a quite delicate information to store considering data privacy. I am upping severity a bit.
Comment 2 Katrin Fischer 2019-04-06 11:32:42 UTC
It looks like the change on dateofbirth is recorded as 'NULL' in the table borrower_modifications, which is interpreted as 'no change'. Other strings that are emptied out are recorded as '' (empty string) and trigger the change. I am not quite sure how to resolve this. 

Upping severity (OPAC, GDPR, patron privacy...)
Comment 3 Jonathan Druart 2019-05-08 21:43:23 UTC
Created attachment 89480 [details] [review]
Bug 11853: Add tests
Comment 4 Jonathan Druart 2019-05-08 21:43:27 UTC
Created attachment 89481 [details] [review]
Bug 11853: Allow to clear the date of birth at the OPAC

A patron is not able to clear their date of birth.

When cleared tt is set to NULL in DB which means, for the patron's
modifications feature, that nothing has been changed.

Test plan:
0/ Do not apply the patch
1/ Edit your personal details at the OPAC
2/ Add a date of birth
3/ On the staff interface, approve the modification request
=> OK it is updated
4/ Edit your personal details and clear the date of birth
5/ On the staff interface
=> KO the table display is wrong, nothing is marked has changed
6/ Approve the modification requiest
=> KO it has not been cleared
7/ Apply the patch and repeat 1 to 6 and confirm that the behaviors are
now correct.
Comment 5 Liz Rea 2019-05-08 22:25:30 UTC
Created attachment 89483 [details] [review]
Bug 11853: Allow to clear the date of birth at the OPAC

A patron is not able to clear their date of birth.

When cleared tt is set to NULL in DB which means, for the patron's
modifications feature, that nothing has been changed.

Test plan:
0/ Do not apply the patch
1/ Edit your personal details at the OPAC
2/ Add a date of birth
3/ On the staff interface, approve the modification request
=> OK it is updated
4/ Edit your personal details and clear the date of birth
5/ On the staff interface
=> KO the table display is wrong, nothing is marked has changed
6/ Approve the modification requiest
=> KO it has not been cleared
7/ Apply the patch and repeat 1 to 6 and confirm that the behaviors are
now correct.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Comment 6 Liz Rea 2019-05-08 22:27:04 UTC
Created attachment 89484 [details] [review]
Bug 11853: Add tests

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Comment 7 Katrin Fischer 2019-05-11 09:20:02 UTC
Created attachment 89580 [details] [review]
Bug 11853: Allow to clear the date of birth at the OPAC

A patron is not able to clear their date of birth.

When cleared tt is set to NULL in DB which means, for the patron's
modifications feature, that nothing has been changed.

Test plan:
0/ Do not apply the patch
1/ Edit your personal details at the OPAC
2/ Add a date of birth
3/ On the staff interface, approve the modification request
=> OK it is updated
4/ Edit your personal details and clear the date of birth
5/ On the staff interface
=> KO the table display is wrong, nothing is marked has changed
6/ Approve the modification requiest
=> KO it has not been cleared
7/ Apply the patch and repeat 1 to 6 and confirm that the behaviors are
now correct.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Katrin Fischer 2019-05-11 09:20:06 UTC
Created attachment 89581 [details] [review]
Bug 11853: Add tests

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 9 Katrin Fischer 2019-05-11 09:20:30 UTC
Thx a lot for the fix, this one was giving me a headache!
Comment 10 Nick Clemens 2019-05-14 18:21:55 UTC
Awesome work all!

Pushed to master for 19.05
Comment 11 Martin Renvoize 2019-05-24 13:45:52 UTC
Pushed to 18.11.x for 18.11.06
Comment 12 Lucas Gass 2019-05-30 15:55:44 UTC
having problems rebasing for 18.05.x, if its need please provide a rebase
Comment 13 Jonathan Druart 2019-06-04 23:45:39 UTC
Created attachment 90321 [details] [review]
[18.05.x] Bug 11853: Add tests

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>