Bug 23583 - Handle OpacHiddenItems with yaml_preference
Summary: Handle OpacHiddenItems with yaml_preference
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Tomás Cohen Arazi (tcohen)
QA Contact: Katrin Fischer
URL:
Keywords:
: 28359 (view as bug list)
Depends on: 27673
Blocks: 24403
  Show dependency treegraph
 
Reported: 2019-09-10 16:45 UTC by Tomás Cohen Arazi (tcohen)
Modified: 2022-06-06 20:24 UTC (History)
3 users (show)

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


Attachments
Bug 23583: Handle OpacHiddenItems with yaml_preference (5.30 KB, patch)
2021-04-06 14:40 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 23583: Handle OpacHiddenItems with yaml_preference (5.34 KB, patch)
2021-04-06 20:44 UTC, David Nind
Details | Diff | Splinter Review
Bug 23583: Handle OpacHiddenItems with yaml_preference (5.40 KB, patch)
2021-04-17 23:27 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi (tcohen) 2019-09-10 16:45:39 UTC

    
Comment 1 Tomás Cohen Arazi (tcohen) 2021-04-06 14:40:22 UTC
Created attachment 119222 [details] [review]
Bug 23583: Handle OpacHiddenItems with yaml_preference

This patch makes all places in Koha that rely on OpacHiddenItems
actually use C4::Context->yaml_preference instead of manually calling
the YAML libraries and handling it.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Items* \
           t/db_dependent/Koha/Item* \
           t/db_dependent/Koha/Filter/EmbedItems.t
=> SUCCESS: Tests pass!
3. Try hiding things with opac-ISBDdetail.pl and opac-search.pl
=> SUCCESS: Things work the same!
4. Sign off :-D
Comment 2 David Nind 2021-04-06 20:44:43 UTC
Created attachment 119246 [details] [review]
Bug 23583: Handle OpacHiddenItems with yaml_preference

This patch makes all places in Koha that rely on OpacHiddenItems
actually use C4::Context->yaml_preference instead of manually calling
the YAML libraries and handling it.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Items* \
           t/db_dependent/Koha/Item* \
           t/db_dependent/Koha/Filter/EmbedItems.t
=> SUCCESS: Tests pass!
3. Try hiding things with opac-ISBDdetail.pl and opac-search.pl
=> SUCCESS: Things work the same!
4. Sign off :-D

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2021-04-06 20:52:25 UTC
Testing notes:
- Added withdrawn: [1] to OpacHiddenItems
- Changed status of one item for a record with multiple items to Withdrawn
  . In OPAC the withdrawn item doesn't show in the search results, OPAC detail page or MARC view tab (the ISBD view doesn't show items before or after the patch is applied)
- Changed the status to withdrawn for a record that only has one item:
  . Doesn't show up in the OAPC search results
  . 404 message if you click on the OPAC view link in from the staff interface details page
- Ran tests before and after - all pass
Comment 4 Katrin Fischer 2021-04-17 23:27:55 UTC
Created attachment 119804 [details] [review]
Bug 23583: Handle OpacHiddenItems with yaml_preference

This patch makes all places in Koha that rely on OpacHiddenItems
actually use C4::Context->yaml_preference instead of manually calling
the YAML libraries and handling it.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Items* \
           t/db_dependent/Koha/Item* \
           t/db_dependent/Koha/Filter/EmbedItems.t
=> SUCCESS: Tests pass!
3. Try hiding things with opac-ISBDdetail.pl and opac-search.pl
=> SUCCESS: Things work the same!
4. Sign off :-D

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Jonathan Druart 2021-04-21 13:29:50 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 6 Fridolin Somers 2021-04-29 13:34:39 UTC
Depends on Bug 27673 not in 20.11.x
Comment 7 Tomás Cohen Arazi (tcohen) 2021-10-13 15:01:32 UTC
*** Bug 28359 has been marked as a duplicate of this bug. ***