Bug 22749 - Koha::Item->hidden_in_opac should consider hidelostitems syspref
Summary: Koha::Item->hidden_in_opac should consider hidelostitems syspref
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Josef Moravec
URL:
Keywords:
Depends on: 22454
Blocks:
  Show dependency treegraph
 
Reported: 2019-04-22 14:37 UTC by Tomás Cohen Arazi
Modified: 2019-04-26 14:53 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
19.05.00


Attachments
Bug 22749: Regression tests for Koha::Item->hidden_in_opac (2.03 KB, patch)
2019-04-22 15:06 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 22749: Make Koha::Item->hidden_in_opac respect hidelostitems (1.05 KB, patch)
2019-04-22 15:06 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 22749: Regression tests for Koha::Item->hidden_in_opac (2.07 KB, patch)
2019-04-22 16:00 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 22749: Regression tests for Koha::Item->hidden_in_opac (2.07 KB, patch)
2019-04-22 16:02 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 22749: Make Koha::Item->hidden_in_opac respect hidelostitems (1.10 KB, patch)
2019-04-22 16:02 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 22749: Regression tests for Koha::Item->hidden_in_opac (2.13 KB, patch)
2019-04-23 08:13 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 22749: Make Koha::Item->hidden_in_opac respect hidelostitems (1.15 KB, patch)
2019-04-23 08:14 UTC, Josef Moravec
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 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 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.