Bug 22067 - Koha::Patron->can_see_patron_infos should return if no patron is passed
Summary: Koha::Patron->can_see_patron_infos should return if no patron is passed
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Nick Clemens
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-03 20:52 UTC by Nick Clemens
Modified: 2020-01-06 20:14 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 22067: Return if no patron passed to can_see_patron_infos (940 bytes, patch)
2019-01-03 20:54 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 22067: Return if no patron passed to can_see_patron_infos (991 bytes, patch)
2019-01-04 19:19 UTC, Maryse Simard
Details | Diff | Splinter Review
Bug 22067: Return if no patron passed to can_see_patron_infos (1.19 KB, patch)
2019-02-15 11:03 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2019-01-03 20:52:04 UTC
If there is a problem retrieving a patron's guarantor they cannot be edited.

To recreate:
1 - Find an adult patron
2 - Add a child to their account
3 - Delete the parent from the db
4 - Attempt to edit the child record
Comment 1 Nick Clemens 2019-01-03 20:54:52 UTC
Created attachment 83629 [details] [review]
Bug 22067: Return if no patron passed to can_see_patron_infos

To test:
1 - Find an adult patron
2 - Add a child to their account
3 - Delete the parent from the db
4 - Attempt to edit the child record
5 - Apply patch
6 - Repeat
7 - Note you can edit the child account
8 - Note guarantor id is not a link
Comment 2 Maryse Simard 2019-01-04 19:19:25 UTC
Created attachment 83653 [details] [review]
Bug 22067: Return if no patron passed to can_see_patron_infos

To test:
1 - Find an adult patron
2 - Add a child to their account
3 - Delete the parent from the db
4 - Attempt to edit the child record
5 - Apply patch
6 - Repeat
7 - Note you can edit the child account
8 - Note guarantor id is not a link

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Comment 3 Marcel de Rooy 2019-02-15 11:03:28 UTC
Created attachment 85153 [details] [review]
Bug 22067: Return if no patron passed to can_see_patron_infos

To test:
1 - Find an adult patron
2 - Add a child to their account
3 - Delete the parent from the db
4 - Attempt to edit the child record
5 - Apply patch
6 - Repeat
7 - Note you can edit the child account
8 - Note guarantor id is not a link

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
No blocker for me, but we are a bit hiding that guarantorid probably should
be a foreign key cleared to NULL at deletion time.
Comment 4 Nick Clemens 2019-02-15 18:49:54 UTC
Awesome work all!

Pushed to master for 19.05
Comment 5 Martin Renvoize 2019-02-25 13:26:29 UTC
Pushed to 18.11.x for 18.11.04
Comment 6 Lucas Gass 2019-03-04 22:41:26 UTC
backported to 18.05.x for 18.05.11