Bug 20799 - Add a link from biblio detail view to ILL request detail view, if a biblio has an ILL request
Summary: Add a link from biblio detail view to ILL request detail view, if a biblio ha...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: ILL (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Magnus Enger
QA Contact:
URL:
Keywords:
: 18592 (view as bug list)
Depends on: 20797
Blocks:
  Show dependency treegraph
 
Reported: 2018-05-22 07:45 UTC by Magnus Enger
Modified: 2021-12-13 21:09 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.11.00
Circulation function:


Attachments
Screenshot - proposed display for links to ILL request(s) (9.90 KB, image/png)
2019-12-09 14:44 UTC, Magnus Enger
Details
Suggested interface alternative (5.19 KB, image/png)
2019-12-09 15:01 UTC, Owen Leonard
Details
Bug 20799 - Add link from biblio to ILL detail view (4.01 KB, patch)
2019-12-09 16:49 UTC, Magnus Enger
Details | Diff | Splinter Review
Bug 20799: Add link from biblio to ILL detail view (4.08 KB, patch)
2020-06-29 15:58 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20799: (follow-up) Add ILLModule system preference check and fix display for no requests (1.25 KB, patch)
2020-06-29 15:58 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20799: Add link from biblio to ILL detail view (4.13 KB, patch)
2020-07-06 14:37 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 20799: (follow-up) Add ILLModule system preference check and fix display for no requests (1.32 KB, patch)
2020-07-06 14:37 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 20799: (QA follow-up) Move syspref check (1.83 KB, patch)
2020-07-22 09:10 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 20799: (QA follow-up) Move syspref check (1.90 KB, patch)
2020-07-24 08:09 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Magnus Enger 2018-05-22 07:45:25 UTC
Bug 20797 adds a link from the ILL module to the biblio detail view of the record associated with an ILL request. A link in the other direction would also be useful: from the standard biblio detail view, to the ILL detail view for the ILL request connected to the biblio record (if there is one). 

This could take the form of a simple link, or it could be more elaborate, like another tab alongside Holdings, Descriptions and Acq details, to display some ILL data without the need for a click through to the ILL module.
Comment 1 Magnus Enger 2018-05-22 07:46:59 UTC
*** Bug 18592 has been marked as a duplicate of this bug. ***
Comment 2 Magnus Enger 2019-12-09 14:44:52 UTC
Created attachment 96102 [details]
Screenshot - proposed display for links to ILL request(s)

Normaly there will only be one ILL request connected to a bibliographic record. The screenshot shows the proposed way of displaying one or more links to connected ILL requests: as linked ILL request IDs.
Comment 3 Owen Leonard 2019-12-09 15:01:44 UTC
Created attachment 96103 [details]
Suggested interface alternative

I think it would be confusing to use the same styling for these links as for the holds count. We use that style for a link which expresses a count of things and links to a list of those things.

My suggestion is to use plain links, separated by a comma if there are multiple, and to label the links so that it is more clear what the number means.
Comment 4 Magnus Enger 2019-12-09 16:49:53 UTC
Created attachment 96105 [details] [review]
Bug 20799 - Add link from biblio to ILL detail view

Some ILL systems (e.g. Libris in Sweden) require a link between
a biblio and an ILL request. When such a link exists it is nice
to display an actual link from the biblio detail view to the
ILL request detail view. This patch adds such a link. For users
without ILL privileges, the requests should still show, but not
be clickable links.

To test:
- Make sure you have a couple of ILL requests created with the
  FreeForm backend. (FreeForm does not let you tie a request to
  a biblio through the UI, but we will add connections directly
  in the database.) Lets assume these have illrequest_id's a and b.
- Make sure you have a record, let's call the biblionumber x.
- Apply the patch and make sure there are no changes in the biblio
  detail view of biblionumber x.
- Log into the database and connect the biblio to the first request:
  UPDATE illrequests SET biblio_id = x where illrequest_id = a;
- Check that the biblio detail view now says this:
  "ILL requests: Request a"
- Verify that the "Request a" part is a working link to the detail
  view of ILL request a.
- Do this in the database:
  UPDATE illrequests SET biblio_id = x where illrequest_id = b;
- Check that the biblio detail view now says this:
  "ILL requests: Request a, Request b"
- Verify the links work as expected.
- Log in as a staff user and check that the requests are still
  listed, but not displayed as clickable links.
- Sign off
Comment 5 Magnus Enger 2019-12-09 16:51:12 UTC
This patch uses the recommendations from Owen.
Comment 6 Katrin Fischer 2020-06-29 15:58:50 UTC
Created attachment 106407 [details] [review]
Bug 20799: Add link from biblio to ILL detail view

Some ILL systems (e.g. Libris in Sweden) require a link between
a biblio and an ILL request. When such a link exists it is nice
to display an actual link from the biblio detail view to the
ILL request detail view. This patch adds such a link. For users
without ILL privileges, the requests should still show, but not
be clickable links.

To test:
- Make sure you have a couple of ILL requests created with the
  FreeForm backend. (FreeForm does not let you tie a request to
  a biblio through the UI, but we will add connections directly
  in the database.) Lets assume these have illrequest_id's a and b.
- Make sure you have a record, let's call the biblionumber x.
- Apply the patch and make sure there are no changes in the biblio
  detail view of biblionumber x.
- Log into the database and connect the biblio to the first request:
  UPDATE illrequests SET biblio_id = x where illrequest_id = a;
- Check that the biblio detail view now says this:
  "ILL requests: Request a"
- Verify that the "Request a" part is a working link to the detail
  view of ILL request a.
- Do this in the database:
  UPDATE illrequests SET biblio_id = x where illrequest_id = b;
- Check that the biblio detail view now says this:
  "ILL requests: Request a, Request b"
- Verify the links work as expected.
- Log in as a staff user and check that the requests are still
  listed, but not displayed as clickable links.
- Sign off

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 7 Katrin Fischer 2020-06-29 15:58:54 UTC
Created attachment 106408 [details] [review]
Bug 20799: (follow-up) Add ILLModule system preference check and fix display for no requests

When there were no requests the label would still display, using .count fixes this.
Also adds a check on the ILLModule system preference to prevent the information from
showing when the ILL module is deactivated.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 8 Katrin Fischer 2020-06-29 15:59:50 UTC
I could see this moved into a tab in the future, but it's a really nice little enhancement as is that will ease the workflow a lot.
Comment 9 Martin Renvoize (ashimema) 2020-07-06 14:37:31 UTC
Created attachment 106584 [details] [review]
Bug 20799: Add link from biblio to ILL detail view

Some ILL systems (e.g. Libris in Sweden) require a link between
a biblio and an ILL request. When such a link exists it is nice
to display an actual link from the biblio detail view to the
ILL request detail view. This patch adds such a link. For users
without ILL privileges, the requests should still show, but not
be clickable links.

To test:
- Make sure you have a couple of ILL requests created with the
  FreeForm backend. (FreeForm does not let you tie a request to
  a biblio through the UI, but we will add connections directly
  in the database.) Lets assume these have illrequest_id's a and b.
- Make sure you have a record, let's call the biblionumber x.
- Apply the patch and make sure there are no changes in the biblio
  detail view of biblionumber x.
- Log into the database and connect the biblio to the first request:
  UPDATE illrequests SET biblio_id = x where illrequest_id = a;
- Check that the biblio detail view now says this:
  "ILL requests: Request a"
- Verify that the "Request a" part is a working link to the detail
  view of ILL request a.
- Do this in the database:
  UPDATE illrequests SET biblio_id = x where illrequest_id = b;
- Check that the biblio detail view now says this:
  "ILL requests: Request a, Request b"
- Verify the links work as expected.
- Log in as a staff user and check that the requests are still
  listed, but not displayed as clickable links.
- Sign off

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 10 Martin Renvoize (ashimema) 2020-07-06 14:37:35 UTC
Created attachment 106585 [details] [review]
Bug 20799: (follow-up) Add ILLModule system preference check and fix display for no requests

When there were no requests the label would still display, using .count fixes this.
Also adds a check on the ILLModule system preference to prevent the information from
showing when the ILL module is deactivated.

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 11 Martin Renvoize (ashimema) 2020-07-06 14:37:58 UTC
Works well, passes QA scripts and no regressions found.

Passing QA
Comment 12 Jonathan Druart 2020-07-20 13:45:26 UTC
Instead of having the syspref check in the template I think it would make more sense to have it in the controller script (to avoid necessary request if ILL is not enabled).
Comment 13 Martin Renvoize (ashimema) 2020-07-22 09:10:41 UTC
Created attachment 107175 [details] [review]
Bug 20799: (QA follow-up) Move syspref check

This patch moves the syspref check into the controller to save a DB
query if the module is not enabled.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 14 Martin Renvoize (ashimema) 2020-07-22 09:11:46 UTC
Good catch.. I've moved the syspref check into the controller, using it in a ternary to govern whether we return an empty array or execute the search.
Comment 15 Jonathan Druart 2020-07-24 08:09:39 UTC
Created attachment 107277 [details] [review]
Bug 20799: (QA follow-up) Move syspref check

This patch moves the syspref check into the controller to save a DB
query if the module is not enabled.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

JD - amended patch: removing trailing parenthesis in the IF statement
Comment 16 Jonathan Druart 2020-07-24 12:13:56 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 17 Lucas Gass (lukeg) 2020-07-31 20:15:03 UTC
not backporting enhancement to 20.05.x series