Bug 30244 - Hide lost items not respected in OPAC results XSLT
Summary: Hide lost items not respected in OPAC results XSLT
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Nick Clemens
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 24403
  Show dependency treegraph
 
Reported: 2022-03-07 19:52 UTC by Nick Clemens
Modified: 2023-12-28 20:43 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00,21.11.05


Attachments
Bug 30244: Include lost items in list of hidden items (1.47 KB, patch)
2022-03-11 14:28 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 30244: Include lost items in list of hidden items (1.54 KB, patch)
2022-03-11 15:04 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 30244: Include lost items in list of hidden items (1.60 KB, patch)
2022-03-24 17:05 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 Nick Clemens 2022-03-07 19:52:44 UTC
To recreate:
1 - Set systempreference hidelostitems to "Don't show"
2 - Edit a record to set one item as lost and one as available
3 - Perform an OPAC search that returns the record above
4 - Note that the lost item shows in availability line
5 - Click on the record - note the lost item does not show on details
Comment 1 Nick Clemens 2022-03-11 14:28:24 UTC
Created attachment 131588 [details] [review]
Bug 30244: Include lost items in list of hidden items

When building search results for XSLT we generate and pass a list of hidden
itemnumbers.

We do skip the lost items in our parsing, however, we neglect to add the itemnumber
to the hidden list

This patch simply adds the lost itemnumbers to the list

There is more work to be done here to simpliofy this process, however, this patch resolves
the issue and can be backported to stable branches

To test:
1 - Set systempreference hidelostitems to "Don't show"
2 - Edit a record to set one item as lost and one as available
3 - Perform an OPAC search that returns the record above
4 - Note that the lost item shows in availability line
5 - Click on the record - note the lost item does not show on details
6 - Apply patch
7 - Reload search results
8 - Lost itme no longer displays
Comment 2 Andrew Fuerste-Henry 2022-03-11 15:04:45 UTC
Created attachment 131591 [details] [review]
Bug 30244: Include lost items in list of hidden items

When building search results for XSLT we generate and pass a list of hidden
itemnumbers.

We do skip the lost items in our parsing, however, we neglect to add the itemnumber
to the hidden list

This patch simply adds the lost itemnumbers to the list

There is more work to be done here to simpliofy this process, however, this patch resolves
the issue and can be backported to stable branches

To test:
1 - Set systempreference hidelostitems to "Don't show"
2 - Edit a record to set one item as lost and one as available
3 - Perform an OPAC search that returns the record above
4 - Note that the lost item shows in availability line
5 - Click on the record - note the lost item does not show on details
6 - Apply patch
7 - Reload search results
8 - Lost itme no longer displays

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 3 Martin Renvoize 2022-03-24 17:05:07 UTC
Created attachment 132193 [details] [review]
Bug 30244: Include lost items in list of hidden items

When building search results for XSLT we generate and pass a list of hidden
itemnumbers.

We do skip the lost items in our parsing, however, we neglect to add the itemnumber
to the hidden list

This patch simply adds the lost itemnumbers to the list

There is more work to be done here to simpliofy this process, however, this patch resolves
the issue and can be backported to stable branches

To test:
1 - Set systempreference hidelostitems to "Don't show"
2 - Edit a record to set one item as lost and one as available
3 - Perform an OPAC search that returns the record above
4 - Note that the lost item shows in availability line
5 - Click on the record - note the lost item does not show on details
6 - Apply patch
7 - Reload search results
8 - Lost itme no longer displays

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 4 Martin Renvoize 2022-03-24 17:05:42 UTC
Confirmed this resolves the issue and agree we should tidy up a bit in a future bug but keep this as a simple backport.

Passing QA
Comment 5 Fridolin Somers 2022-03-25 21:02:10 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 6 Kyle M Hall 2022-04-01 10:38:26 UTC
Pushed to 21.11.x for 21.11.05