Bug 29172 - Can't use controlfields with CustomCoverImagesURL
Summary: Can't use controlfields with CustomCoverImagesURL
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 22445
Blocks:
  Show dependency treegraph
 
Reported: 2021-10-05 09:57 UTC by Katrin Fischer
Modified: 2021-10-29 14:36 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Text to go in the release notes:
Version(s) released in:
21.11.00,21.05.05,20.11.11


Attachments
Bug 29172: Make CustomCoverImagesURL compatible with control fields (3.04 KB, patch)
2021-10-05 12:00 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 29172: Make CustomCoverImagesURL compatible with control fields (3.09 KB, patch)
2021-10-06 00:13 UTC, David Nind
Details | Diff | Splinter Review
Bug 29172: Make CustomCoverImagesURL compatible with control fields (3.15 KB, patch)
2021-10-10 10:25 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 29172: (follow-up) Amend preference text for control fields (1.26 KB, patch)
2021-10-10 10:25 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 Katrin Fischer 2021-10-05 09:57:41 UTC
I've been trying to use the controlnumber from 001 in CustomCoverImagesURL, but didn't manage to make it work:

{001}
{001$@} - internal server error
{001$}

Mabe it's possible and I don't have the right syntax?
Comment 1 Jonathan Druart 2021-10-05 12:00:39 UTC
Created attachment 125731 [details] [review]
Bug 29172: Make CustomCoverImagesURL compatible with control fields

Bug 22445 added CustomCoverImagesURL that deals with MARC fields, but
control fields were not supported.

Test plan:
Turn CustomCoverImages on
Fill CustomCoverImagesURL with https://covers.openlibrary.org/b/isbn/{006}-M.jpg
Add an isbn in 006 (0596001738 will work)
Go to the detail page of the bibliographic record and confirm that you
see a cover image.
Comment 2 David Nind 2021-10-06 00:13:53 UTC
Created attachment 125754 [details] [review]
Bug 29172: Make CustomCoverImagesURL compatible with control fields

Bug 22445 added CustomCoverImagesURL that deals with MARC fields, but
control fields were not supported.

Test plan:
Turn CustomCoverImages on
Fill CustomCoverImagesURL with https://covers.openlibrary.org/b/isbn/{006}-M.jpg
Add an isbn in 006 (0596001738 will work)
Go to the detail page of the bibliographic record and confirm that you
see a cover image.

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Katrin Fischer 2021-10-10 10:25:06 UTC
Created attachment 126014 [details] [review]
Bug 29172: Make CustomCoverImagesURL compatible with control fields

Bug 22445 added CustomCoverImagesURL that deals with MARC fields, but
control fields were not supported.

Test plan:
Turn CustomCoverImages on
Fill CustomCoverImagesURL with https://covers.openlibrary.org/b/isbn/{006}-M.jpg
Add an isbn in 006 (0596001738 will work)
Go to the detail page of the bibliographic record and confirm that you
see a cover image.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Katrin Fischer 2021-10-10 10:25:09 UTC
Created attachment 126015 [details] [review]
Bug 29172: (follow-up) Amend preference text for control fields

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Jonathan Druart 2021-10-12 09:19:19 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 6 Kyle M Hall 2021-10-22 13:52:40 UTC
Pushed to 21.05.x for 21.05.05
Comment 7 Fridolin Somers 2021-10-23 01:40:38 UTC
Pushed to 20.11.x for 20.11.11
Comment 8 Victor Grousset/tuxayo 2021-10-26 01:03:08 UTC
Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed.