Bug 22749

Summary: Koha::Item->hidden_in_opac should consider hidelostitems syspref
Product: Koha Reporter: Tomás Cohen Arazi <tomascohen>
Component: Architecture, internals, and plumbingAssignee: Tomás Cohen Arazi <tomascohen>
Status: CLOSED FIXED QA Contact: Josef Moravec <josef.moravec>
Severity: normal    
Priority: P5 - low CC: josef.moravec, kyle, martin.renvoize, nick, tomascohen
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8619
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.05.00
Bug Depends on: 22454    
Bug Blocks:    
Attachments: Bug 22749: Regression tests for Koha::Item->hidden_in_opac
Bug 22749: Make Koha::Item->hidden_in_opac respect hidelostitems
Bug 22749: Regression tests for Koha::Item->hidden_in_opac
Bug 22749: Regression tests for Koha::Item->hidden_in_opac
Bug 22749: Make Koha::Item->hidden_in_opac respect hidelostitems
Bug 22749: Regression tests for Koha::Item->hidden_in_opac
Bug 22749: Make Koha::Item->hidden_in_opac respect hidelostitems

Description Tomás Cohen Arazi 2019-04-22 14:37:31 UTC

    
Comment 1 Tomás Cohen Arazi 2019-04-22 15:06:55 UTC
Created attachment 88384 [details] [review]
Bug 22749: Regression tests for Koha::Item->hidden_in_opac

This patch introduces regression tests for Koha::Item->hidden_in_opac to
verify it is not considering the hidelostitems syspref when determining
if an item should be hidden (per policy) in the OPAC.

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Item.t
=> FAIL: Tests fail!
Comment 2 Tomás Cohen Arazi 2019-04-22 15:06:59 UTC
Created attachment 88385 [details] [review]
Bug 22749: Make Koha::Item->hidden_in_opac respect hidelostitems

This patch makes Koha::Item->hidden_in_opac take hidelostitems into
account when performing the calculation.

To test:
- Apply the regression tests patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Item.t
=> FAIL: Tests fail because the code doesn't (yet) care about the
syspref
- Apply this patch
- Run:
 k$ prove t/db_dependent/Koha/Item.t
=> SUCCESS: Tests pass!
- Sign off :-D
Comment 3 Liz Rea 2019-04-22 16:00:22 UTC
Created attachment 88387 [details] [review]
Bug 22749: Regression tests for Koha::Item->hidden_in_opac

This patch introduces regression tests for Koha::Item->hidden_in_opac to
verify it is not considering the hidelostitems syspref when determining
if an item should be hidden (per policy) in the OPAC.

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Item.t
=> FAIL: Tests fail!

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Comment 4 Liz Rea 2019-04-22 16:02:35 UTC
Created attachment 88388 [details] [review]
Bug 22749: Regression tests for Koha::Item->hidden_in_opac

This patch introduces regression tests for Koha::Item->hidden_in_opac to
verify it is not considering the hidelostitems syspref when determining
if an item should be hidden (per policy) in the OPAC.

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Item.t
=> FAIL: Tests fail!

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Comment 5 Liz Rea 2019-04-22 16:02:42 UTC
Created attachment 88389 [details] [review]
Bug 22749: Make Koha::Item->hidden_in_opac respect hidelostitems

This patch makes Koha::Item->hidden_in_opac take hidelostitems into
account when performing the calculation.

To test:
- Apply the regression tests patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Item.t
=> FAIL: Tests fail because the code doesn't (yet) care about the
syspref
- Apply this patch
- Run:
 k$ prove t/db_dependent/Koha/Item.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Comment 6 Josef Moravec 2019-04-23 08:13:58 UTC
Created attachment 88404 [details] [review]
Bug 22749: Regression tests for Koha::Item->hidden_in_opac

This patch introduces regression tests for Koha::Item->hidden_in_opac to
verify it is not considering the hidelostitems syspref when determining
if an item should be hidden (per policy) in the OPAC.

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Item.t
=> FAIL: Tests fail!

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 7 Josef Moravec 2019-04-23 08:14:01 UTC
Created attachment 88405 [details] [review]
Bug 22749: Make Koha::Item->hidden_in_opac respect hidelostitems

This patch makes Koha::Item->hidden_in_opac take hidelostitems into
account when performing the calculation.

To test:
- Apply the regression tests patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Item.t
=> FAIL: Tests fail because the code doesn't (yet) care about the
syspref
- Apply this patch
- Run:
 k$ prove t/db_dependent/Koha/Item.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 8 Nick Clemens (kidclamp) 2019-04-24 11:49:24 UTC
Awesome work all!

Pushed to master for 19.05
Comment 9 Martin Renvoize 2019-04-26 14:53:53 UTC
Depends on bug not in 18.11.x series.