https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39337
--- Comment #6 from David Nind <[email protected]> --- Created attachment 201134 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201134&action=edit Bug 39337: Filter out suppressed OAI records in SQL Rather than fetching each biblio before choosing to suppress it, this patch performs this filtering in the initial SQL query that fetches the biblionumbers. Note: for queries including items, this additional filtering is performed in each of the three subqueries, necessitating three quasi-joins against biblio. If we were to hoist this filtering to the outer layer, we would also need to remove the LIMIT from each subquery so as to allow each of them to be fairly weighted. As the preceding comment implies keeping the subqueries separate has been beneficial for performance, I've elected not to hoist the WHERE. Test plan (specific URLs given for KTD, with thanks to David Cook): 1. Apply patch. 2. Navigate to http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=2 3. Set 942$n to "Yes" and save the record. 4. Disable the system preference "OpacSuppression", and ensure "OpacSuppressionByIPRange" is blank. 5a. Verify you can successfully access http://localhost:8080/cgi-bin/koha/oai.pl?verb=GetRecord&metadataPrefix=oai_dc&identifier=KOHA-OAI-TEST:2 5b. Verify KOHA-OAI-TEST-2 appears on http://localhost:8080/cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=oai_dc 6. Enable the system preference "OpacSuppression", and ensure "OpacSuppressionByIPRange" is blank. 7. Repeat steps 5a-5b, verifying that: - the OAI GetRecord page returns "There is no biblio record with this identifier". - the OAI ListRecords page does not show KOHA-OAI-TEST-2. Sponsored-by: Open Fifth Signed-off-by: David Nind <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ 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/
