Bug 36595 - Add patron email to the holds queue table
Summary: Add patron email to the holds queue table
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Laura Escamilla
QA Contact: Martin Renvoize
URL:
Keywords: Academy, no-sandbox
Depends on:
Blocks:
 
Reported: 2024-04-12 12:09 UTC by Laura Escamilla
Modified: 2024-08-02 15:57 UTC (History)
2 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:
Circulation function:


Attachments
Bug 36595: Added email address field to the holds queue table (1.83 KB, patch)
2024-04-12 12:12 UTC, Laura Escamilla
Details | Diff | Splinter Review
Bug 36595: Updated to add mailto: -- Add patron email to the holds queue table (2.19 KB, patch)
2024-04-12 15:08 UTC, Laura Escamilla
Details | Diff | Splinter Review
Bug 36595: Updated to add mailto: -- Add patron email to the holds queue table (2.16 KB, patch)
2024-04-12 15:24 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 36595: Updated to add mailto: -- Add patron email to the holds queue table (2.22 KB, patch)
2024-05-13 10:27 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 36595: Updated to make "Hold item:" translatable (2.16 KB, patch)
2024-07-24 19:30 UTC, Laura Escamilla
Details | Diff | Splinter Review
Bug 36595: Updated to make "Hold item:" translatable (2.24 KB, patch)
2024-07-26 13:18 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 36595: Added email address field to the holds queue table (2.30 KB, patch)
2024-07-26 14:44 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 Laura Escamilla 2024-04-12 12:09:51 UTC
Some libraries would like to see the patron's email address in the Patron holds queue column.
Comment 1 Laura Escamilla 2024-04-12 12:12:24 UTC
Created attachment 164841 [details] [review]
Bug 36595: Added email address field to the holds queue table

To test:
1. Make sure that the system preference ‘HidePatronName’ is set to ‘Show’
2. Select a patron that has a primary email address set in their contact information.
    1. Place a hold for that patron
3. Build the holds queue: perl /kohadevbox/koha/misc/cronjobs/holds/build_holds_queue.pl
4. Check the holds queue and notice that the patron column includes the patron’s email
5. Disable the ‘HidePatronName’ system preference
    1. Check the holds queue again and notice that no contact information can be seen for the patron
6. Sign off and have an amazing day :D
Comment 2 Owen Leonard 2024-04-12 14:06:58 UTC
Do we want to wrap the email in a mailto: link like we do on the holds awaiting pickup page? I'm not sure how useful it is in practice, but we usually do that with email addresses.
Comment 3 Laura Escamilla 2024-04-12 15:08:19 UTC
Created attachment 164851 [details] [review]
Bug 36595: Updated to add mailto: -- Add patron email to the holds queue table

To test:
1. Make sure that the system preference ‘HidePatronName’ is set to ‘Show’
2. Select a patron that has a primary email address set in their contact information.
    1. Place a hold for that patron
3. Build the holds queue: perl /kohadevbox/koha/misc/cronjobs/holds/build_holds_queue.pl
4. Check the holds queue and notice that the patron column includes the patron’s email
5. Click on the hyperlinked email. It will open a new email with the subject of "Hold item: (your biblio title)"
6. Disable the ‘HidePatronName’ system preference
    1. Check the holds queue again and notice that no contact information can be seen for the patron
7. Sign off and have an amazing day :D
Comment 4 Laura Escamilla 2024-04-12 15:09:31 UTC
(In reply to Owen Leonard from comment #2)
> Do we want to wrap the email in a mailto: link like we do on the holds
> awaiting pickup page? I'm not sure how useful it is in practice, but we
> usually do that with email addresses.

Thanks for the feedback, Owen! I've updated the patch so that it includes a mailto:
Comment 5 Owen Leonard 2024-04-12 15:24:43 UTC
Created attachment 164854 [details] [review]
Bug 36595: Updated to add mailto: -- Add patron email to the holds queue table

To test:
1. Make sure that the system preference ‘HidePatronName’ is set to
   ‘Show’
2. Select a patron that has a primary email address set in their
   contact information.
    1. Place a hold for that patron
3. Build the holds queue: perl /kohadevbox/koha/misc/cronjobs/holds/build_holds_queue.pl
4. Check the holds queue and notice that the patron column includes the
   patron’s email
5. Click on the hyperlinked email. It will open a new email with the
   subject of "Hold item: (your biblio title)"
6. Disable the ‘HidePatronName’ system preference
    1. Check the holds queue again and notice that no contact
       information can be seen for the patron
7. Sign off and have an amazing day :D

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 6 Martin Renvoize 2024-05-13 10:27:22 UTC
Created attachment 166626 [details] [review]
Bug 36595: Updated to add mailto: -- Add patron email to the holds queue table

To test:
1. Make sure that the system preference ‘HidePatronName’ is set to
   ‘Show’
2. Select a patron that has a primary email address set in their
   contact information.
    1. Place a hold for that patron
3. Build the holds queue: perl /kohadevbox/koha/misc/cronjobs/holds/build_holds_queue.pl
4. Check the holds queue and notice that the patron column includes the
   patron’s email
5. Click on the hyperlinked email. It will open a new email with the
   subject of "Hold item: (your biblio title)"
6. Disable the ‘HidePatronName’ system preference
    1. Check the holds queue again and notice that no contact
       information can be seen for the patron
7. Sign off and have an amazing day :D

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Martin Renvoize 2024-05-13 10:27:43 UTC
Nice little enhancement, no QA issues.. Passing
Comment 8 Katrin Fischer 2024-05-13 11:43:50 UTC
The "Hold item" here is not translatable:

+                             <p class="patron-email"><a href="mailto:[% itemsloo.patron.email | uri %]?subject=[% "Hold item: " | uri %][% itemsloo.title | uri %]">[% itemsloo.patron.notice_email_address | html %]</a></p>

Maybe if you used a variable instead? Would need some testing.
Comment 9 Laura Escamilla 2024-07-24 19:30:25 UTC
Created attachment 169518 [details] [review]
Bug 36595: Updated to make "Hold item:" translatable

To test:
1. Make sure that the system preference ‘HidePatronName’ is set to
   ‘Show’
2. Select a patron that has a primary email address set in their
   contact information.
    1. Place a hold for that patron
3. Build the holds queue: perl /kohadevbox/koha/misc/cronjobs/holds/build_holds_queue.pl
4. Check the holds queue and notice that the patron column includes the
   patron’s email
5. Click on the hyperlinked email. It will open a new email with the
   subject of "Hold item: (your biblio title)"
6. Disable the ‘HidePatronName’ system preference
    1. Check the holds queue again and notice that no contact
       information can be seen for the patron
7. Sign off and have an amazing day :D
Comment 10 Matt Blenkinsop 2024-07-26 13:18:13 UTC
Created attachment 169701 [details] [review]
Bug 36595: Updated to make "Hold item:" translatable

To test:
1. Make sure that the system preference ‘HidePatronName’ is set to
   ‘Show’
2. Select a patron that has a primary email address set in their
   contact information.
    1. Place a hold for that patron
3. Build the holds queue: perl /kohadevbox/koha/misc/cronjobs/holds/build_holds_queue.pl
4. Check the holds queue and notice that the patron column includes the
   patron’s email
5. Click on the hyperlinked email. It will open a new email with the
   subject of "Hold item: (your biblio title)"
6. Disable the ‘HidePatronName’ system preference
    1. Check the holds queue again and notice that no contact
       information can be seen for the patron
7. Sign off and have an amazing day :D

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Comment 11 Martin Renvoize 2024-07-26 14:44:11 UTC
Created attachment 169738 [details] [review]
Bug 36595: Added email address field to the holds queue table

To test:
1. Make sure that the system preference ‘HidePatronName’ is set to
   ‘Show’
2. Select a patron that has a primary email address set in their
   contact information.
    1. Place a hold for that patron
3. Build the holds queue: perl /kohadevbox/koha/misc/cronjobs/holds/build_holds_queue.pl
4. Check the holds queue and notice that the patron column includes the
   patron’s email
5. Click on the hyperlinked email. It will open a new email with the
   subject of "Hold item: (your biblio title)"
6. Disable the ‘HidePatronName’ system preference
    1. Check the holds queue again and notice that no contact
       information can be seen for the patron
7. Sign off and have an amazing day :D

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 12 Martin Renvoize 2024-07-26 14:48:25 UTC
Great work, thanks Laura.  Passing QA
Comment 13 Katrin Fischer 2024-08-02 15:55:39 UTC
I see some small issues here. 

You don't check if the patron actually has an email set. The link will be broken if the email field is empty I believe.

This will also not be translatable: ?subject=Hold item: [% itemsloo.title | uri %]"> I think when I looked at this trick in the past, there was also an issue with UTF8/diacritics. As you include the title, it might be worth testing with some Chinese or umlauts as these could happen to occur there.

I don't thinks this should be a blocker here, but it might also be worth filing a separate bug for some template trick to show the email address according to EmailFieldPrimary and EmailFieldPrecedence. 

+1 for adding the class :)
Comment 14 Katrin Fischer 2024-08-02 15:57:00 UTC
Sorry, spotted something else: 

You use itemsloo.patron.email in the link, but itemsloo.patron.notice_email_address in the display text.