[Bug 8994] New: Make FindDuplicateAuthority behaviour customizable
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8994 Priority: P5 - low Change sponsored?: --- Bug ID: 8994 CC: m.de.rooy@rijksmuseum.nl Assignee: julian.maurice@biblibre.com Summary: Make FindDuplicateAuthority behaviour customizable Severity: enhancement Classification: Unclassified OS: All Reporter: julian.maurice@biblibre.com Hardware: All Status: ASSIGNED Version: master Component: Cataloging Product: Koha Make FindDuplicateAuthority behaviour customizable by adding 2 system preferences. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8994 --- Comment #1 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 13133 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13133&action=edit Bug 8994: Make FindDuplicateAuthority behaviour customizable With two new sysprefs: - FindDuplicateOptions, - FindDuplicateMaxResults, you can modify the behaviour of this sub in order to fit your needs. You can now search on another index than 'he' and compare subfields of search results. For example, if FindDuplicateOptions is 'he,wrdl/2..ab | See/4..ab', FindDuplicate will search on index 'he' and try to compare $a and $b subfields for all 2XX fields of search results with $a and $b for 2XX fields of newly created authority. If there is no results it will try to search on 'See' index and compare 4XX$a$b of search results with 2XX$a$b of created authority. FindDuplicateMaxResults define how many results should be fetched for comparison. The '/2..ab' part can be omitted from FindDuplicateOptions. In this case, no comparison is made on subfields and the first search result is returned as duplicate. To keep the current behaviour, fill FindDuplicateOptions with 'he,wrdl' (default value in updatedatabase.pl) Note: search on 'at' index is still done in all cases, so only the authorities of the same type are returned. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8994 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8994 claire.hernandez@biblibre.com <claire.hernandez@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |In Discussion CC| |claire.hernandez@biblibre.c | |om --- Comment #2 from claire.hernandez@biblibre.com <claire.hernandez@biblibre.com> --- We are currently working on this patch, please do not consider this submission for the moment -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8994 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolyn.somers@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8994 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gmcharlt@gmail.com --- Comment #3 from Galen Charlton <gmcharlt@gmail.com> --- (In reply to claire.hernandez@biblibre.com from comment #2)
We are currently working on this patch, please do not consider this submission for the moment
Any updates? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8994 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #13133|0 |1 is obsolete| | CC| |jonathan.druart@biblibre.co | |m --- Comment #4 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 22465 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=22465&action=edit Bug 8994: Make FindDuplicateAuthority behaviour customizable -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8994 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8994 Paola Rossi <paola.rossi@cineca.it> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |paola.rossi@cineca.it --- Comment #5 from Paola Rossi <paola.rossi@cineca.it> --- I've tried to apply the patch against master 3.19.00.012 head 13731 Applying: MT9496: Improve FindDuplicateAuthority Using index info to reconstruct a base tree... Falling back to patching base and 3-way merge... Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/authorities.pref Auto-merging installer/data/mysql/updatedatabase.pl CONFLICT (content): Merge conflict in installer/data/mysql/updatedatabase.pl Auto-merging installer/data/mysql/sysprefs.sql Auto-merging C4/AuthoritiesMarc.pm CONFLICT (content): Merge conflict in C4/AuthoritiesMarc.pm Failed to merge in the changes. So I pass the patch to "Patch doesn't apply" status. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8994 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #22465|0 |1 is obsolete| | --- Comment #6 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 36424 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=36424&action=edit Bug 8994: Improve FindDuplicateAuthority Rebased on master -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8994 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8994 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bgkriegel@gmail.com Status|Needs Signoff |Patch doesn't apply --- Comment #7 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- I fixed conflicts to test, also loaded a bunch of auths. But... how is this supposed to be tested? For now, does not apply. But give me a test plan and I will upload a fixed patch. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8994 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #36424|0 |1 is obsolete| | --- Comment #8 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 41861 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=41861&action=edit Bug 8994: Improve FindDuplicateAuthority With two new sysprefs: - FindDuplicateOptions, - FindDuplicateMaxResults, you can modify the behaviour of this sub in order to fit your needs. You can now search on another index than 'he' and compare subfields of search results. For example, if FindDuplicateOptions is 'he,wrdl/2..ab | See/4..ab', FindDuplicate will search on index 'he' and try to compare $a and $b subfields for all 2XX fields of search results with $a and $b for 2XX fields of newly created authority. If there is no results it will try to search on 'See' index and compare 4XX$a$b of search results with 2XX$a$b of created authority. FindDuplicateMaxResults define how many results should be fetched for comparison. The '/2..ab' part can be omitted from FindDuplicateOptions. In this case, no comparison is made on subfields and the first search result is returned as duplicate. To keep the current behaviour, fill FindDuplicateOptions with 'he,wrdl' (default value in updatedatabase.pl) Note: search on 'at' index is still done in all cases, so only the authorities of the same type are returned. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8994 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff --- Comment #9 from Julian Maurice <julian.maurice@biblibre.com> --- For the test plan, I'm assuming 2XX authority fields are indexed in a 'he' index and 4XX fields are indexed in a 'See' index. Also, I don't know MARC21 authorities, so the examples here are for UNIMARC. Test plan: 0/ Delete all your authorities and reindex or be sure to use unique strings in the following examples. 1/ Create an authority type T with "Authority field to copy" = "200" 2/ Create a new authority A1 of type T 200$a: Foo 200$b: Bar 400$a: Baz 3/ Set FindDuplicateOptions to 'he,wrdl' (the default) 4/ Reindex authorities 5/ Create a new authority of type T 200$a: Foo A duplicate should be found (A1). Cancel the creation. 6/ Create a new authority of type T 200$a: Baz No duplicate should be found. 7/ Set FindDuplicateOptions to 'he,wrdl/2..a' 8/ Create a new authority of type T 200$a: Foo 200$b: Baz A duplicate should be found (A1). Cancel the creation. 9/ Set FindDuplicateOptions to 'he,wrdl/2..ab' 10/ Create a new authority of type T 200$a: Foo 200$b: Baz No duplicate should be found 11/ Set FindDuplicateOptions to 'See/4..a' 12/ Create a new authority of type T 200$a: Foo No duplicate should be found 14/ Create a new authority of type T 200$a: Baz A duplicate should be found (A1). Cancel the creation. This is a very simple test plan as there can be many more cases to test, but I hope this will make testing easier. There is something that may need clarification, however. The Zebra query is built using the 'index' and 'subfield' parts of the syspref, and the "Authority field to copy" defined in authority type. For example, if: - type T has "Auth field to copy" = 215 - FindDuplicateOptions is 'See/4..ay' - we try to create an authority: 215$a: 'foo', 215$b: 'bar', 215$y: 'baz' The query will look like this: "See = foo and See = baz" (215$b is not used) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8994 Zeno Tajoli <z.tajoli@cineca.it> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |z.tajoli@cineca.it Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8994 Zeno Tajoli <z.tajoli@cineca.it> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|z.tajoli@cineca.it | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org