[Koha-bugs] [Bug 23151] Patron self modification sends null dateofbirth

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jun 19 03:50:20 CEST 2019


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23151

--- Comment #2 from M. Tompsett <mtompset at hotmail.com> ---
Created attachment 90764
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90764&action=edit
Bug 23151: Properly clear/not clear date of birth.

The problem is caused by how change is stored: {changed value} || NULL.
NULL means no change, but in the case of clearing a date of birth
one wants to set it to NULL, which is indistinguishable from the
no change value.

By adding a DUMMY_DATE '9999-12-31', and using it as an intermediate
check, we can set the value to NULL. This required storing the
DUMMY_DATE as the change value, then in the case of date of birth
displaying blank when listing the changes, and saving undef when
the changes are stored.

TEST PLAN
---------
0) running this test plan without the patch results in bad data.
1) Ensure the Global System Preference OPACPatronDetails is set to Allow.
2) reset_all in the kohadevbox.
3) log into admin/admin.
4) open up localhost:8080 in one tab, and localhost:8081 in another.
5) In the opac tab, click on the user name, and then the 'your personal
details' tab.
5a) Set the first name, so it won't complain.
6) Set the salutation to Mr. and the birth date to any date.
7) scroll down and submit
8) In the staff tab, click home
9) click on the 'patrons requesting modifications' at the bottom of the screen.
-- you should see the changes you just made.
10) click the 'Approve' radio button, and click Submit.
11) In the opac tab, click on the 'your personal details' tab.
-- the values should be as expected
12) Set the salutation to blank and leave the birth date alone.
13) scroll down and submit
14) repeat steps 8-11.
-- the values should be as expected
15) Clear the birth date
16) scroll down and submit
17) repeat steps 8-11.
18) Set the salutation to Mr. and leave the birth date blank.
19) scroll down and submit.
20) repeat steps 8-11.
21) Repeat steps 6-11 for good measure.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list