Bug 20563 - ILL request list gives no indication of source and/or target
Summary: ILL request list gives no indication of source and/or target
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: ILL (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Target Milestone: ---
Assignee: Andrew Isherwood
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 18837
Blocks: 18589
  Show dependency treegraph
 
Reported: 2018-04-11 13:30 UTC by Andrew Isherwood
Modified: 2018-11-29 12:27 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug [20563] - [ILL request list gives no indication of source and/or target] (7.53 KB, patch)
2018-04-13 10:17 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 20563: Allow display of requested partners (7.49 KB, patch)
2018-04-13 10:35 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 20563: Allow display of requested partners (8.21 KB, patch)
2018-05-30 11:31 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 20563: Allow display of requested partners (8.25 KB, patch)
2018-09-27 15:02 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 20563: Allow display of requested partners (8.34 KB, patch)
2018-10-01 13:40 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 20563: (follow-up) Add unit test (1.23 KB, patch)
2018-10-01 14:06 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 20563: (follow-up) Fix requested partners (4.32 KB, patch)
2018-10-15 14:21 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 20563: Allow display of requested partners (8.59 KB, patch)
2018-11-09 14:06 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 20563: (follow-up) Add unit test (1.39 KB, patch)
2018-11-09 14:06 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 20563: Allow display of requested partners (8.60 KB, patch)
2018-11-19 14:56 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 20563: (follow-up) Add unit test (1.39 KB, patch)
2018-11-19 14:56 UTC, Andrew Isherwood
Details | Diff | Splinter Review
Bug 20563: (follow-up) Fix rebasing bug (1.01 KB, patch)
2018-11-29 12:27 UTC, Andrew Isherwood
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Isherwood 2018-04-11 13:30:43 UTC
Currently when viewing a list of ILL requests in staff view there is no indication of with whom the request was placed. What will be displayed here will depend upon the backend on which the request was placed. For example, with BLDSS the displayed string will simply be BLDSS, whereas with FreeForm some indication of the partner library would be required.
Comment 1 Andrew Isherwood 2018-04-13 10:17:02 UTC Comment hidden (obsolete)
Comment 2 Andrew Isherwood 2018-04-13 10:35:23 UTC Comment hidden (obsolete)
Comment 3 Magnus Enger 2018-05-15 13:12:41 UTC
I try to follow the test plan, but run into an Internal Server Error. I di the following: 

- Create a new request with FreeForm
- Click on "Place request with partners"
- Select a partner library and click on "Send email"
- Get an "Internal Server Error" 

The Plack error log shows this:

Can't call method "isa" on unblessed reference at /home/vagrant/kohaclone/ill/ill-requests.pl line 203.

Any idea what might be going on there?
Comment 4 Andrew Isherwood 2018-05-30 11:31:27 UTC
Created attachment 75657 [details] [review]
Bug 20563: Allow display of requested partners

This patch adds the display of requested partner email addresses when an
ILL backend provides the ability to send requests to partners. Partner
email addresses are displayed in the illlist and illview displays, they
are also included in the 'illrequests' API response.

* api/v1/swagger/paths/illrequests.json:
  - Add 'requested_partners' as an 'embed' enum
* Koha/Illrequest.pm:
  - Add 'requested_partners' accessor calling optional backend 'get_requested_partners' method.
  - Store requested partners upon email send, calling optional backend 'set_requested_partners' method.
  - Add 'requested_parners' embed to overloaded TO_JSON method.
* koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt:
  - Add 'requested_partners' embed to illrequests API call
  - Add render function for "Additional status" datatables column
  - Add display of requested partner email addresses to illlist table
  - Add display of requested partner email addresses to illview display

To test:
1) Enable Interlibrary loans
2) Add a backend that supports sending requests to partners, e.g.
FreeForm
3) Set up at least one partner
4) Create an ILL request
5) Send request to partner(s)
6) Observe partner(s) email address(es) are displayed in "View ILL
requests" view
7) Observe partner(s) email address(es) are displayed in "Manage ILL
request" view
Comment 5 Andrew Isherwood 2018-05-30 11:32:33 UTC
Hi Magnus

Thanks for this. I've modified the way the error handling is done when a request to partner fails, this should hopefully at least give you some indication as to why the request is failing. Let me know how it goes.
Comment 6 PTFS Europe Sandboxes 2018-09-27 15:02:22 UTC
Created attachment 79523 [details] [review]
Bug 20563: Allow display of requested partners

This patch adds the display of requested partner email addresses when an
ILL backend provides the ability to send requests to partners. Partner
email addresses are displayed in the illlist and illview displays, they
are also included in the 'illrequests' API response.

* api/v1/swagger/paths/illrequests.json:
  - Add 'requested_partners' as an 'embed' enum
* Koha/Illrequest.pm:
  - Add 'requested_partners' accessor calling optional backend 'get_requested_partners' method.
  - Store requested partners upon email send, calling optional backend 'set_requested_partners' method.
  - Add 'requested_parners' embed to overloaded TO_JSON method.
* koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt:
  - Add 'requested_partners' embed to illrequests API call
  - Add render function for "Additional status" datatables column
  - Add display of requested partner email addresses to illlist table
  - Add display of requested partner email addresses to illview display

To test:
1) Enable Interlibrary loans
2) Add a backend that supports sending requests to partners, e.g.
FreeForm
3) Set up at least one partner
4) Create an ILL request
5) Send request to partner(s)
6) Observe partner(s) email address(es) are displayed in "View ILL
requests" view
7) Observe partner(s) email address(es) are displayed in "Manage ILL
request" view

Signed-off-by: mmg@interleaf.ie
Comment 7 Andrew Isherwood 2018-10-01 13:40:06 UTC
Created attachment 79715 [details] [review]
Bug 20563: Allow display of requested partners

This patch adds the display of requested partner email addresses when an
ILL backend provides the ability to send requests to partners. Partner
email addresses are displayed in the illlist and illview displays, they
are also included in the 'illrequests' API response.

* api/v1/swagger/paths/illrequests.json:
  - Add 'requested_partners' as an 'embed' enum
* Koha/Illrequest.pm:
  - Add 'requested_partners' accessor calling optional backend 'get_requested_partners' method.
  - Store requested partners upon email send, calling optional backend 'set_requested_partners' method.
  - Add 'requested_parners' embed to overloaded TO_JSON method.
* koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt:
  - Add 'requested_partners' embed to illrequests API call
  - Add render function for "Additional status" datatables column
  - Add display of requested partner email addresses to illlist table
  - Add display of requested partner email addresses to illview display

To test:
1) Enable Interlibrary loans
2) Add a backend that supports sending requests to partners, e.g.
FreeForm
3) Set up at least one partner
4) Create an ILL request
5) Send request to partner(s)
6) Observe partner(s) email address(es) are displayed in "View ILL
requests" view
7) Observe partner(s) email address(es) are displayed in "Manage ILL
request" view

Signed-off-by: mmg@interleaf.ie

https://bugs.koha-community.org/show_bug.cgi?id=20653
Comment 8 Andrew Isherwood 2018-10-01 13:40:28 UTC
Rebased and fixed merge conflict
Comment 9 Andrew Isherwood 2018-10-01 14:06:27 UTC
Created attachment 79716 [details] [review]
Bug 20563: (follow-up) Add unit test

This unit test tests the fetching of the requested_partners embed, if
specified.
Comment 10 Josef Moravec 2018-10-12 13:06:29 UTC
Comment on attachment 79715 [details] [review]
Bug 20563: Allow display of requested partners

Review of attachment 79715 [details] [review]:
-----------------------------------------------------------------

::: Koha/Illrequest.pm
@@ +994,5 @@
> +=head3 requested_partners
> +
> +    my $partners_string = $illRequest->requested_partners;
> +
> +Return the string representing the email addresses of the parters to

typo "parters" ;)

::: koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt
@@ +165,5 @@
> +                row.hasOwnProperty('requested_partners') &&
> +                row.requested_partners &&
> +                row.requested_partners.length > 0
> +            ) ?
> +                "Requested from:<br>" +

This is not translatable

@@ +200,5 @@
>              },
> +            additional_status: {
> +                name: _("Additional status"),
> +                func: createAdditional
> +            },

Why do you create new column for this? It duplicates the information that status is "Requested", You can as well add the partners to the normal status column IMHO.

@@ +547,5 @@
>                                  <div class="status">
>                                      <span class="label status">Status:</span>
>                                      [% request.capabilities.$req_status.name | html %]
> +                                    [% IF request.requested_partners.length > 0 %]
> +                                        ([% request.requested_partners %])

there is missing filter
Comment 11 Josef Moravec 2018-10-12 13:06:57 UTC
Sorry to fail it again
Comment 12 Andrew Isherwood 2018-10-15 14:21:32 UTC
Created attachment 80603 [details] [review]
Bug 20563: (follow-up) Fix requested partners

As per:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20563#c10

Thanks for the suggestion on merging the "Status" and "Additional status" columns, looks much better!
Comment 13 Andrew Isherwood 2018-11-09 12:23:19 UTC
Comment on attachment 79716 [details] [review]
Bug 20563: (follow-up) Add unit test

Obsoleted by dependency tree rebase
Comment 14 Andrew Isherwood 2018-11-09 14:04:11 UTC
Comment on attachment 79715 [details] [review]
Bug 20563: Allow display of requested partners

Obsoleted by rebase on dependency tree
Comment 15 Andrew Isherwood 2018-11-09 14:04:28 UTC
Comment on attachment 80603 [details] [review]
Bug 20563: (follow-up) Fix requested partners

Obsoleted by rebase on dependency tree
Comment 16 Andrew Isherwood 2018-11-09 14:06:21 UTC
Created attachment 82166 [details] [review]
Bug 20563: Allow display of requested partners

This patch adds the display of requested partner email addresses when an
ILL backend provides the ability to send requests to partners. Partner
email addresses are displayed in the illlist and illview displays, they
are also included in the 'illrequests' API response.

* api/v1/swagger/paths/illrequests.json:
  - Add 'requested_partners' as an 'embed' enum
* Koha/Illrequest.pm:
  - Add 'requested_partners' accessor calling optional backend 'get_requested_partners' method.
  - Store requested partners upon email send, calling optional backend 'set_requested_partners' method.
  - Add 'requested_parners' embed to overloaded TO_JSON method.
* koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt:
  - Add 'requested_partners' embed to illrequests API call
  - Add render function for "Additional status" datatables column
  - Add display of requested partner email addresses to illlist table
  - Add display of requested partner email addresses to illview display

To test:
1) Enable Interlibrary loans
2) Add a backend that supports sending requests to partners, e.g.
FreeForm
3) Set up at least one partner
4) Create an ILL request
5) Send request to partner(s)
6) Observe partner(s) email address(es) are displayed in "View ILL
requests" view
7) Observe partner(s) email address(es) are displayed in "Manage ILL
request" view

Signed-off-by: mmg@interleaf.ie

https://bugs.koha-community.org/show_bug.cgi?id=20653

Bug 20563: (follow-up) Fix requested partners

As per:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20563#c10

Thanks for the suggestion on merging the "Status" and "Additional status" columns, looks much better!
Comment 17 Andrew Isherwood 2018-11-09 14:06:25 UTC
Created attachment 82167 [details] [review]
Bug 20563: (follow-up) Add unit test

Test that requested partners are returned in API response when requested
Comment 18 Andrew Isherwood 2018-11-19 14:56:36 UTC
Created attachment 82511 [details] [review]
Bug 20563: Allow display of requested partners

This patch adds the display of requested partner email addresses when an
ILL backend provides the ability to send requests to partners. Partner
email addresses are displayed in the illlist and illview displays, they
are also included in the 'illrequests' API response.

* api/v1/swagger/paths/illrequests.json:
  - Add 'requested_partners' as an 'embed' enum
* Koha/Illrequest.pm:
  - Add 'requested_partners' accessor calling optional backend 'get_requested_partners' method.
  - Store requested partners upon email send, calling optional backend 'set_requested_partners' method.
  - Add 'requested_parners' embed to overloaded TO_JSON method.
* koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt:
  - Add 'requested_partners' embed to illrequests API call
  - Add render function for "Additional status" datatables column
  - Add display of requested partner email addresses to illlist table
  - Add display of requested partner email addresses to illview display

To test:
1) Enable Interlibrary loans
2) Add a backend that supports sending requests to partners, e.g.
FreeForm
3) Set up at least one partner
4) Create an ILL request
5) Send request to partner(s)
6) Observe partner(s) email address(es) are displayed in "View ILL
requests" view
7) Observe partner(s) email address(es) are displayed in "Manage ILL
request" view

Signed-off-by: mmg@interleaf.ie

https://bugs.koha-community.org/show_bug.cgi?id=20653

Bug 20563: (follow-up) Fix requested partners

As per:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20563#c10

Thanks for the suggestion on merging the "Status" and "Additional status" columns, looks much better!
Comment 19 Andrew Isherwood 2018-11-19 14:56:40 UTC
Created attachment 82512 [details] [review]
Bug 20563: (follow-up) Add unit test

Test that requested partners are returned in API response when requested
Comment 20 Andrew Isherwood 2018-11-29 12:27:23 UTC
Created attachment 82734 [details] [review]
Bug 20563: (follow-up) Fix rebasing bug

Fix erroneous curly brackets