https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31161

Jake Deery <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #170280|0                           |1
        is obsolete|                            |

--- Comment #57 from Jake Deery <[email protected]> ---
Created attachment 170353
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170353&action=edit
Bug 31161: Suppress OAI records when all items hidden by OpacHiddenItems

This patch set adds an option to Koha::Metadata::Record to suppress a record if
all items are
hidden. This option is only enabled by OAI and only when 
OpacHiddenItemsHidesRecord is enabled.

This test plan assumes KTD default data
To setup:

edit/create /etc/koha/sites/kohadev/oai.conf with content below:
format:
  marcxml:
    metadataPrefix: marcxml
    metadataNamespace: http://www.loc.gov/MARC21/slim
http://www.loc.gov/standards/marcxml/schema/MARC21slim
    schema: http://www.loc.gov/MARC21/slim
http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd
    include_items: 1

Set sysprefs:
OAI-PMH: Enable
OAI-PMH:ConfFile: /etc/koha/sites/kohadev/oai.conf
OAI-PMH:AutoUpdateSets: Enable
OAI-PMH:AutoUpdateSetsEmbedItemData: Enabled

OpacHiddenItems:
itype: [BK]
OpacHiddenItemsHidesRecord: Hide

Adminsitration->OAI set configuration->New set
Choose anything for setSpec and setName
On new set: Actrion->define mappings
Field: 942
Subfield: c
Operator: is equal to
Value: MU

To test:
1 - Set above, do not apply patch, restart_all
2 - Visit:
http://localhost:8080/cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=marcxml
3 - Confirm record 1 is visible wit no items (or anothe record that has BK
itemtypes only)
4 - perl misc/migration_tools/build_oai_sets.pl -r -v -i
5 - Confirm 11 records in set created above (or correct number for your site)
6 - Apply patches, restart_all
7 - Repeat 2, note "Results fetched" is 43-50, count is off because of hidden
records
8 - Confirm record 1 and many others not shown
9 - Confirm 'Show more' works
10 - Repeat 4, still 11
11 - Find a record with record type music, say 315
12 - Edit all items and change type to BK - Books
13 - Repeat 4 - now 10 records
14 - Set pref OpacHiddenItemsHidesRecord: Don't hide
15 - Repeat 2 and 4 and confirm results as before patch

Signed-off-by: Jake Deery <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to