Bug 33313 - TICKET_NOTIFY looking for IntranetBaseURL rather than staffClientBaseURL in default notice
Summary: TICKET_NOTIFY looking for IntranetBaseURL rather than staffClientBaseURL in d...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal
Assignee: Katrin Fischer
QA Contact: Testopia
URL:
Keywords:
Depends on: 31028
Blocks: 33314
  Show dependency treegraph
 
Reported: 2023-03-22 18:44 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 33313: Fix catalog links in TICKET_NOTIFY (6.74 KB, patch)
2023-04-23 12:01 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 33313: Fix catalog links in TICKET_NOTIFY (6.79 KB, patch)
2023-04-23 19:42 UTC, David Nind
Details | Diff | Splinter Review
Bug 33313: Fix catalog links in TICKET_NOTIFY (3.29 KB, patch)
2023-05-18 09:13 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 33313: Fix catalog links in TICKET_NOTIFY (3.35 KB, patch)
2023-05-18 13:22 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:44:33 UTC
While I think IntranetBaseURL is a better name for it, the system preference is still called staffClientBaseURL ;)

To reproduce 1:
1. Go to Tools > Notices and slips
2. Look for TICKET_NOTIFY
3. Click 'Edit' next to TICKET_NOTIFY
4. Click 'Email'
   --> In the message body is this line
   a href='[%- Koha.Preference('IntranetBaseURL') -%]/cgi-bin/koha/cataloguing/concerns.pl

To reproduce 2:
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 is empty
   <br><br>You can mark this concern as resolved from the concern management <a href='/cgi-bin/koha/cataloguing/concerns.pl'>page</a>
Comment 1 Katrin Fischer 2023-04-16 00:07:09 UTC
I wanted to have a look at this, but bug 31028 needs a rebase. Adding Martin.
Comment 2 Martin Renvoize (ashimema) 2023-04-20 11:13:54 UTC
(In reply to Katrin Fischer from comment #1)
> I wanted to have a look at this, but bug 31028 needs a rebase. Adding Martin.

It's because 31028 is pretty much all pushed.. you don't need to apply it.. it's in master.
Comment 3 Caroline Cyr La Rose 2023-04-20 12:50:03 UTC
Should I still put the 'depends on' when it's pushed? I just wanted to alert the people who worked on 31028 of related bugs that I found while documenting
Comment 4 Martin Renvoize (ashimema) 2023-04-20 13:28:16 UTC
Depends on is good.. it's just that in this case the bug was a bit messy and ended up going backwards in bugzilla states.. as such git bz ignore it as is should.
Comment 5 Katrin Fischer 2023-04-23 12:01:30 UTC
Created attachment 150130 [details] [review]
Bug 33313: Fix catalog links in TICKET_NOTIFY

This fixes the system preference name from IntranetBaseURL to
staffClientBaseURL.

Also makes some small typo fixes.

As this feature has just been pushed I chose to fix the
database updates that will be run when installing 23.05.

To test:
* Verify the wrong link in TICKET_NOTIFY
* Drop database, create database, run web installer
* Verify the link is now correct in the notice

Bonus: Test update from 22.11 to 23.05 and verify the
notices are correct there as well.
Comment 6 David Nind 2023-04-23 19:32:14 UTC
This fixes the link to the cataloging concerns management page, so happy to sign it off.

In addition, should the link to the record title be fixed as well, or should I log that as a separate bug? For example: I used Programming Perl - the link for this in the email is to http://cgi-bin/koha/catalogue/detail.pl?biblionumber=262 (in the notice it is <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=262" class="title">), which is an invalid link without the domain name.

Testing notes (using KTD):

1. After applying the patch, reset_all refreshes everything with the updated notice. (Need to set the required system preferences - enable CatalogConcerns, have a value for set CatalogerEmails, have a valid value for staffClientBaseURL, and have a valid email for the patron submitting the concern).

2. I'm not sure of the right steps using KTD to do the bonus test (test update from 22.11 to 23.05), so I haven't done that.

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 7 David Nind 2023-04-23 19:38:07 UTC
(In reply to David Nind from comment #6)
 
> In addition, should the link to the record title be fixed as well, or should
> I log that as a separate bug? For example: I used Programming Perl - the
> link for this in the email is to
> http://cgi-bin/koha/catalogue/detail.pl?biblionumber=262 (in the notice it
> is <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=262"
> class="title">), which is an invalid link without the domain name.

This is already logged as bug 33314.
Comment 8 David Nind 2023-04-23 19:42:22 UTC
Created attachment 150135 [details] [review]
Bug 33313: Fix catalog links in TICKET_NOTIFY

This fixes the system preference name from IntranetBaseURL to
staffClientBaseURL.

Also makes some small typo fixes.

As this feature has just been pushed I chose to fix the
database updates that will be run when installing 23.05.

To test:
* Verify the wrong link in TICKET_NOTIFY
* Drop database, create database, run web installer
* Verify the link is now correct in the notice

Bonus: Test update from 22.11 to 23.05 and verify the
notices are correct there as well.

Signed-off-by: David Nind <david@davidnind.com>
Comment 9 David Nind 2023-04-23 19:44:39 UTC
Additional testing note (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).
Comment 10 Katrin Fischer 2023-04-23 20:59:02 UTC
(In reply to David Nind from comment #7)
> (In reply to David Nind from comment #6)
>  
> > In addition, should the link to the record title be fixed as well, or should
> > I log that as a separate bug? For example: I used Programming Perl - the
> > link for this in the email is to
> > http://cgi-bin/koha/catalogue/detail.pl?biblionumber=262 (in the notice it
> > is <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=262"
> > class="title">), which is an invalid link without the domain name.
> 
> This is already logged as bug 33314.

I was not aware of the other bug, I fixed the issue as a follow-up and made it dependent on this one.
Comment 11 David Nind 2023-04-23 23:18:37 UTC
(In reply to Katrin Fischer from comment #10)

> > This is already logged as bug 33314.
> 
> I was not aware of the other bug, I fixed the issue as a follow-up and made
> it dependent on this one.

Thanks for creating a patch for bug 33314! I've signed it off as well.
Comment 12 Jonathan Druart 2023-04-25 18:52:46 UTC
There are 2 "Thankyou" left in installer/data/mysql/db_revs/221200010.pl
Comment 13 Katrin Fischer 2023-05-18 08:59:55 UTC
I didn't get back to this in time, maybe consider a follow-up next time?
Comment 14 Katrin Fischer 2023-05-18 09:13:30 UTC
Created attachment 151384 [details] [review]
Bug 33313: Fix catalog links in TICKET_NOTIFY

This fixes the system preference name from IntranetBaseURL to
staffClientBaseURL.

As this feature has just been pushed I chose to fix the
database updates that will be run when installing 23.05.

To test:
* Verify the wrong link in TICKET_NOTIFY
* Drop database, create database, run web installer
* Verify the link is now correct in the notice

Bonus: Test update from 22.11 to 23.05 and verify the
notices are correct there as well.

Signed-off-by: David Nind <david@davidnind.com>
Comment 15 Katrin Fischer 2023-05-18 09:15:00 UTC
I am moving the typo fixes to a different bug. I believe we might get away with pushing this as the string might not change in pootle now.

It's currently:

You can mark this concern as resolved from the concern management %spage%s.
Comment 16 Martin Renvoize (ashimema) 2023-05-18 13:22:44 UTC
Created attachment 151417 [details] [review]
Bug 33313: Fix catalog links in TICKET_NOTIFY

This fixes the system preference name from IntranetBaseURL to
staffClientBaseURL.

As this feature has just been pushed I chose to fix the
database updates that will be run when installing 23.05.

To test:
* Verify the wrong link in TICKET_NOTIFY
* Drop database, create database, run web installer
* Verify the link is now correct in the notice

Bonus: Test update from 22.11 to 23.05 and verify the
notices are correct there as well.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 17 Martin Renvoize (ashimema) 2023-05-18 13:25:35 UTC
My mistake.. sure it was intranet at some point.. or I'm going mad.

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

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