Bug 24206 - Change URLs for default options in OPACSearchForTitleIn
Summary: Change URLs for default options in OPACSearchForTitleIn
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial (vote)
Assignee: Katrin Fischer
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-10 19:21 UTC by David Nind
Modified: 2021-06-14 21:29 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Updates URLs for the default entries (sites now use https, and an update to the Open Library's URL search pattern).
Version(s) released in:
20.05.00, 19.11.03, 19.05.08


Attachments
Bug 24206: Update URLs for default options in OPACSearchForTitleIn (6.66 KB, patch)
2019-12-22 13:10 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 24206: Update content of OpacSearchForTitleIn for existing installations (1.96 KB, patch)
2019-12-22 13:10 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 24206: Update URLs for default options in OPACSearchForTitleIn (6.66 KB, patch)
2019-12-29 15:44 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 24206: Update content of OpacSearchForTitleIn for existing installations (1.96 KB, patch)
2019-12-29 15:44 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 24206: Update content of OpacSearchForTitleIn for existing installations (4.70 KB, patch)
2019-12-29 15:46 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 24206: Update URLs for default options in OPACSearchForTitleIn (6.70 KB, patch)
2020-01-02 20:31 UTC, David Nind
Details | Diff | Splinter Review
Bug 24206: Update content of OpacSearchForTitleIn for existing installations (4.75 KB, patch)
2020-01-02 20:31 UTC, David Nind
Details | Diff | Splinter Review
Bug 24206: Update URLs for default options in OPACSearchForTitleIn (6.78 KB, patch)
2020-01-10 11:04 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24206: Update content of OpacSearchForTitleIn for existing installations (4.82 KB, patch)
2020-01-10 11:04 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24206: Add correct bug reference to update message in udpatedatabase (1.10 KB, patch)
2020-01-12 10:06 UTC, Katrin Fischer
Details | Diff | Splinter Review
k (2.09 KB, patch)
2020-01-12 10:23 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description David Nind 2019-12-10 19:21:24 UTC
URLs are not correct for the default values in the OPACSearchForTitleIn system peference:

- Worldcat: now https
- BookFinder: now https
- OpenLibrary: URL search pattern changed

These still work as the sites redirect to the https version, and the new URL pattern for the OpenLibrary.
Comment 1 Owen Leonard 2019-12-13 23:17:14 UTC
> - Worldcat: now https
> - BookFinder: now https

I know we can update the installation SQL, but I'm assuming there's not a good way to update existing installations since the library could have customized this preference with their own options?


> - OpenLibrary: URL search pattern changed

The current pattern looks correct to me:

https://openlibrary.org/search/?author=({AUTHOR})&title=({TITLE})

...translates to:

https://openlibrary.org/search?author=(Heinlein%2C%20Robert%20A.)&title=(Stranger%20in%20a%20strange%20land)
Comment 2 David Nind 2019-12-19 08:41:06 UTC
There is no / between search and the question mark for the query.
Comment 3 Katrin Fischer 2019-12-22 13:10:00 UTC
Created attachment 96569 [details] [review]
Bug 24206: Update URLs for default options in OPACSearchForTitleIn

- Worldcat: now https
- BookFinder: now https
- OpenLibrary: remove / before search parameters

To test:
- Verify changes to the installer files are correct
- Bonus: run the web installer for en, de-DE and nb-NO and
  verfiy the content of OPACSearchForTitleIn is correct
Comment 4 Katrin Fischer 2019-12-22 13:10:04 UTC
Created attachment 96570 [details] [review]
Bug 24206: Update content of OpacSearchForTitleIn for existing installations

This includes a database update for existing installations.
Using the REPLACE function it makes the same changes to the URLs
as the previous patch did for new installations:

- Worldcat: now https
- BookFinder: now https
- OpenLibrary: remove / before search parameters

To test:
- Verify the current content of your preference OpacSearchForTitleIn
  (without changes from first patch!)
- Run the database update
- Verify everything still works, but changes have been made
Comment 5 David Nind 2019-12-23 19:16:02 UTC
Thanks Katrin!

This all works as expected.

One minor point (and I'm not sure it needs updating), there is an extra space in installer/data/mysql/sysprefs.sql (line 426) between the a and href for the worldcat entry. This shows in the diff and when you click on 'Click to edit' in the staff interface.

It doesn't affect it working though, and maybe I'm being too pedantic!

Happy to sign-off either way.
Comment 6 Katrin Fischer 2019-12-29 15:44:23 UTC
Created attachment 96673 [details] [review]
Bug 24206: Update URLs for default options in OPACSearchForTitleIn

- Worldcat: now https
- BookFinder: now https
- OpenLibrary: remove / before search parameters

To test:
- Verify changes to the installer files are correct
- Bonus: run the web installer for en, de-DE and nb-NO and
  verfiy the content of OPACSearchForTitleIn is correct
Comment 7 Katrin Fischer 2019-12-29 15:44:26 UTC
Created attachment 96674 [details] [review]
Bug 24206: Update content of OpacSearchForTitleIn for existing installations

This includes a database update for existing installations.
Using the REPLACE function it makes the same changes to the URLs
as the previous patch did for new installations:

- Worldcat: now https
- BookFinder: now https
- OpenLibrary: remove / before search parameters

To test:
- Verify the current content of your preference OpacSearchForTitleIn
  (without changes from first patch!)
- Run the database update
- Verify everything still works, but changes have been made
Comment 8 Katrin Fischer 2019-12-29 15:46:04 UTC
Created attachment 96675 [details] [review]
Bug 24206: Update content of OpacSearchForTitleIn for existing installations

This includes a database update for existing installations.
Using the REPLACE function it makes the same changes to the URLs
as the previous patch did for new installations:

- Worldcat: now https
- BookFinder: now https
- OpenLibrary: remove / before search parameters

To test:
- Verify the current content of your preference OpacSearchForTitleIn
  (without changes from first patch!)
- Run the database update
- Verify everything still works, but changes have been made
Comment 9 Katrin Fischer 2019-12-29 15:46:25 UTC
(In reply to David Nind from comment #5)
> Thanks Katrin!
> 
> This all works as expected.
> 
> One minor point (and I'm not sure it needs updating), there is an extra
> space in installer/data/mysql/sysprefs.sql (line 426) between the a and href
> for the worldcat entry. This shows in the diff and when you click on 'Click
> to edit' in the staff interface.
> 
> It doesn't affect it working though, and maybe I'm being too pedantic!
> 
> Happy to sign-off either way.

Hi David, 

the extra space was there before, but I will remove it now in my updated patch. I feel for you - I like things nice and clean as well :)
Comment 10 David Nind 2020-01-02 20:15:42 UTC
Thanks Katrin!
Comment 11 David Nind 2020-01-02 20:31:25 UTC
Created attachment 96768 [details] [review]
Bug 24206: Update URLs for default options in OPACSearchForTitleIn

- Worldcat: now https
- BookFinder: now https
- OpenLibrary: remove / before search parameters

To test:
- Verify changes to the installer files are correct
- Bonus: run the web installer for en, de-DE and nb-NO and
  verfiy the content of OPACSearchForTitleIn is correct

Signed-off-by: David Nind <david@davidnind.com>
Comment 12 David Nind 2020-01-02 20:31:28 UTC
Created attachment 96769 [details] [review]
Bug 24206: Update content of OpacSearchForTitleIn for existing installations

This includes a database update for existing installations.
Using the REPLACE function it makes the same changes to the URLs
as the previous patch did for new installations:

- Worldcat: now https
- BookFinder: now https
- OpenLibrary: remove / before search parameters

To test:
- Verify the current content of your preference OpacSearchForTitleIn
  (without changes from first patch!)
- Run the database update
- Verify everything still works, but changes have been made

Signed-off-by: David Nind <david@davidnind.com>
Comment 13 Katrin Fischer 2020-01-02 20:33:17 UTC
Thx David!
Comment 14 Jonathan Druart 2020-01-10 11:04:43 UTC
Created attachment 97186 [details] [review]
Bug 24206: Update URLs for default options in OPACSearchForTitleIn

- Worldcat: now https
- BookFinder: now https
- OpenLibrary: remove / before search parameters

To test:
- Verify changes to the installer files are correct
- Bonus: run the web installer for en, de-DE and nb-NO and
  verfiy the content of OPACSearchForTitleIn is correct

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 15 Jonathan Druart 2020-01-10 11:04:46 UTC
Created attachment 97187 [details] [review]
Bug 24206: Update content of OpacSearchForTitleIn for existing installations

This includes a database update for existing installations.
Using the REPLACE function it makes the same changes to the URLs
as the previous patch did for new installations:

- Worldcat: now https
- BookFinder: now https
- OpenLibrary: remove / before search parameters

To test:
- Verify the current content of your preference OpacSearchForTitleIn
  (without changes from first patch!)
- Run the database update
- Verify everything still works, but changes have been made

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 16 Martin Renvoize 2020-01-10 16:23:40 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 17 Katrin Fischer 2020-01-12 09:51:34 UTC
Needs a small follow-up, bug number in updatedatabase is missing:

Upgrade to 19.12.00.008 done (Bug XXXXX - Update OpacSearchForTitleIn system preference)
Comment 18 Katrin Fischer 2020-01-12 10:06:56 UTC
Created attachment 97264 [details] [review]
Bug 24206: Add correct bug reference to update message in udpatedatabase

Fixes a small oversight by changing XXXX to 24206.
Comment 19 Katrin Fischer 2020-01-12 10:23:07 UTC
Created attachment 97265 [details] [review]
k
Comment 20 Katrin Fischer 2020-01-12 10:24:28 UTC
Comment on attachment 97265 [details] [review]
k

Wrong bug number!
Comment 21 Martin Renvoize 2020-01-13 16:55:28 UTC
Already pushed a followup :)
Comment 22 Joy Nelson 2020-01-31 22:34:47 UTC
Pushed to 19.11.x branch for 19.11.03
Comment 23 Lucas Gass 2020-02-12 22:46:21 UTC
backported to 19.05.x for 19.05.08
Comment 24 Hayley Pelham 2020-02-13 22:50:37 UTC
Patches will not be backported to 18.11.x series as no one should be installing 18.11.x.