[Bug 29484] New: ListSets doesn't return noSetHierarchy when appropriate
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29484 Bug ID: 29484 Summary: ListSets doesn't return noSetHierarchy when appropriate Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Web services Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org To reproduce: $ cpanm HTTP::OAIPMH::Validator $ PERL5LIB=/root/.local/share/.cpan/build/HTTP-OAIPMH-Validator-1.06-0/lib perl /root/.local/share/.cpan/build/HTTP-OAIPMH-Validator-1.06-0/examples/oaipmh-validator.pl http://kohadev.myDNSname.org:8080/cgi-bin/koha/oai.pl => FAIL: There are several errors, some reported under the bug 21102 umbrella => FAIL: This error wasn't reported before: FAIL: Failed to extract any setSpec elements from ListSets but did not find an exception message. If sets are not supported by the repository then the ListSets response must be the noSetHierarchy error. See <http://www.openarchives.org/OAI/2.0/openarchivesprotocol.htm#ListSets>. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29484 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |21102 Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21102 [Bug 21102] OAI-PMH specification conformance [UMBRELLA] -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29484 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29484 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 127637 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127637&action=edit Bug 29484: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29484 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 127638 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127638&action=edit Bug 29484: Make ListSets return noSetHierarchy when no sets defined This simple patch makes our OAI-PMH server return the appropriate error code when no sets are defined. To test: 1. Apply the regression tests 2. Run: $ kshell k$ t/db_dependent/OAI/Server.t => FAIL: Tests fail. Boo! 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! YAY! 5. Sign off :-D Bonus: you can check with the tool mentioned on the bug report, that the error is gone. No sets need to be defined. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29484 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |21102 Depends on|21102 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21102 [Bug 21102] OAI-PMH specification conformance [UMBRELLA] -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29484 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29484 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #127637|0 |1 is obsolete| | --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 127995 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127995&action=edit Bug 29484: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29484 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #127638|0 |1 is obsolete| | --- Comment #4 from David Nind <david@davidnind.com> --- Created attachment 127996 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127996&action=edit Bug 29484: Make ListSets return noSetHierarchy when no sets defined This simple patch makes our OAI-PMH server return the appropriate error code when no sets are defined. To test: 1. Apply the regression tests 2. Run: $ kshell k$ t/db_dependent/OAI/Server.t => FAIL: Tests fail. Boo! 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! YAY! 5. Sign off :-D Bonus: you can check with the tool mentioned on the bug report, that the error is gone. No sets need to be defined. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29484 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com --- Comment #5 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- I will amend the patch with - ) unless scalar @{$sets} > 0; + ) unless @$sets; -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29484 --- Comment #6 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- $ cpanm HTTP::OAIPMH::Validator This fails for me -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29484 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29484 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #127995|0 |1 is obsolete| | Attachment #127996|0 |1 is obsolete| | --- Comment #7 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 128169 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128169&action=edit Bug 29484: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29484 --- Comment #8 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 128170 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128170&action=edit Bug 29484: Make ListSets return noSetHierarchy when no sets defined This simple patch makes our OAI-PMH server return the appropriate error code when no sets are defined. To test: 1. Apply the regression tests 2. Run: $ kshell k$ t/db_dependent/OAI/Server.t => FAIL: Tests fail. Boo! 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! YAY! 5. Sign off :-D Bonus: you can check with the tool mentioned on the bug report, that the error is gone. No sets need to be defined. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> JD amended patch - ) unless scalar @{$sets} > 0; + ) unless @$sets; Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29484 --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #5)
I will amend the patch with - ) unless scalar @{$sets} > 0; + ) unless @$sets;
Why? I prefer what I wrote and have been adding it all the time. If it makes more sense to do it your way, we should make sure it is in the guidelines. I still prefer to have the reader understand we are talking about the list size. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29484 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128170|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29484 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128169|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29484 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #127996|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29484 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #127995|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29484 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Signed Off --- Comment #10 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Tomás Cohen Arazi from comment #9)
(In reply to Jonathan Druart from comment #5)
I will amend the patch with - ) unless scalar @{$sets} > 0; + ) unless @$sets;
Why? I prefer what I wrote and have been adding it all the time. If it makes more sense to do it your way, we should make sure it is in the guidelines. I still prefer to have the reader understand we are talking about the list size.
ok, reverted. @$sets does exactly what you are describing, just less verbose. Nevermind. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29484 --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #10)
(In reply to Tomás Cohen Arazi from comment #9)
(In reply to Jonathan Druart from comment #5)
I will amend the patch with - ) unless scalar @{$sets} > 0; + ) unless @$sets;
Why? I prefer what I wrote and have been adding it all the time. If it makes more sense to do it your way, we should make sure it is in the guidelines. I still prefer to have the reader understand we are talking about the list size.
ok, reverted.
@$sets does exactly what you are describing, just less verbose. Nevermind.
I like your approach, is more Perl-ish, and we should adopt it as a guideline. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29484 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128169|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29484 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128170|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29484 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |jonathan.druart+koha@gmail. |y.org |com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29484 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29484 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #127995|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29484 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #127996|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29484 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |22.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29484 --- Comment #12 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to master for 22.05, thanks to everybody involved 🦄 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29484 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This fixes Koha's OAI-PMH release notes| |server so that it returns | |the appropriate error code | |when no sets are defined. CC| |david@davidnind.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29484 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable CC| |kyle@bywatersolutions.com Version(s)|22.05.00 |22.05.00,21.11.01 released in| | --- Comment #13 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to 21.11.x for 21.11.01 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29484 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable CC| |andrew@bywatersolutions.com Version(s)|22.05.00,21.11.01 |22.05.00,21.11.01,21.05.08 released in| | --- Comment #14 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Pushed to 21.05.x for 21.05.08 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29484 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |victor@tuxayo.net Status|Pushed to oldstable |RESOLVED --- Comment #15 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (20.11.x). Feel free to ask if it's needed. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org