Bug 30200 - Add customizable tabs to interlibrary loan requests list
Summary: Add customizable tabs to interlibrary loan requests list
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: ILL (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Lari Taskula
QA Contact: Martin Renvoize
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-28 23:55 UTC by Lari Taskula
Modified: 2022-12-07 18:03 UTC (History)
5 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:


Attachments
Bug 30200: Add a new system preference ILLRequestsTabs (3.76 KB, patch)
2022-03-03 02:52 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 30200: Add custom tabs to View ILL requests page (11.19 KB, patch)
2022-03-03 02:52 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 30200: Update ill-list-table.js indentation (5.82 KB, patch)
2022-03-03 02:53 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 30200: Add custom tabs to View ILL requests page (8.87 KB, patch)
2022-03-21 10:32 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 30200: Add custom tabs to View ILL requests page (8.73 KB, patch)
2022-03-21 10:35 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 30200: Add custom tabs to View ILL requests page (8.83 KB, patch)
2022-05-02 12:36 UTC, Magnus Enger
Details | Diff | Splinter Review
Bug 30200: Add a new system preference ILLRequestsTabs (3.82 KB, patch)
2022-05-02 12:37 UTC, Magnus Enger
Details | Diff | Splinter Review
Bug 30200: Add custom tabs to View ILL requests page (8.85 KB, patch)
2022-08-08 21:39 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 30200: Add a new system preference ILLRequestsTabs (3.86 KB, patch)
2022-08-08 21:39 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 30200: (follow-up) Fix missing TT filters (2.11 KB, patch)
2022-08-08 21:39 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 30200: (follow-up) Update database update and pref description (2.76 KB, patch)
2022-08-08 21:39 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 30200: Add custom tabs to View ILL requests page (8.90 KB, patch)
2022-10-05 10:39 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30200: Add a new system preference ILLRequestsTabs (3.93 KB, patch)
2022-10-05 10:39 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30200: (follow-up) Fix missing TT filters (2.17 KB, patch)
2022-10-05 10:39 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30200: (follow-up) Update database update and pref description (2.83 KB, patch)
2022-10-05 10:39 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lari Taskula 2022-02-28 23:55:37 UTC
In staff client, all interlibrary loan requests are loaded into a table regardless of their status.

Ability to sort them by status under multiple tabs would make librarians life a lot easier.

This Bug adds such feature.
Comment 1 Lari Taskula 2022-03-03 02:52:42 UTC Comment hidden (obsolete)
Comment 2 Lari Taskula 2022-03-03 02:52:48 UTC Comment hidden (obsolete)
Comment 3 Lari Taskula 2022-03-03 02:53:00 UTC Comment hidden (obsolete)
Comment 4 Lari Taskula 2022-03-21 10:32:41 UTC Comment hidden (obsolete)
Comment 5 Lari Taskula 2022-03-21 10:35:59 UTC Comment hidden (obsolete)
Comment 6 Magnus Enger 2022-05-02 12:36:48 UTC Comment hidden (obsolete)
Comment 7 Magnus Enger 2022-05-02 12:37:56 UTC Comment hidden (obsolete)
Comment 8 Magnus Enger 2022-05-02 12:40:27 UTC
I have tested this and as far as I can see it works nicely. I have been involved in the developing and testing this (not an independent tester), so I am not changing the status of the bug.
Comment 9 Katrin Fischer 2022-08-08 21:39:11 UTC Comment hidden (obsolete)
Comment 10 Katrin Fischer 2022-08-08 21:39:15 UTC Comment hidden (obsolete)
Comment 11 Katrin Fischer 2022-08-08 21:39:19 UTC Comment hidden (obsolete)
Comment 12 Katrin Fischer 2022-08-08 21:39:23 UTC Comment hidden (obsolete)
Comment 13 Katrin Fischer 2022-08-08 21:40:24 UTC
Love this - an easy way to organize custom status and all.
Comment 14 Martin Renvoize 2022-10-05 10:39:29 UTC
Created attachment 141338 [details] [review]
Bug 30200: Add custom tabs to View ILL requests page

Prereqs:
1: Make sure you have enabled an ILL backend and enabled system
   preferecnce ILLModule. For more information see
   https://koha-community.org/manual/21.11/en/html/ILL_requests.html

To test:
1: Note, the following branchcodes, statuses and backends depend
   on your test environment and which ILL backend you are using.
   This example is for Libris backend.

Set system preference ILLRequestsTabs:
- name: tab1
  status:
    - IN_REM
- name: tab2
  status:
    - IN_UTEL
    - IN_LEV
- name: tab3
  status:
    - IN_ANK

2. Add at least 4 ILL requests with the following SQL:
INSERT INTO `illrequests` (borrowernumber, branchcode, status, backend) VALUES (1, 'CPL', 'IN_REM', 'Libris');
INSERT INTO `illrequests` (borrowernumber, branchcode, status, backend) VALUES (1, 'CPL', 'IN_UTEL', 'Libris');
INSERT INTO `illrequests` (borrowernumber, branchcode, status, backend) VALUES (1, 'CPL', 'IN_LEV', 'Libris');
INSERT INTO `illrequests` (borrowernumber, branchcode, status, backend) VALUES (1, 'CPL', 'IN_ANK', 'Libris');

Note: Change values to whatever your test environment has set up.

3. Go to cgi-bin/koha/ill/ill-requests.pl
4. After the page loads, you should now see 4 different tabs:
   "All", "tab1", "tab2" and "tab3"
5. Confirm all ILL requests are present under "All" tab
6. Confirm only ILL requests with the statuses you defined in
   system preference ILLRequestsTabs are under tabs 1, 2 and 3
7. Go to cgi-bin/koha/members/ill-requests.pl?borrowernumber=1
8. Repeat steps 4-6
9. Clear system preference ILLRequestsTabs
10. Observe both ill/ill-requests.pl and members/ill-requests.pl
    now have only one tab "All" under which correct ILL requests
    are presented
11. Try some other status values in ILLRequestsTabs and observe
    expected behavior

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 15 Martin Renvoize 2022-10-05 10:39:33 UTC
Created attachment 141339 [details] [review]
Bug 30200: Add a new system preference ILLRequestsTabs

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 16 Martin Renvoize 2022-10-05 10:39:37 UTC
Created attachment 141340 [details] [review]
Bug 30200: (follow-up) Fix missing TT filters

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 17 Martin Renvoize 2022-10-05 10:39:41 UTC
Created attachment 141341 [details] [review]
Bug 30200: (follow-up) Update database update and pref description

* Rephrases the system preference description a bit
* Adds IGNORE to the database statement
* Update output message of database statement to include pref name

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 18 Martin Renvoize 2022-10-05 10:40:09 UTC
Great improvement, all works well and not obvious regressions.

Passing QA
Comment 19 Owen Leonard 2022-10-12 11:02:53 UTC
I'm trying to get this to work so I can provide a follow-up to switch out the jQueryUI tabs with Bootstrap.

I'm not sure if I'm doing something wrong, but it isn't working for me. Whichever tab I'm on I see all requests.

The value in ILLRequestsTabs:

- name: New
  status:
    - NEW
- name: Status1
  status:
    - ILL_STATUS_1
- name: Status2
  status:
    - ILL_STATUS_2
- name: Status3-4
  status:
    - ILL_STATUS_3
    - ILL_STATUS_4

I inserted the ILL statues into the ILLSTATUS authorized value category. I manually updated some ILL requests to have the new statuses. When I go to the ILL requests page I see the tabs, but the tabs don't work to filter anything. The "All" and "NEW" tabs show all requests, and the Status1, Status2, Status3-4 tabs don't show anything.
Comment 20 Owen Leonard 2022-10-12 11:05:43 UTC
> 2. Add at least 4 ILL requests with the following SQL:
> INSERT INTO `illrequests` (borrowernumber, branchcode, status, backend)
> VALUES (1, 'CPL', 'IN_REM', 'Libris');

Another thing to note: If I manually update an ILL request with a custom status, the ILL requests table breaks completely: "Uncaught TypeError: can't access property "name", row.capabilities[row.status] is undefined"

This problem happens in master too, but I mention it because it affects the usefulness of the test plan here.
Comment 21 Katrin Fischer 2022-10-14 19:03:37 UTC
It definitely worked for me when I tested, both on the illrequests summary page and on the illrequest history. I'll try to have another look.