Bug 30200 - Add customizable tabs to interlibrary loan requests list
Summary: Add customizable tabs to interlibrary loan requests list
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: ILL (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Lari Taskula
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords: release-notes-needed
Depends on:
Blocks:
 
Reported: 2022-02-28 23:55 UTC by Lari Taskula
Modified: 2025-05-08 06:51 UTC (History)
7 users (show)

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


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 (ashimema)
Details | Diff | Splinter Review
Bug 30200: Add a new system preference ILLRequestsTabs (3.93 KB, patch)
2022-10-05 10:39 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 30200: (follow-up) Fix missing TT filters (2.17 KB, patch)
2022-10-05 10:39 UTC, Martin Renvoize (ashimema)
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 (ashimema)
Details | Diff | Splinter Review
Bug 30200: Add custom tabs to View ILL requests page (7.00 KB, patch)
2025-03-14 21:18 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 30200: Add a new system preference ILLRequestsTabs (2.46 KB, patch)
2025-03-14 21:18 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 30200: (follow-up) Update database update and pref description (2.35 KB, patch)
2025-03-14 21:18 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 30200: Add pref to right file (1.72 KB, patch)
2025-03-14 21:18 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 30200: Add a new system preference ILLRequestsTabs (2.46 KB, patch)
2025-03-18 10:40 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 30200: Add custom tabs to View ILL requests page (9.90 KB, patch)
2025-03-18 10:40 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 30200: (follow-up) Update database update and pref description (2.35 KB, patch)
2025-03-18 10:40 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 30200: Add pref to right file (1.72 KB, patch)
2025-03-18 10:40 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 30200: Add custom tabs to View ILL requests page (9.92 KB, patch)
2025-03-18 11:13 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 30200: (follow-up) Update database update and pref description (2.35 KB, patch)
2025-03-18 11:13 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 30200: Add pref to right file (1.72 KB, patch)
2025-03-18 11:13 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 30200: Add a new system preference ILLRequestsTabs (2.50 KB, patch)
2025-03-31 08:15 UTC, Magnus Enger
Details | Diff | Splinter Review
Bug 30200: Add custom tabs to View ILL requests page (9.96 KB, patch)
2025-03-31 08:16 UTC, Magnus Enger
Details | Diff | Splinter Review
Bug 30200: (follow-up) Update database update and pref description (2.40 KB, patch)
2025-03-31 08:16 UTC, Magnus Enger
Details | Diff | Splinter Review
Bug 30200: Add pref to right file (1.77 KB, patch)
2025-03-31 08:17 UTC, Magnus Enger
Details | Diff | Splinter Review
Bug 30200: Add a new system preference ILLRequestsTabs (2.52 KB, patch)
2025-05-07 13:36 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 30200: Add custom tabs to View ILL requests page (10.25 KB, patch)
2025-05-07 13:36 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 30200: (follow-up) Update database update and pref description (2.03 KB, patch)
2025-05-07 13:36 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 30200: Add pref to right file (1.84 KB, patch)
2025-05-07 13:36 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 30200: (QA follow-up) Keep multiselect in sync (7.30 KB, patch)
2025-05-07 13:36 UTC, Martin Renvoize (ashimema)
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 (ashimema) 2022-10-05 10:39:29 UTC Comment hidden (obsolete)
Comment 15 Martin Renvoize (ashimema) 2022-10-05 10:39:33 UTC Comment hidden (obsolete)
Comment 16 Martin Renvoize (ashimema) 2022-10-05 10:39:37 UTC Comment hidden (obsolete)
Comment 17 Martin Renvoize (ashimema) 2022-10-05 10:39:41 UTC Comment hidden (obsolete)
Comment 18 Martin Renvoize (ashimema) 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.
Comment 22 Lari Taskula 2025-03-14 21:18:44 UTC Comment hidden (obsolete)
Comment 23 Lari Taskula 2025-03-14 21:18:48 UTC Comment hidden (obsolete)
Comment 24 Lari Taskula 2025-03-14 21:18:51 UTC Comment hidden (obsolete)
Comment 25 Lari Taskula 2025-03-14 21:18:55 UTC Comment hidden (obsolete)
Comment 26 Lari Taskula 2025-03-14 21:22:50 UTC
Refactored tabs to use ILL status filter. I've changed the status filter to multiple select element. I removed sign-offs from the first patch as it has changed quite a bit.
Comment 27 Lari Taskula 2025-03-18 10:40:17 UTC Comment hidden (obsolete)
Comment 28 Lari Taskula 2025-03-18 10:40:21 UTC Comment hidden (obsolete)
Comment 29 Lari Taskula 2025-03-18 10:40:24 UTC Comment hidden (obsolete)
Comment 30 Lari Taskula 2025-03-18 10:40:27 UTC Comment hidden (obsolete)
Comment 31 Lari Taskula 2025-03-18 11:13:25 UTC Comment hidden (obsolete)
Comment 32 Lari Taskula 2025-03-18 11:13:28 UTC Comment hidden (obsolete)
Comment 33 Lari Taskula 2025-03-18 11:13:32 UTC Comment hidden (obsolete)
Comment 34 Magnus Enger 2025-03-31 08:15:59 UTC
Created attachment 179910 [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>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Comment 35 Magnus Enger 2025-03-31 08:16:32 UTC
Created attachment 179911 [details] [review]
Bug 30200: Add custom tabs to View ILL requests page

To test:
0: yarn css:build:prod
1. Set system preference ILLRequestsTabs:
- name: New
  status:
    - NEW
- name: Requested or reverted
  status:
    - REQ
    - REQREV
- name: Queued
  status:
    - QUEUED
- name: Empty
  status:
    - NONEXISTENT

2. Add some ILL requests with the following SQL:
INSERT INTO `illrequests` (borrowernumber, branchcode, status, backend) VALUES (1, 'CPL', 'NEW', 'Standard');
INSERT INTO `illrequests` (borrowernumber, branchcode, status, backend) VALUES (1, 'CPL', 'NEW', 'Standard');
INSERT INTO `illrequests` (borrowernumber, branchcode, status, backend) VALUES (1, 'CPL', 'REQ', 'Standard');
INSERT INTO `illrequests` (borrowernumber, branchcode, status, backend) VALUES (1, 'CPL', 'REQREV', 'Standard');
INSERT INTO `illrequests` (borrowernumber, branchcode, status, backend) VALUES (1, 'CPL', 'QUEUED', 'Standard');
INSERT INTO `illrequests` (borrowernumber, branchcode, status, backend) VALUES (1, 'CPL', 'KILL', 'Standard');

3. Go to cgi-bin/koha/ill/ill-requests.pl
4. After the page loads, you should now see 4 different
   tabs:
   "All", "New", "Requested or reverted", "Queued", and
   "Empty"
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
   "New", "Requested or reverted" and "Queued"
7. Confirm no ILL requests are under tab "Empty"
8. Clear system preference ILLRequestsTabs
9. Observe only one tab "All" under which correct ILL
   requests are presented
10. Try some other status values in ILLRequestsTabs and
   observe expected behavior

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Comment 36 Magnus Enger 2025-03-31 08:16:57 UTC
Created attachment 179912 [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>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Comment 37 Magnus Enger 2025-03-31 08:17:28 UTC
Created attachment 179913 [details] [review]
Bug 30200: Add pref to right file

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Comment 38 Magnus Enger 2025-03-31 08:23:04 UTC
I work for the company that paid for this work. I can confirm it works the way we want it to, so I have added my signoff to the patches. I leave the status at "Needs signoff", because an independent signoff is needed,
Comment 39 Jeremy Evans 2025-03-31 15:54:08 UTC
I have tested this on a Sandbox and can confirm it is working as described.

I had to create the test ILL records manually but I was able to edit the config to confirm that different request statuses would appear under the various tabs as specified in the config.
Comment 40 Martin Renvoize (ashimema) 2025-05-07 07:15:56 UTC
Oh, my apoologies, I'd missed that this had been reworked for the API datatables work.. Thank you so much Lari

I'll QA it now.
Comment 41 Martin Renvoize (ashimema) 2025-05-07 09:00:33 UTC
I love this.. but I think we need a tiny bit more.. I think the selected tab should filter down the available 'status' filters on the left side menu
Comment 42 Martin Renvoize (ashimema) 2025-05-07 13:36:15 UTC
Created attachment 182025 [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>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Comment 43 Martin Renvoize (ashimema) 2025-05-07 13:36:18 UTC
Created attachment 182026 [details] [review]
Bug 30200: Add custom tabs to View ILL requests page

To test:
0: yarn css:build:prod
1. Set system preference ILLRequestsTabs:
- name: New
  status:
    - NEW
- name: Requested or reverted
  status:
    - REQ
    - REQREV
- name: Queued
  status:
    - QUEUED
- name: Empty
  status:
    - NONEXISTENT

2. Add some ILL requests with the following SQL:
INSERT INTO `illrequests` (borrowernumber, branchcode, status, backend) VALUES (1, 'CPL', 'NEW', 'Standard');
INSERT INTO `illrequests` (borrowernumber, branchcode, status, backend) VALUES (1, 'CPL', 'NEW', 'Standard');
INSERT INTO `illrequests` (borrowernumber, branchcode, status, backend) VALUES (1, 'CPL', 'REQ', 'Standard');
INSERT INTO `illrequests` (borrowernumber, branchcode, status, backend) VALUES (1, 'CPL', 'REQREV', 'Standard');
INSERT INTO `illrequests` (borrowernumber, branchcode, status, backend) VALUES (1, 'CPL', 'QUEUED', 'Standard');
INSERT INTO `illrequests` (borrowernumber, branchcode, status, backend) VALUES (1, 'CPL', 'KILL', 'Standard');

3. Go to cgi-bin/koha/ill/ill-requests.pl
4. After the page loads, you should now see 4 different
   tabs:
   "All", "New", "Requested or reverted", "Queued", and
   "Empty"
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
   "New", "Requested or reverted" and "Queued"
7. Confirm no ILL requests are under tab "Empty"
8. Clear system preference ILLRequestsTabs
9. Observe only one tab "All" under which correct ILL
   requests are presented
10. Try some other status values in ILLRequestsTabs and
   observe expected behavior

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Comment 44 Martin Renvoize (ashimema) 2025-05-07 13:36:21 UTC
Created attachment 182027 [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>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Comment 45 Martin Renvoize (ashimema) 2025-05-07 13:36:25 UTC
Created attachment 182028 [details] [review]
Bug 30200: Add pref to right file

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Comment 46 Martin Renvoize (ashimema) 2025-05-07 13:36:28 UTC
Created attachment 182029 [details] [review]
Bug 30200: (QA follow-up) Keep multiselect in sync

This patch updates the multiselect status picker handling to ensure it
remains in sync with the active tab.

On tab change we now disable statuses that are not part of the tab
select options, deselect any other status filters and then select all
tab statuses.  We allow further refinement of the filters still by
allowing the user to deselect any of the available statuses. The filters
should continue to work as before except using the 'Clear' button will
now reapply the tab defined status set in full as apposed to removing
all status filtering entirely.

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Comment 47 Katrin Fischer 2025-05-08 06:29:19 UTC
I like the multi-select for the statuses, but it seems almost like a second feature hidden inside this patch set. Please make it stand out in release notes at least :)
Comment 48 Katrin Fischer 2025-05-08 06:51:14 UTC
Pushed for 25.05!

Well done everyone, thank you!