[Bug 23696] New: build_oai_sets.pl should take biblios from deletedbiblio_metadata too
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23696 Bug ID: 23696 Summary: build_oai_sets.pl should take biblios from deletedbiblio_metadata too Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: josef.moravec@gmail.com QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23696 --- Comment #1 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 93229 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93229&action=edit Bug 23696: take deleted biblios into account when building oai sets Test plan: 0) do not apply the patch 1) set up OAI and create at least one set 2) run build_oai_sets.pl 3) remember/write down number of records added 4) delete a biblio, the is included in set 5) run buid_oai_sets.pl again 6) the set is 1 record smaller 7) apply the patch 8) run build_oai_sets.pl 9) the number of record should be the same as in 3) -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23696 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |josef.moravec@gmail.com |ity.org | CC| |black23@gmail.com, | |rbit@rbit.cz --- Comment #2 from Josef Moravec <josef.moravec@gmail.com> --- 1 -- 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=23696 Michal Denar <black23@gmail.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=23696 Michal Denar <black23@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #93229|0 |1 is obsolete| | --- Comment #3 from Michal Denar <black23@gmail.com> --- Created attachment 93334 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93334&action=edit Bug 23696: take deleted biblios into account when building oai sets Test plan: 0) do not apply the patch 1) set up OAI and create at least one set 2) run build_oai_sets.pl 3) remember/write down number of records added 4) delete a biblio, the is included in set 5) run buid_oai_sets.pl again 6) the set is 1 record smaller 7) apply the patch 8) run build_oai_sets.pl 9) the number of record should be the same as in 3) Signed-off-by: Michal Denar <black23@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23696 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |katrin.fischer@bsz-bw.de --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- This patch appears pretty straight-forward and it works for me, but I am having trouble with rerunning the script: 1) On running the script a second time, I get a lot of errors: DBD::mysql::st execute failed: Duplicate entry '50-1' for key 'PRIMARY' [for Statement " INSERT INTO oai_sets_biblios (set_id, biblionumber) VALUES (?,?) " with ParamValues: 0='1', 1=50] at /home/vagrant/kohaclone/C4/OAI/Sets.pm line 597. DBD::mysql::st execute failed: Duplicate entry '52-1' for key 'PRIMARY' [for Statement " INSERT INTO oai_sets_biblios (set_id, biblionumber) VALUES (?,?) " with ParamValues: 0='1', 1=52] at /home/vagrant/kohaclone/C4/OAI/Sets.pm line 597. 2) Also the links for Metadata and Set don't appear to work in our HTML representation of the OAI-Server: /cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=oai_dc&set=TEST 3) Even without the patch and after rerunning the script reporting 45 records (instead of the 46 it should have), I still can see a deleted record in the web output of the set. Can you please check these things and let me know? 3 might be related to this patch (blocker), the other 2 possibly separate bugs? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23696 --- Comment #5 from Josef Moravec <josef.moravec@gmail.com> --- (In reply to Katrin Fischer from comment #4)
This patch appears pretty straight-forward and it works for me, but I am having trouble with rerunning the script:
1) On running the script a second time, I get a lot of errors: DBD::mysql::st execute failed: Duplicate entry '50-1' for key 'PRIMARY' [for Statement " INSERT INTO oai_sets_biblios (set_id, biblionumber) VALUES (?,?) " with ParamValues: 0='1', 1=50] at /home/vagrant/kohaclone/C4/OAI/Sets.pm line 597. DBD::mysql::st execute failed: Duplicate entry '52-1' for key 'PRIMARY' [for Statement " INSERT INTO oai_sets_biblios (set_id, biblionumber) VALUES (?,?) " with ParamValues: 0='1', 1=52] at /home/vagrant/kohaclone/C4/OAI/Sets.pm line 597.
Hi Katrin, thanks for testing! when you are running this script more than once, you need to add -r parameter - it will clean the table before generating it again.
2) Also the links for Metadata and Set don't appear to work in our HTML representation of the OAI-Server:
/cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=oai_dc&set=TEST
Can you add more details to this question?
3) Even without the patch and after rerunning the script reporting 45 records (instead of the 46 it should have), I still can see a deleted record in the web output of the set.
The access to records are not limited by set, you can use OAI without set parameter in Koha. And it is OK, because set is optional by standard: http://www.openarchives.org/OAI/openarchivesprotocol.html#Set -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23696 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23696 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch 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=23696 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #93334|0 |1 is obsolete| | --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 107275 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107275&action=edit Bug 23696: take deleted biblios into account when building oai sets Test plan: 0) do not apply the patch 1) set up OAI and create at least one set 2) run build_oai_sets.pl 3) remember/write down number of records added 4) delete a biblio, the is included in set 5) run buid_oai_sets.pl again 6) the set is 1 record smaller 7) apply the patch 8) run build_oai_sets.pl 9) the number of record should be the same as in 3) Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23696 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Patch on itself looks good to me. Passing QA. Watch bug 20271. Katrin's questions in comment4 apply to OAI in general. The functionality of OAI sets in Koha looks rather poor to me. The form where you create a set is not really intuitive. When I created a set, the rule was duplicated. I wanted a set with biblionumber < some value. This is not possible. I tried field 001, but I can only choose == or != which is useless. And I should add a subfield which is NOT there. Furthermore I am not convinced if we should really build a table like oai_set_biblios or do that on the fly. The latter looks better to me at first. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23696 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23696 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |20.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23696 --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 20.11, 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=23696 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|20.11.00 |20.11.00, 20.05.03 released in| | Status|Pushed to master |Pushed to stable CC| |lucas@bywatersolutions.com --- Comment #9 from Lucas Gass <lucas@bywatersolutions.com> --- small enchacement, choosing to backport to 20.05.x for 20.05.03 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23696 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aleisha@catalyst.net.nz --- Comment #10 from Aleisha Amohia <aleisha@catalyst.net.nz> --- enhancement, not backported to 19.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org