Bug 34280 - Patrons with no email address produce a warning when saving
Summary: Patrons with no email address produce a warning when saving
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial (vote)
Assignee: Matt Blenkinsop
QA Contact: Testopia
URL:
Keywords:
Depends on: 29046
Blocks:
  Show dependency treegraph
 
Reported: 2023-07-14 14:10 UTC by Matt Blenkinsop
Modified: 2023-08-18 11:45 UTC (History)
6 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:
23.11.00,23.05.03


Attachments
Bug 34280: Fix warning in logs when saving patron details (1.25 KB, patch)
2023-07-14 14:15 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 34280: Fix warning in logs when saving patron details (1.28 KB, patch)
2023-07-18 10:57 UTC, David Nind
Details | Diff | Splinter Review
Bug 34280: Fix warning in logs when saving patron details (1.35 KB, patch)
2023-07-24 16:43 UTC, Emily Lamancusa
Details | Diff | Splinter Review
Bug 34280: (QA follow-up) perltidy (754 bytes, patch)
2023-07-24 16:43 UTC, Emily Lamancusa
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Blenkinsop 2023-07-14 14:10:39 UTC
If a patron has no valid email address then a warning message appears in the logs when saving:

"Use of uninitialized value $email in string ne at /kohadevbox/koha/Koha/Patron.pm line 1445."
Comment 1 Matt Blenkinsop 2023-07-14 14:15:19 UTC
Created attachment 153490 [details] [review]
Bug 34280: Fix warning in logs when saving patron details

If a patron has no valid email address then a warning message appears in the logs when saving:

"Use of uninitialized value $email in string ne at /kohadevbox/koha/Koha/Patron.pm line 1445."

This patch fixes that error by removing an unnescessary string ne

Test plan:
1) Create/choose a patron with no email addresses
2) On the patron record in the page section for Contact information, click edit
3) Now click save
4) The warning above should appear in the logs
5) Apply patch
6) Repeat steps 2 and 3
7) The warning should no longer appear
Comment 2 David Nind 2023-07-18 10:57:14 UTC
Created attachment 153587 [details] [review]
Bug 34280: Fix warning in logs when saving patron details

If a patron has no valid email address then a warning message appears in the logs when saving:

"Use of uninitialized value $email in string ne at /kohadevbox/koha/Koha/Patron.pm line 1445."

This patch fixes that error by removing an unnescessary string ne

Test plan:
1) Create/choose a patron with no email addresses
2) On the patron record in the page section for Contact information, click edit
3) Now click save
4) The warning above should appear in the logs
5) Apply patch
6) Repeat steps 2 and 3
7) The warning should no longer appear

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2023-07-18 10:59:10 UTC
Testing notes (using KTD):

1. For me, the warning only appeared in the logs when editing the contact information for existing patrons. If I created a new patron, the warning message didn't appear in the logs.

2. To view the logs: vi /var/log/koha/kohadev/plack-intranet-error.log
Comment 4 Emily Lamancusa 2023-07-24 16:43:53 UTC
Created attachment 153852 [details] [review]
Bug 34280: Fix warning in logs when saving patron details

If a patron has no valid email address then a warning message appears in the logs when saving:

"Use of uninitialized value $email in string ne at /kohadevbox/koha/Koha/Patron.pm line 1445."

This patch fixes that error by removing an unnescessary string ne

Test plan:
1) Create/choose a patron with no email addresses
2) On the patron record in the page section for Contact information, click edit
3) Now click save
4) The warning above should appear in the logs
5) Apply patch
6) Repeat steps 2 and 3
7) The warning should no longer appear

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Comment 5 Emily Lamancusa 2023-07-24 16:43:56 UTC
Created attachment 153853 [details] [review]
Bug 34280: (QA follow-up) perltidy

Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Comment 6 Emily Lamancusa 2023-07-24 16:46:53 UTC
Trivial follow-up patch to make perltidy happy. Otherwise, change makes sense and QA tool passes. Passing QA
Comment 7 Tomás Cohen Arazi 2023-07-24 17:56:05 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 8 Fridolin Somers 2023-08-04 02:11:09 UTC
Pushed to 23.05.x for 23.05.03
Comment 9 Fridolin Somers 2023-08-04 02:12:50 UTC
Looks like this has been added by Bug 29046
Comment 10 Pedro Amorim 2023-08-18 11:45:25 UTC
Bug 29046 not in 22.11.x. Not pushing.