| Summary: | Show availability in list view in staff interface | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Caroline Cyr La Rose <caroline.cyr-la-rose> |
| Component: | Staff interface | Assignee: | Aleisha Amohia <aleisha> |
| Status: | Failed QA --- | QA Contact: | Katrin Fischer <katrin.fischer> |
| Severity: | enhancement | ||
| Priority: | P5 - low | CC: | aleisha, dcook, gmcharlt, hacheng |
| Version: | Main | ||
| 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
I think once we've got more APIs for this it'll be easier to make changes like this Created attachment 188259 [details] [review] Bug 32419: WIP 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 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? (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! 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 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> 1) QA checks - passing
2) Code review
a) Maintenance (to be discussed)
This adds separate file for the result list of Lists, where it was before using the standard result list XSLT. The result list displays the item availabiltiy as well. I am not sure yet why the change is required, can you explain?
I believe we should try and avoid copying the XSLT code in full. Maybe a more clever solution could be found using includes or similar? We are quite bad at maintaining display code in multiple places.
b) UNIMARC (blocker)
Also: it's missing the equivalent file for UNIMARC. This will break UNIMARC:
- # Lists default to *Results.xslt
$htdocs = C4::Context->config('intrahtdocs');
$theme = C4::Context->preference("template");
- $xslfile = C4::Context->preference('marcflavour') . "slim2intranetResults.xsl";
+ $xslfile = C4::Context->preference('marcflavour') . "slim2intranetLists.xsl";
(In reply to Katrin Fischer from comment #8) > 1) QA checks - passing > 2) Code review > > a) Maintenance (to be discussed) > > This adds separate file for the result list of Lists, where it was before > using the standard result list XSLT. The result list displays the item > availabiltiy as well. I am not sure yet why the change is required, can you > explain? The code for item availability in the staff interface's search results sits outside of the XSLT. Instead it is populated programmatically inside koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt . That's why I couldn't simply add availability info to the current results XSLT as we'd end up with duplicate information on the screen. > > I believe we should try and avoid copying the XSLT code in full. Maybe a > more clever solution could be found using includes or similar? We are quite > bad at maintaining display code in multiple places. It's true it would be nice for some of these sections to live as includes within MARC21slimUtils.xsl and do a full refactor down the line, but this bug report is about making a staff interface display match an equivalent OPAC display, so that refactoring would be out of scope for this particular enhancement. > > b) UNIMARC (blocker) > > Also: it's missing the equivalent file for UNIMARC. This will break UNIMARC: > > - # Lists default to *Results.xslt > $htdocs = C4::Context->config('intrahtdocs'); > $theme = C4::Context->preference("template"); > - $xslfile = C4::Context->preference('marcflavour') . > "slim2intranetResults.xsl"; > + $xslfile = C4::Context->preference('marcflavour') . > "slim2intranetLists.xsl"; I'll need to talk to the sponsoring library about this. Aleisha I can see why the change makes sense, but I think it's fair to talk about technical debt and future maintenance as part of a development as this will influence future costs of every enhancement to these views for other sponsoring libraries. The library are investigating whether an alternate approach will suffice which should be more maintainable. Will update here when a decision is made. |