Bug 33314 - Link to bibliographic record incomplete in default TICKET_NOTIFY notice
Summary: Link to bibliographic record incomplete in default TICKET_NOTIFY notice
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low minor
Assignee: Katrin Fischer
QA Contact: Testopia
URL:
Keywords:
Depends on: 33313
Blocks:
  Show dependency treegraph
 
Reported: 2023-03-22 18:54 UTC by Caroline Cyr La Rose
Modified: 2024-07-04 20:37 UTC (History)
4 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.05.00
Circulation function:


Attachments
Bug 33314: Fix link into staff catalog and link text (4.50 KB, patch)
2023-04-23 20:58 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 33314: Fix link into staff catalog and link text (4.55 KB, patch)
2023-04-23 23:13 UTC, David Nind
Details | Diff | Splinter Review
Bug 33314: Fix link into staff catalog and link text (4.61 KB, patch)
2023-05-18 13:34 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Caroline Cyr La Rose 2023-03-22 18:54:49 UTC
When reporting a catalog concern, an email is sent to the cataloging team with a link to the bibliographic record in question. However, this link seems to be incomplete. (Might be linked to bug 33313, but I think the source of the problem is different...)

To reproduce:
1. Make sure staffClientBaseURL is filled correctly
2. Enable CatalogConcerns
3. Enter an email address in CatalogerEmails
4. Go to a bibliographic record in the staff interface
5. Click New > New catalog concern
6. Fill out the form and click Submit
7. Check the message_queue table for the message
   --> In the message, the link base to the record is empty
   a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=61"

Unfortunately, it's not as easy as changing the pref name to staffClientBaseURL because the line in the notice is [%- INCLUDE 'biblio-title.inc' biblio=ticket.biblio link = 1 -%]. So I'm guessing it's taking the baseURL somewhere else, but I don't know where.
Comment 1 Katrin Fischer 2023-04-23 20:37:19 UTC
I believe using the link here won't work as it is building a link for use inside of Koha - so missing the base URL part. It's not made for use in a notice.
Comment 2 Katrin Fischer 2023-04-23 20:58:28 UTC
Created attachment 150136 [details] [review]
Bug 33314: Fix link into staff catalog and link text

Both fixes concern the TICKET_NOTIFY message.

* biblio-title.inc builds a link with the intention
  of using it inside the Koha GUI. Therefore the baseURL part
  is missing. But we can use it for display and wrap it into
  a link.
* Changes second link from reading 'page' to 'concern management
  page'. Accessiblity guidelines teach us that you should not link
  general terms, but always be specific.

To test:
1. Make sure staffClientBaseURL is filled correctly
2. Enable CatalogConcerns
3. Enter an email address in CatalogerEmails
4. Go to a bibliographic record in the staff interface or in the OPAC
5. Click New > New catalog concern
6. Fill out the form and click Submit
7. Check the message_queue table for the message
8. Verify the first link is not working (incomplete) and the second is 'page'
9. Apply patch, drop db, create db and run web installer
10. Repeat setup and testing
11. Both links should now be updated and working
Comment 3 David Nind 2023-04-23 23:13:38 UTC
Created attachment 150144 [details] [review]
Bug 33314: Fix link into staff catalog and link text

Both fixes concern the TICKET_NOTIFY message.

* biblio-title.inc builds a link with the intention
  of using it inside the Koha GUI. Therefore the baseURL part
  is missing. But we can use it for display and wrap it into
  a link.
* Changes second link from reading 'page' to 'concern management
  page'. Accessiblity guidelines teach us that you should not link
  general terms, but always be specific.

To test:
1. Make sure staffClientBaseURL is filled correctly
2. Enable CatalogConcerns
3. Enter an email address in CatalogerEmails
4. Go to a bibliographic record in the staff interface or in the OPAC
5. Click New > New catalog concern
6. Fill out the form and click Submit
7. Check the message_queue table for the message
8. Verify the first link is not working (incomplete) and the second is 'page'
9. Apply patch, drop db, create db and run web installer
10. Repeat setup and testing
11. Both links should now be updated and working

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 David Nind 2023-04-23 23:16:39 UTC
Testing notes (using KTD):

1. When applying the patch, DON'T follow 31028 (the main patch is pushed to master, some follow-up patches have not yet been pushed).

2. After applying the patch, reset_all refreshes everything with the updated notice (step 9). 

3. I set up email to test the actual emails received.[1]

[1] To test sending emails using a Google account, edit /etc/koha/sites/kohadev/koha-conf.xml file and add this configuration near the end (where <user_name> = your Google email address; <password> = your APP password, not your Google account password):

 <smtp_server>
    <host>smtp.gmail.com</host>
    <port>587</port>
    <timeout>5</timeout>
    <ssl_mode>STARTTLS</ssl_mode>
    <user_name>GOOGLEACCOUNTUSER</user_name>
    <password>GOOGLEAPPPASSWORD</password>
    <debug>1</debug>
 </smtp_server>
Comment 5 Jonathan Druart 2023-05-03 09:57:37 UTC
Blocked by bug 33313.
Comment 6 Martin Renvoize (ashimema) 2023-05-18 13:34:07 UTC
Created attachment 151418 [details] [review]
Bug 33314: Fix link into staff catalog and link text

Both fixes concern the TICKET_NOTIFY message.

* biblio-title.inc builds a link with the intention
  of using it inside the Koha GUI. Therefore the baseURL part
  is missing. But we can use it for display and wrap it into
  a link.
* Changes second link from reading 'page' to 'concern management
  page'. Accessiblity guidelines teach us that you should not link
  general terms, but always be specific.

To test:
1. Make sure staffClientBaseURL is filled correctly
2. Enable CatalogConcerns
3. Enter an email address in CatalogerEmails
4. Go to a bibliographic record in the staff interface or in the OPAC
5. Click New > New catalog concern
6. Fill out the form and click Submit
7. Check the message_queue table for the message
8. Verify the first link is not working (incomplete) and the second is 'page'
9. Apply patch, drop db, create db and run web installer
10. Repeat setup and testing
11. Both links should now be updated and working

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Martin Renvoize (ashimema) 2023-05-18 13:34:32 UTC
Nice work Katrin, thank you very much for these fixes!

Passing QA
Comment 8 Tomás Cohen Arazi (tcohen) 2023-05-18 14:04:36 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 9 Matt Blenkinsop 2023-06-12 10:08:41 UTC
Missing dependencies - not backporting to 22.11.x