Bug 22455 - Add Koha::Biblio::hidden_in_opac method
Summary: Add Koha::Biblio::hidden_in_opac method
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Testopia
URL:
Keywords:
Depends on: 22454
Blocks:
  Show dependency treegraph
 
Reported: 2019-03-05 13:59 UTC by Tomás Cohen Arazi
Modified: 2019-03-19 11:07 UTC (History)
7 users (show)

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


Attachments
Bug 22455: Unit tests (1.93 KB, patch)
2019-03-05 14:05 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 22455: Add Koha::Biblio::hidden_in_opac method (1.66 KB, patch)
2019-03-05 14:05 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 22455: Unit tests (2.02 KB, patch)
2019-03-12 09:07 UTC, Michal Denar
Details | Diff | Splinter Review
Bug 22455: Add Koha::Biblio::hidden_in_opac method (1.76 KB, patch)
2019-03-12 09:07 UTC, Michal Denar
Details | Diff | Splinter Review
Bug 22455: Unit tests (2.03 KB, patch)
2019-03-12 10:18 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 22455: Add Koha::Biblio::hidden_in_opac method (1.76 KB, patch)
2019-03-12 10:18 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-03-05 13:59:29 UTC
We need such a method to determine if a biblio needs to be hidden in OPAC. It should take the OpacHiddenItems hashref as (optional) parameter. The case for 'exceptions' is left out on purpose. This should be just calculated by the calling party.
Comment 1 Tomás Cohen Arazi 2019-03-05 14:05:01 UTC
Created attachment 86066 [details] [review]
Bug 22455: Unit tests
Comment 2 Tomás Cohen Arazi 2019-03-05 14:05:09 UTC
Created attachment 86067 [details] [review]
Bug 22455: Add Koha::Biblio::hidden_in_opac method

This patch adds a hidden_in_opac method that does the same calculation
done in places like opac-tags.pl. The condition that is checked is that
all items belonging to the biblio are hidden. This is the current
behaviour in the code.

To test:
- Apply this patches
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Biblio.t
=> SUCCESS: Tests pass!
Comment 3 Michal Denar 2019-03-12 09:07:04 UTC
Created attachment 86502 [details] [review]
Bug 22455: Unit tests

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 4 Michal Denar 2019-03-12 09:07:26 UTC
Created attachment 86503 [details] [review]
Bug 22455: Add Koha::Biblio::hidden_in_opac method

This patch adds a hidden_in_opac method that does the same calculation
done in places like opac-tags.pl. The condition that is checked is that
all items belonging to the biblio are hidden. This is the current
behaviour in the code.

To test:
- Apply this patches
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Biblio.t
=> SUCCESS: Tests pass!

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 5 Josef Moravec 2019-03-12 10:18:14 UTC
Created attachment 86511 [details] [review]
Bug 22455: Unit tests

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 6 Josef Moravec 2019-03-12 10:18:17 UTC
Created attachment 86512 [details] [review]
Bug 22455: Add Koha::Biblio::hidden_in_opac method

This patch adds a hidden_in_opac method that does the same calculation
done in places like opac-tags.pl. The condition that is checked is that
all items belonging to the biblio are hidden. This is the current
behaviour in the code.

To test:
- Apply this patches
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Biblio.t
=> SUCCESS: Tests pass!

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 7 Nick Clemens 2019-03-16 13:55:32 UTC
Awesome work all!

Pushed to master for 19.05
Comment 8 Martin Renvoize 2019-03-19 11:07:43 UTC
Enhancement will not be backported to 18.11.x series.