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.
Created attachment 86066 [details] [review] Bug 22455: Unit tests
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!
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>
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>
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>
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>
Awesome work all! Pushed to master for 19.05
Enhancement will not be backported to 18.11.x series.