[Koha-bugs] [Bug 18482] New: False duplicates detected on adding a batch from a stage file

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sat Apr 22 18:43:20 CEST 2017


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18482

            Bug ID: 18482
           Summary: False duplicates detected on adding a batch from a
                    stage file
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P5 - low
         Component: Acquisitions
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: koha at univ-lyon3.fr
        QA Contact: testopia at bugs.koha-community.org

Created attachment 62572
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62572&action=edit
False duplicates detected on adding a batch from a stage file

When adding a batch from a stage file with defaut matching on
title/author, if a duplicate is detected, all following records
treated in the batch are discarded from import even if they are not duplicates.

Checking for duplicate now lies on duplinbatch value that is not reset at each
loop (In the initial commit, discarding record was directly tight to
FindDuplicate return). So from the point when duplinbatch is defined, all the
following biblios are discarded as duplicate whatever FindDuplicate return is.
This patch adds a distinct flag.

Test plan :

You need the 2 test attached files TestFile1.mrc and TestFile2.elc (TestFile1
includes only the title "Amilec ou La graine d'hommes" that is also included in
TestFile2). To save them, right click on bugzilla link and do 'Save target as'.

1) go to “Stage MARC records for import” page, upload TestFile1, select iso
5426 encoding and stage it for Import. 
2) Click again 'Stage MARC records' button and do the same for TestFile2.elc
3) Go to acquisitions module, enter a vendor name and create a new basket.
4) From your basket, click 'Add to basket', then in the “Add order to basket
window/block” choose 'From a staged file'.
5) Then click ‘Add orders' button on File1.
6) Leave default matching on Title/Author, tick the title, add a location in
second tag and fund in third tag and Save. 
7) Make sure that the new record is indexed (depending to your indexing
system and test platform).
8) Redo step 4 and step 5 this time on TestFile2.
9) Leave default matching on Title/Author, select all titles, add a location in
second tag, a fund in third tag and Save. 
10) A warning is displayed saying that no records have been imported because
they all match an existing record. The “Import all” block is not any more
visible.
11) Apply the patch
12) Refresh 'Add orders from' page (File2) and redo step 9
13) You are redirected to the basket page : a warning is displayed to tell you
that some duplicates have been found and skipped.
There's a link on the warning throughout you can go back to the list of
remaining records and treat them individually if necesary.
14) Click the link : you fall upon the only title that is a very duplicate
(record of TestFile1).
15) Be happy
16) Sign off

Olivier Crouzet

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list