Bug 5984 - OPAC: Hide items using a systempreferces to determine what to hide
Summary: OPAC: Hide items using a systempreferces to determine what to hide
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: 3.4
Hardware: All All
: PATCH-Sent (DO NOT USE) enhancement (vote)
Assignee: Paul Poulain
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks: 5584
  Show dependency treegraph
 
Reported: 2011-03-29 02:39 UTC by Chris Cormack
Modified: 2013-12-05 20:04 UTC (History)
7 users (show)

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


Attachments
Proposed Patch (10.41 KB, patch)
2011-03-29 02:50 UTC, Chris Cormack
Details | Diff | Splinter Review
Followup patch (2.84 KB, patch)
2011-03-29 02:54 UTC, Chris Cormack
Details | Diff | Splinter Review
Another follow up (7.74 KB, patch)
2011-03-29 03:02 UTC, Chris Cormack
Details | Diff | Splinter Review
Adds the syspref in opac.pref (1.19 KB, patch)
2011-04-04 15:40 UTC, Matthias Meusburger
Details | Diff | Splinter Review
Proposed Patch (10.93 KB, patch)
2011-04-05 14:01 UTC, Matthias Meusburger
Details | Diff | Splinter Review
Followup patch (4.10 KB, patch)
2011-04-05 14:03 UTC, Matthias Meusburger
Details | Diff | Splinter Review
Another follow up (8.99 KB, patch)
2011-04-05 14:04 UTC, Matthias Meusburger
Details | Diff | Splinter Review
Adds the syspref in opac.pref (1.18 KB, patch)
2011-04-05 14:05 UTC, Matthias Meusburger
Details | Diff | Splinter Review
Proposed Patch (10.54 KB, patch)
2011-04-05 14:55 UTC, Matthias Meusburger
Details | Diff | Splinter Review
Followup patch (3.14 KB, patch)
2011-04-05 14:56 UTC, Matthias Meusburger
Details | Diff | Splinter Review
Another follow up (8.03 KB, patch)
2011-04-05 14:57 UTC, Matthias Meusburger
Details | Diff | Splinter Review
1st patch signed off (10.62 KB, patch)
2011-04-05 15:09 UTC, claire.hernandez@biblibre.com
Details | Diff | Splinter Review
2nd patch signed off (3.22 KB, patch)
2011-04-05 15:10 UTC, claire.hernandez@biblibre.com
Details | Diff | Splinter Review
3rd patch signed off (1.26 KB, patch)
2011-04-05 15:11 UTC, claire.hernandez@biblibre.com
Details | Diff | Splinter Review
4th patch signed off (8.11 KB, patch)
2011-04-05 15:11 UTC, claire.hernandez@biblibre.com
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Cormack 2011-03-29 02:39:26 UTC

    
Comment 1 Chris Cormack 2011-03-29 02:48:46 UTC
This needs a follow up patch to set the values in the syspref.sql file (and other language ones)
Comment 2 Chris Cormack 2011-03-29 02:50:50 UTC Comment hidden (obsolete)
Comment 3 Chris Cormack 2011-03-29 02:54:29 UTC Comment hidden (obsolete)
Comment 4 Chris Cormack 2011-03-29 03:02:23 UTC Comment hidden (obsolete)
Comment 5 Nicole C. Engard 2011-03-29 11:59:58 UTC
I'm not seeing the *.pref file edited in any of these patches which means no one can set the preference.
Comment 6 Jane Wagner 2011-03-29 12:19:16 UTC
What is the purpose of this feature?  Is it to hide all items except those belonging to the patron's branch?  I've tried reading the patch files but I'm not clear on it.
Comment 7 Matthias Meusburger 2011-04-04 13:35:03 UTC
The purpose of this feature is to give the ability to define custom rules to hide items. The rules are based on the items table fields. The user can define values that makes the item hidden. If at least one of the defined rules match, the item is hidden.

Some examples can ben found here : docs/opac/OpacHiddenItems.txt
Comment 8 Jane Wagner 2011-04-04 14:35:24 UTC
I just updated my current head server, but I do not see a docs/opac/OpacHiddenItems.txt file.  The only thing under docs is history.txt.  Can you attach this file to the bugzilla entry?
Comment 9 Magnus Enger 2011-04-04 15:19:21 UTC
Two problems, already mentioned: 

1. OpacHiddenItems is not added to any .pref file

2. OpacHiddenItems.txt is not in any of the patches (but there is a file here: http://git.biblibre.com/?p=koha;a=blob;f=docs/opac/OpacHiddenItems.txt)

Marking as "Failed QA".
Comment 10 Matthias Meusburger 2011-04-04 15:21:49 UTC
The OpacHiddenItems.txt is in the "Proposed patch" attachment. The .pref file is still required though.
Comment 11 Matthias Meusburger 2011-04-04 15:40:58 UTC Comment hidden (obsolete)
Comment 12 Matthias Meusburger 2011-04-05 14:01:26 UTC Comment hidden (obsolete)
Comment 13 Matthias Meusburger 2011-04-05 14:03:22 UTC Comment hidden (obsolete)
Comment 14 Matthias Meusburger 2011-04-05 14:04:27 UTC Comment hidden (obsolete)
Comment 15 Matthias Meusburger 2011-04-05 14:05:09 UTC
Created attachment 3694 [details] [review]
Adds the syspref in opac.pref
Comment 16 Matthias Meusburger 2011-04-05 14:06:24 UTC
The attached patches did not apply. I fixed them so they apply and updated the attachments.
Comment 17 Matthias Meusburger 2011-04-05 14:55:35 UTC
Created attachment 3700 [details] [review]
Proposed Patch

Previous version contained merge leftovers
Comment 18 Matthias Meusburger 2011-04-05 14:56:50 UTC
Created attachment 3701 [details] [review]
Followup patch

Previous version contained merge leftovers
Comment 19 Matthias Meusburger 2011-04-05 14:57:29 UTC
Created attachment 3702 [details] [review]
Another follow up

Previous version contained merge leftovers
Comment 20 claire.hernandez@biblibre.com 2011-04-05 15:09:38 UTC
Created attachment 3703 [details] [review]
1st patch signed off
Comment 21 claire.hernandez@biblibre.com 2011-04-05 15:10:02 UTC
Created attachment 3704 [details] [review]
2nd patch signed off
Comment 22 claire.hernandez@biblibre.com 2011-04-05 15:11:10 UTC
Created attachment 3705 [details] [review]
3rd patch signed off
Comment 23 claire.hernandez@biblibre.com 2011-04-05 15:11:33 UTC
Created attachment 3706 [details] [review]
4th patch signed off
Comment 24 claire.hernandez@biblibre.com 2011-04-05 15:13:22 UTC
Tests done:
- Display items of a biblio
- filter items with OpacHiddenItems = itemcallnumber: [123]
- Item with callnumber 123 disappear
Comment 25 Chris Cormack 2011-04-10 07:44:54 UTC
Pushed, please test
Comment 26 lculber 2011-06-13 16:44:43 UTC
We have found that while OpacHiddenItems seems to works in the opac-detail.pl in 3.4.1, the "hidden items" do appear once "specific copy" is selected on opac-reserve.pl
Comment 27 Chris Cormack 2011-06-13 21:39:52 UTC
Thanks for testing Linda, I suggest we leave this bug open until someone has a chance to do a follow up for the reserve page.
Comment 28 Ian Walls 2011-11-19 15:22:04 UTC
I'm not sure I agree with the approach this feature takes; specifying a large and complex set of criteria for bulk hiding of items makes for a very difficult feature to debug (as we've seen lately with this feature being broken).

Wouldn't it make more sense to just add a "hidden" or "visibility" field to the items table?  Then any item could be masked in the OPAC (or staff client).  If we took in more than just 0 or 1, then we could have levels of invisibility (this would be good for biblio-level suppression, as well).  For example, anonymous views can see hidden = 0, logged in users gain hidden = 1, staff can see hidden = 2, etc.

We've got a bulk item editor, so making these changes in bulk would be pretty simple; we'd just need to identify the criteria.  A small ergonomic change to the Reports interface to allow the direct pushing of a report to the bulk editor would make these convenient and seamless.
Comment 29 Paul Poulain 2011-11-23 10:45:52 UTC
Ian, seems this patch has been pushed. Are you proposing to revert it ?
Comment 30 lculber 2011-11-23 13:52:46 UTC
This feature has been working for us all along, and we'd hate to lose it. I have no idea why it works for us and no one else but it does, and it's still working in our test 3.6. Ours is like this:
itype: [07, 10]
location: [STAFF, ISO]
Comment 31 lculber 2011-11-23 13:54:42 UTC
This feature has been working for us all along, and we'd hate to lose it. I have no idea why it works for us and no one else but it does, and it's still working in our test 3.6. Ours is like this:
itype: [07, 10]
location: [STAFF, ISO]
Comment 32 Jared Camins-Esakov 2012-12-31 00:02:31 UTC
There have been no further reports of problems so I am marking this bug resolved.