Bug 32419

Summary: Show availability in list view in staff interface
Product: Koha Reporter: Caroline Cyr La Rose <caroline.cyr-la-rose>
Component: Staff interfaceAssignee: Aleisha Amohia <aleisha>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: aleisha, dcook, gmcharlt, hacheng
Version: unspecified   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: Sponsored Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
This patch adds a new XSLT to apply to the lists view on the staff interface, used by the XSLTListsDisplay system preference. It is almost a copy of MARC21slim2intranetResults.xsl, used by the XSLTResultsDisplay system preference, except it includes code to also display item availability. Item availability is already shown on the lists view on the OPAC, so this adds that functionality to the staff interface.
Version(s) released in:
Circulation function:
Attachments: Bug 32419: WIP
Bug 32419: Add XSLT for intranet lists which shows item availability
Bug 32419: Add XSLT for intranet lists which shows item availability
Bug 32419: Add XSLT for intranet lists which shows item availability

Description Caroline Cyr La Rose 2022-12-07 16:30:24 UTC
When viewing a list on the OPAC, you can see the item's availability. But in the staff interface, this information is not visible.

To test :
1. In the staff interface, add an item to a list
2. View the list
   --> No availability is visible
3. Go to the OPAC and view the list
   --> You can see the availability of the item
Comment 1 David Cook 2023-05-16 02:38:20 UTC
I think once we've got more APIs for this it'll be easier to make changes like this
Comment 2 Aleisha Amohia 2025-10-21 20:02:14 UTC
Created attachment 188259 [details] [review]
Bug 32419: WIP
Comment 3 Aleisha Amohia 2025-10-29 01:31:49 UTC
Created attachment 188537 [details] [review]
Bug 32419: Add XSLT for intranet lists which shows item availability

This patch adds a new XSLT to apply to the lists view on the staff interface, used by the XSLTListsDisplay system preference.

It is almost a copy of MARC21slim2intranetResults.xsl, used by the XSLTResultsDisplay system preference, except it includes code to also display item availability. Item availability is already shown on the lists view on the OPAC, so this adds that functionality to the staff interface.

To test:

1. Create or use a biblio record with multiple items, for example biblionumber 235.
2. Check out an item attached to the record to a patron, i.e. check out barcode 39999000010190 to your logged in user
3. Go to the Detail view for this record.
4. Edit another item attached to the record and give it a not for loan status, i.e. edit barcode 39999000010213 and set it to Not for loan
5. Click the Add to list button above the record. Add the record to an existing list, or create a new one and Save.
6. Go to the Lists module in the staff interface and view the contents of the list you just added your record to.
7. Confirm you see accurate Availability information in the list results, showing available items, unavailable items, and items available for reference.
8. Do a catalogue search that will return your record in the results. Confirm the Availability information does not show in the main results portion underneath the title, it should only show in the rightmost column as normal.

Sponsored-by: Pymble Ladies' College
Comment 4 Katrin Fischer 2025-11-21 02:20:45 UTC
Hi Aleisha, we found this working really well, but noticed one major difference to the display in the OPAC: the colors/styling for different statuses is missing. Like:
available being green and the for reference being red. Is this something that could be added as a follow-up or should we write a separate bug report?
Comment 5 Aleisha Amohia 2025-12-16 00:20:45 UTC
(In reply to Katrin Fischer from comment #4)
> Hi Aleisha, we found this working really well, but noticed one major
> difference to the display in the OPAC: the colors/styling for different
> statuses is missing. Like:
> available being green and the for reference being red. Is this something
> that could be added as a follow-up or should we write a separate bug report?

I will add a follow-up!
Comment 6 Aleisha Amohia 2025-12-16 03:16:16 UTC
Created attachment 190527 [details] [review]
Bug 32419: Add XSLT for intranet lists which shows item availability

This patch adds a new XSLT to apply to the lists view on the staff interface, used by the XSLTListsDisplay system preference.

It is almost a copy of MARC21slim2intranetResults.xsl, used by the XSLTResultsDisplay system preference, except it includes code to also display item availability. Item availability is already shown on the lists view on the OPAC, so this adds that functionality to the staff interface.

To test:

0. Restart services and compile CSS for changes to take effect, in KTD this looks like: yarn build && restart_all
1. Create or use a biblio record with multiple items, for example biblionumber 235.
2. Check out an item attached to the record to a patron, i.e. check out barcode 39999000010190 to your logged in user
3. Go to the Detail view for this record.
4. Edit another item attached to the record and give it a not for loan status, i.e. edit barcode 39999000010213 and set it to Not for loan
5. Click the Add to list button above the record. Add the record to an existing list, or create a new one and Save.
6. Go to the Lists module in the staff interface and view the contents of the list you just added your record to.
7. Confirm you see accurate Availability information in the list results, showing available items, unavailable items, and items available for reference.
8. Do a catalogue search that will return your record in the results. Confirm the Availability information does not show in the main results portion underneath the title, it should only show in the rightmost column as normal.

Sponsored-by: Pymble Ladies' College
Comment 7 OpenFifth Sandboxes 2025-12-16 21:54:30 UTC
Created attachment 190562 [details] [review]
Bug 32419: Add XSLT for intranet lists which shows item availability

This patch adds a new XSLT to apply to the lists view on the staff interface, used by the XSLTListsDisplay system preference.

It is almost a copy of MARC21slim2intranetResults.xsl, used by the XSLTResultsDisplay system preference, except it includes code to also display item availability. Item availability is already shown on the lists view on the OPAC, so this adds that functionality to the staff interface.

To test:

0. Restart services and compile CSS for changes to take effect, in KTD this looks like: yarn build && restart_all
1. Create or use a biblio record with multiple items, for example biblionumber 235.
2. Check out an item attached to the record to a patron, i.e. check out barcode 39999000010190 to your logged in user
3. Go to the Detail view for this record.
4. Edit another item attached to the record and give it a not for loan status, i.e. edit barcode 39999000010213 and set it to Not for loan
5. Click the Add to list button above the record. Add the record to an existing list, or create a new one and Save.
6. Go to the Lists module in the staff interface and view the contents of the list you just added your record to.
7. Confirm you see accurate Availability information in the list results, showing available items, unavailable items, and items available for reference.
8. Do a catalogue search that will return your record in the results. Confirm the Availability information does not show in the main results portion underneath the title, it should only show in the rightmost column as normal.

Sponsored-by: Pymble Ladies' College
Signed-off-by: Hayley Cheng <hacheng@pymblelc.nsw.edu.au>