Summary: | Fix opac-MARCdetail.pl partial hides | ||
---|---|---|---|
Product: | Koha | Reporter: | Mark Tompsett <mtompset> |
Component: | OPAC | Assignee: | Mark Tompsett <mtompset> |
Status: | CLOSED FIXED | QA Contact: | Jonathan Druart <jonathan.druart> |
Severity: | normal | ||
Priority: | P5 - low | CC: | gmcharlt, jonathan.druart |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10872 http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10584 |
||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 10584 | ||
Bug Blocks: | |||
Attachments: |
Bug 10876 - MARC view displays what should be hidden
Bug 10876 - Fix opac-MARCdetail.pl partial hides Fix opac-MARCdetail.pl partial hides Bug 10876 - Fix opac-MARCdetail.pl partial hides Bug 10876 - Fix opac-MARCdetail.pl partial hides |
Description
Mark Tompsett
2013-09-11 12:57:34 UTC
Created attachment 20985 [details] [review] Bug 10876 - MARC view displays what should be hidden The opac/opac-MARCdetail.pl file is what is viewed when "MARC view" is clicked while viewing a specific search result. Items hidden on opac/opac-detail.pl based on OpacHiddenItems are shown! This should not happen. I believe this bug goes back several versions, not just master. While coding this, a lack of use or require in C4::Items was discovered. See bug 10872. By adding calls to GetItemsInfo and GetHiddenItems, a filter on the items is placed. As this is processing MARC data, GetMarcFromKohaField was used to properly determine what the item number (952$9) is. I tried to fix the conflict but the behavior is not what you described. I hadn't gotten to fixing this one yet. Basically, this adds a next if check into a loop that builds the %this_row stuff, and would require bug 10872 and 10584 to be applied. I'll be fixing this up shortly. Created attachment 21079 [details] [review] Bug 10876 - Fix opac-MARCdetail.pl partial hides When OpacHiddenItems is used to hide some, but not all of the items for a biblio, then the opac-MARCdetail page displayed all the items, rather than just the ones intended to be visible. By determining the tag and subtag for items.itemnumber, the loop which builds the big array can be filtered to exclude records that should be hidden. Created attachment 21082 [details] [review] Fix opac-MARCdetail.pl partial hides Test Plan ========= 1) Find a biblio with multiple items. (e.g. a book with multiple branches) 2) Look it up in OPAC 3) View the details. 4) Normal view and MARC view should have the identical number of items. (Normal view: http://..../opac-detail.pl?biblionumber=#####) (MARC view: http://..../opac-MARCdetail.pl?biblionumber=#####) 5) In the staff client, set the OpacHiddenItems system preference to hide some of the data. (e.g. homebranch: [BRANCH2HIDE]) NOTE: if your multiple items are all the same branch, find another distinguishing feature to hide on. The goal is to hide some but not all items for this biblio. 5) Refresh the OPAC 6) Some of the details should be hidden now in Normal view, but not MARC view. 7) Click the MARC view. 8) All the items are showing. 9) Apply patches from 10872, 10584 10) Apply this patch 11) Refresh the OPAC 12) The MARC view should now only show the same things the normal view shows. (Normal view: http://..../opac-detail.pl?biblionumber=#####) (MARC view: http://..../opac-MARCdetail.pl?biblionumber=#####) Created attachment 21122 [details] [review] Bug 10876 - Fix opac-MARCdetail.pl partial hides When OpacHiddenItems is used to hide some, but not all of the items for a biblio, then the opac-MARCdetail page displayed all the items, rather than just the ones intended to be visible. By determining the tag and subtag for items.itemnumber, the loop which builds the big array can be filtered to exclude records that should be hidden. Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> Works as expected, passes koha-qa also. Created attachment 21135 [details] [review] Bug 10876 - Fix opac-MARCdetail.pl partial hides When OpacHiddenItems is used to hide some, but not all of the items for a biblio, then the opac-MARCdetail page displayed all the items, rather than just the ones intended to be visible. By determining the tag and subtag for items.itemnumber, the loop which builds the big array can be filtered to exclude records that should be hidden. Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> Works as expected, passes koha-qa also. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Pushed to master. Thanks, Mark! *** Bug 10194 has been marked as a duplicate of this bug. *** |