When submitting a new purchase suggestion, we search for similar document among biblio and show a message if a duplicate is found. User can ignore the message and confirm the suggestion.
Created attachment 43193 [details] [review] Bug 14973: Check existing biblio when submitting a purchase suggestion
Hi Alex, I tested in Opac: Purchase Suggestions Existing Biblio with item: Wachtmeister Studers erste Fälle by Friedrich Glauser Suggested: Wachtmeister Studers erste Fälle -> Duplicate messsage Wachtmeister Studer -> No message Wachtmeister Studers -> No message Wachtmeister Studers erste -> No Message Studers erste Fälle -> No message Combining full title with full Author Wachtmeister Studers erste Fälle Friedrich Glauser -> No Message Wachtmeister Studers erste Fälle Glauser, Friedrich -> No Message Combining full title with partial Author Wachtmeister Studers erste Fälle Glauser -> No Message So it seems to work with the full title only. Is this intended? Marc
Hello Marc, I used C4::Search::FindDuplicate which seems to require almost the full title / author. Either we fix findDuplicate to make it more flexible or we create an other subrutine (using simpleSearch ?)
Hi Alex, Maybe simpleSearch is better in this case. Can you give it a try?
I would say not finding a match on a partial title is ok. Otherwise we'll have a lot of fake positives, which will be unsettling for our users and might discourage them from creating suggestions. However, not finding a match when the full title and the author was entered is definitely a bug for me. I think if findDuplicate says there is a duplicate when just the title is entered, it should definitely find one if both title and author are entered. I am not sure about how it works though.
I agree with Gaetan. If we use simpleSearch, this means that if we type "Dragons" as a title, a book like "Rise of the Dragons" could be shown as a duplicate to the user. I think this is not what we want. However, findDuplicate should be able to find duplicate when typing full title and author. So i think we should fix this sub.
I go back on my word about findDuplicate. Searching duplicates with full title and author works for me. I have a book: Les montagnes from Keith Lye. Submit a suggestion with title "Les montagnes" => duplicate message Submit a suggestion with title "Les montagnes" and author "Keith Lye" => duplicate message Submit a suggestion with title "Les montagnes", author "Keith Lye" and itemtype "Book" => duplicate message. Anyone has the same problem than Marc ? I will send a new patch because i have broken the itemtypes list in the form
Created attachment 44091 [details] [review] Bug 14973 - Fix broken itemtypes list in opac-suggestions form
I don't see a test plan on this - can you add one and then I'll happily test. Nicole
Created attachment 44319 [details] [review] Bug 14973: Check existing biblio when submitting a purchase suggestion Test plan: - Go to opac suggestions page (opac-suggestions.pl) and click on "New purchase suggestion", - type the title (and author?) of a document that stand in you database - you should get a warning message about an exiting biblio. - clicking on confirm your suggestion add it, cancel does nothing
Created attachment 44320 [details] [review] Bug 14973 - Fix broken itemtypes list in opac-suggestions form
Nicole, I have added the test plan to the commit message of the first commit.
Created attachment 44334 [details] [review] Bug 14973: Check existing biblio when submitting a purchase suggestion Test plan: - Go to opac suggestions page (opac-suggestions.pl) and click on "New purchase suggestion", - type the title (and author?) of a document that stand in you database - you should get a warning message about an exiting biblio. - clicking on confirm your suggestion add it, cancel does nothing Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Created attachment 44335 [details] [review] Bug 14973 - Fix broken itemtypes list in opac-suggestions form Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
This is neat, it's not super powerful, but I see how one day it could be. I'll note in the documentation that it only works if the title and the name are exact - so if I enter author Barbara Kingsolver it doesn't find her, but if I put in Kingsolver, Barbara it does. Still a good feature that doesn't break anything that I can see :)
I agree it's not super-powerfull, and I also agree with Alex about using FindDuplicate. The next step is probably to improve FindDuplicate. idea : using the matching points system. Opening a ticket for that now ;-)
Alex, 1/ I think MarcRecordFromSuggestion is confusing. It does not take an existing suggestion in parameter, and that's why you use the default framework to get the marc fields. Either you rename it with something like MarcRecordFromNewSuggestion, or you take into account that this suggestion can already be linked to a record. 2/ Should not we have the same behavior on the staff side?
(In reply to Jonathan Druart from comment #17) > 2/ Should not we have the same behavior on the staff side? This patch is about warning non librarian user. It can therefore be assumed that librarians know which tools to use for finding a potential duplicate record.
Created attachment 60877 [details] [review] Bug 14973: Check existing biblio when submitting a purchase suggestion (opac side) Test plan: - Go to opac suggestions page (opac-suggestions.pl) and click on "New purchase suggestion", - type the title (and author?) of a document that stand in you database - you should get a warning message about an exiting biblio. - clicking on confirm your suggestion add it, cancel does nothing Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Created attachment 60913 [details] [review] Bug 14973: Check existing biblio when submitting a purchase suggestion (staff side)
Tested on the Biblibre sandbox n°3. In the database : NOTRE DAME DE PARIS / Victor Hugo [Livres] (biblionumber : 974) When we make a suggestion in low-case "notre dame de paris", no warning message, the suggestion is added. When we make a suggestion in upper-case "NOTRE DAME DE PARIS", a warning message appears before validate. It will be better if this patch is not case sensitive.
(In reply to Koha Team AMU from comment #21) > Tested on the Biblibre sandbox n°3. > > In the database : NOTRE DAME DE PARIS / Victor Hugo [Livres] (biblionumber : > 974) > > When we make a suggestion in low-case "notre dame de paris", no warning > message, the suggestion is added. > > When we make a suggestion in upper-case "NOTRE DAME DE PARIS", a warning > message appears before validate. > > It will be better if this patch is not case sensitive. This feature use FindDuplicate function and i think the problem come from here. So i agree that this is not a good match but this patch is not intended to improve matching methods. As mentioned in comment 16, we should improve findDuplicate in another bug.
The BULAC (http://www.bulac.fr/) would like to sponsore this development. Alex, did you work further on the patch ? As long as “Change sponsored?” is set on “Seeking developer”, anyone wanting to quote us for the development of such a feature or just ask for more information is welcome to write to us: <sigb@bulac.fr>.
Created attachment 93141 [details] [review] Bug 14973: Check existing biblio when submitting a purchase suggestion (opac side) Test plan: - Go to opac suggestions page (opac-suggestions.pl) and click on "New purchase suggestion", - type the title (and author?) of a document that stand in you database - you should get a warning message about an exiting biblio. - clicking on confirm your suggestion add it, cancel does nothing Signed-off-by: Nicole Engard <nengard@bywatersolutions.com>
Created attachment 93142 [details] [review] Bug 14973: Check existing biblio when submitting a purchase suggestion (staff side)
The patches have been rebased against master. It was a bit tricky but it seems that they still work as expected. I am with Alex here, we should not block this one because of FindDuplicate behaviors.
Sorry Jonathan, I tried with : - title only - title + author - title + author + isbn (and other informations) but I never get a warning.
Created attachment 94297 [details] [review] Bug 14973: Do not skip validation step when submiting a suggestion - OPAC
There was indeed a bug at the OPAC.
Created attachment 94298 [details] [review] Bug 14973: Remove double textarea for notes Certainly a bad merge conflict resolution (I am certainly the one to blame). However I do not understand where this "note" variable come from.
Created attachment 94301 [details] [review] Bug 14973: Check existing biblio when submitting a purchase suggestion (opac side) Test plan: - Go to opac suggestions page (opac-suggestions.pl) and click on "New purchase suggestion", - type the title (and author?) of a document that stand in you database - you should get a warning message about an exiting biblio. - clicking on confirm your suggestion add it, cancel does nothing Signed-off-by: Nicole Engard <nengard@bywatersolutions.com> Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Created attachment 94302 [details] [review] Bug 14973: Check existing biblio when submitting a purchase suggestion (staff side) Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Created attachment 94303 [details] [review] Bug 14973: Do not skip validation step when submiting a suggestion - OPAC Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Created attachment 94304 [details] [review] Bug 14973: Remove double textarea for notes Certainly a bad merge conflict resolution (I am certainly the one to blame). However I do not understand where this "note" variable come from. Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Works as expected. Very excited for this feature. I did notice that when checking the title it doesn't matter what the case of the letters are but with author it does on both the patron and staff side. (ie if the author is cataloged as Tyler, chris it won't warn if Tyler, Chris is entered instead.) Lisette
I have strange behaviours when the title I search for is not exactly the same registered in Koha. For example on BibLibre's sandbox http://pro.es5-koha.sandbox.biblibre.eu : 1) the 4th volume of "Lanfeust de Troy" is existing in Koha with title "Lanfeust de Troy : Le paladin d'eckmül". The alert is correct when I use all the different elements of this title. But if I only fill "Le paladin d'eckmül", I have an alert leading to a bad biblio (sn=4 instead of sn=1976). 2) for the title "[Le ]Siècle des Lumières", if I fill as the title "Le siècle des lumières" (which is certainly what patrons will do), the alert leads to the same bad notice as for exemple 1 (sn=4 instead of sn=741) ! 3) the detection of "L'amour fou" for "[L']Amour fou" is correct.
Sorry, another example... Filling "Ramsès : Le Temple des millions d'années" is a duplicate of the 2nd volume for "Ramses" collection of Christian Jacq (sn=984), but the alert is made for the the 5th volume "Ramsès : Sous l'acacia d'Occident" (sn=99)
Séverine, this is how FindDuplicate works so far. If we want to improve its behavior we should done it on a separate bug report. It is out of the scope of this one.
(In reply to Jonathan Druart from comment #38) > Séverine, this is how FindDuplicate works so far. If we want to improve its > behavior we should done it on a separate bug report. It is out of the scope > of this one. Thank you Jonathan for the information. Except that point, the other behaviours were good, so ok to keep the "Signed off" status. About the opening of a new bug, can you do it ? I'm not sure I can correctly describe the problem.
(In reply to Séverine Queune from comment #39) > (In reply to Jonathan Druart from comment #38) > > Séverine, this is how FindDuplicate works so far. If we want to improve its > > behavior we should done it on a separate bug report. It is out of the scope > > of this one. > > Thank you Jonathan for the information. > Except that point, the other behaviours were good, so ok to keep the "Signed > off" status. > About the opening of a new bug, can you do it ? I'm not sure I can correctly > describe the problem. It already exists actually :) See bug 15248.
Created attachment 95113 [details] [review] Bug 14973: Remove double declaration of suggestions_loop
Created attachment 95114 [details] [review] Bug 14973: Add missing filters in templates
Found an issue coming from this patch, when testing bug 14763 : biblioitems.itemtypes is now mandatory to edit a suggestion. It seems an important data to map, so I don't think a modification of the present code is needed, but maybe a warning should be clearly displayed in the release note, and maybe Koha (About > System information ?).
*** Bug 6813 has been marked as a duplicate of this bug. ***
Created attachment 95517 [details] [review] Bug 14973: Fix edit a suggestion and dup found The find duplicate call must only be done when the suggestion is new. It does not make sense to search for a duplicate when the suggestion already exists. This patch also fixes a side-effect: - Create a suggestion using an existing biblio title - Ignore the warning and save - Edit again and save => BOOM on date Template process failed: undef error - The given date (18/11/2019) does not match the date format (iso) at /kohadevbox/koha/Koha/DateUtils.pm line 168 The dates are not processed and so badly formatted when sent to the template.
Hmm, might be worth taking a look at bug 23173 for some possible inspiration here.. it add hooks to allow searching of various sources via plugins before submitting an ILL request.. feels like a similar mechanism could be employed here too and would go be perhaps a more flexible end result? Just some food for thought.. it's still on my list to work through this patch set anyway.
Created attachment 96255 [details] [review] Bug 14973: Check existing biblio when submitting a purchase suggestion (opac side) Test plan: - Go to opac suggestions page (opac-suggestions.pl) and click on "New purchase suggestion", - type the title (and author?) of a document that stand in you database - you should get a warning message about an exiting biblio. - clicking on confirm your suggestion add it, cancel does nothing Signed-off-by: Nicole Engard <nengard@bywatersolutions.com> Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Created attachment 96256 [details] [review] Bug 14973: Check existing biblio when submitting a purchase suggestion (staff side) Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Created attachment 96257 [details] [review] Bug 14973: Do not skip validation step when submiting a suggestion - OPAC Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Created attachment 96258 [details] [review] Bug 14973: Remove double textarea for notes Certainly a bad merge conflict resolution (I am certainly the one to blame). However I do not understand where this "note" variable come from. Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Created attachment 96259 [details] [review] Bug 14973: Remove double declaration of suggestions_loop
Created attachment 96260 [details] [review] Bug 14973: Add missing filters in templates
Created attachment 96261 [details] [review] Bug 14973: Fix edit a suggestion and dup found The find duplicate call must only be done when the suggestion is new. It does not make sense to search for a duplicate when the suggestion already exists. This patch also fixes a side-effect: - Create a suggestion using an existing biblio title - Ignore the warning and save - Edit again and save => BOOM on date Template process failed: undef error - The given date (18/11/2019) does not match the date format (iso) at /kohadevbox/koha/Koha/DateUtils.pm line 168 The dates are not processed and so badly formatted when sent to the template.
Created attachment 96325 [details] [review] Bug 14973: Check existing biblio when submitting a purchase suggestion (opac side) Test plan: - Go to opac suggestions page (opac-suggestions.pl) and click on "New purchase suggestion", - type the title (and author?) of a document that stand in you database - you should get a warning message about an exiting biblio. - clicking on confirm your suggestion add it, cancel does nothing Signed-off-by: Nicole Engard <nengard@bywatersolutions.com> Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 96326 [details] [review] Bug 14973: Check existing biblio when submitting a purchase suggestion (staff side) Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 96327 [details] [review] Bug 14973: Do not skip validation step when submiting a suggestion - OPAC Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 96328 [details] [review] Bug 14973: Remove double textarea for notes Certainly a bad merge conflict resolution (I am certainly the one to blame). However I do not understand where this "note" variable come from. Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 96329 [details] [review] Bug 14973: Remove double declaration of suggestions_loop Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 96330 [details] [review] Bug 14973: Add missing filters in templates Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 96331 [details] [review] Bug 14973: Fix edit a suggestion and dup found The find duplicate call must only be done when the suggestion is new. It does not make sense to search for a duplicate when the suggestion already exists. This patch also fixes a side-effect: - Create a suggestion using an existing biblio title - Ignore the warning and save - Edit again and save => BOOM on date Template process failed: undef error - The given date (18/11/2019) does not match the date format (iso) at /kohadevbox/koha/Koha/DateUtils.pm line 168 The dates are not processed and so badly formatted when sent to the template. Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nice work everyone! Pushed to master for 20.05
New feature. not backported to 19.11.x
(In reply to Jonathan Druart from comment #38) > Séverine, this is how FindDuplicate works so far. If we want to improve its > behavior we should done it on a separate bug report. It is out of the scope > of this one. See bug 27278.
(In reply to Jonathan Druart from comment #64) > (In reply to Jonathan Druart from comment #38) > > Séverine, this is how FindDuplicate works so far. If we want to improve its > > behavior we should done it on a separate bug report. It is out of the scope > > of this one. > > See bug 27278. Thanks ! [U+1F44D]