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.
Created attachment 74152 [details] [review] Bug [20563] - [ILL request list gives no indication of source and/or target] 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 TEST PLAN --------- - Enable Interlibrary loans - Add a backend that supports sending requests to partners, e.g. FreeForm - Set up at least one partner - Create an ILL request - Send request to partner(s) - TEST: Ensure partner(s) email address(es) are displayed in "View ILL requests" view - TEST: Ensure partner(s) email address(es) are displayed in "Manage ILL request" view
Created attachment 74153 [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
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?
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
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.
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
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
Rebased and fixed merge conflict
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 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
Sorry to fail it again
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 on attachment 79716 [details] [review] Bug 20563: (follow-up) Add unit test Obsoleted by dependency tree rebase
Comment on attachment 79715 [details] [review] Bug 20563: Allow display of requested partners Obsoleted by rebase on dependency tree
Comment on attachment 80603 [details] [review] Bug 20563: (follow-up) Fix requested partners Obsoleted by rebase on dependency tree
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!
Created attachment 82167 [details] [review] Bug 20563: (follow-up) Add unit test Test that requested partners are returned in API response when requested
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!
Created attachment 82512 [details] [review] Bug 20563: (follow-up) Add unit test Test that requested partners are returned in API response when requested
Created attachment 82734 [details] [review] Bug 20563: (follow-up) Fix rebasing bug Fix erroneous curly brackets
Created attachment 84695 [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!
Created attachment 84696 [details] [review] Bug 20563: (follow-up) Add unit test Test that requested partners are returned in API response when requested
Created attachment 84697 [details] [review] Bug 20563: (follow-up) Fix rebasing bug Fix erroneous curly brackets
Created attachment 84698 [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!
Created attachment 86376 [details] [review] Bug 20563: (follow-up) Add unit test Test that requested partners are returned in API response when requested
Created attachment 86377 [details] [review] Bug 20563: (follow-up) Fix rebasing bug Fix erroneous curly brackets
Created attachment 86378 [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!
Created attachment 86427 [details] [review] Bug 20563: (follow-up) Add unit test Test that requested partners are returned in API response when requested Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 86428 [details] [review] Bug 20563: (follow-up) Fix rebasing bug Fix erroneous curly brackets Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 86429 [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! Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 86430 [details] [review] Bug 20563: (QA follow-up) Fix number of tests in api/v1/illrequests.t Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 86431 [details] [review] Bug 20563: (QA follow-up) Get requested_partners from api Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Awesome work all! Pushed to master for 19.05
Enhancement, will not be backported to 18.11.x series.