•  
      request #7250 Multiple artifacts are linked to artifacts that being imported by a CSV import
    Infos
    #7250
    Patricia Carrasco (pcar)
    2016-03-16 14:37
    2014-07-21 22:19
    7259
    Details
    Multiple artifacts are linked to artifacts that being imported by a CSV import
    When a CSV file is being imported the artifacts that are being imported are incorrectly linked to multiple parents.

    The issue is that for example, the csv file contains 3 test cases each has a different parent user story. The Artifact Links column in the csv contains the artifact id# of different user stories for each test case that is to be imported. When the import is performed, the first test case is linked correctly. However, the second and third test cases are also linked to the same user story as the first test case (which is not correct).
    It then imports the second test case and links it to the user story listed in the Artifacts Links field but it also links the next test case in the csv to the same user story. Since there are no other records after the third test case, it is linked correctly.
    Trackers
    7.1
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Emilio Palmiero (empa)
    Stage
    Empty
    New
    Empty
    Attachments
    Empty
    References
    References list is empty

    Follow-ups

    User avatar
    We have the same issue in Tuleap v8.6. (I will test it again in a few weeks when we update to the latest version)

    The steps to reproduce this:
    - create 2 trackers and connect them in hierarchy
    - import 2 artifacts in the "child" tracker with each one containing a single artifact ID in the "artifact links" column (pointing to different parents)
    - preview shows the expected result (one artifact link for each child)
    - import the artifacts

    Result:
    - first "child" artifact contains expected parent artifact ID
    - second "child" artifact contains the same parent artifact ID as the first "child" artifact and also the expected parent artifact ID

    We also found a workaround: remove the hierarchy and import then works correctly.

    It looks to me like the code that actually executes the import keeps all the artifact IDs from the previous rows and just adds the expected links to the array instead of replacing the array...