sillsdev / TheCombine

This is a tool for supporting the rapid word collection workshop and post workshop clean-up
https://sillsdev.github.io/TheCombine/
MIT License
16 stars 13 forks source link

Moving a Sense to a new Word does not round trip correctly back into FieldWorks #1016

Closed johnthagen closed 3 years ago

johnthagen commented 3 years ago

To Reproduce

image

Note duplicate senses:

image

johnthagen commented 3 years ago

It appears the problem is that the Combine does not preserve Sense IDs.

Lift exported:

    <entry dateCreated="2021-02-12T18:20:03Z" dateModified="2021-02-12T18:20:12Z" id="a_832e66dc-8cc2-4efc-b55c-3b3589b027b2" guid="832e66dc-8cc2-4efc-b55c-3b3589b027b2">
        <lexical-unit>
            <form lang="fr">
                <text>a</text>
            </form>
        </lexical-unit>
        <trait name="morph-type" value="stem"/>
        <sense id="d43bff40-7873-4f9f-869f-6dbfcccdc829" order="0">
            <gloss lang="en">
                <text>b</text>
            </gloss>
        </sense>
        <sense id="cfab14c8-b68c-4e65-a32f-a3214b4b874b" order="1">
            <gloss lang="en">
                <text>c</text>
            </gloss>
        </sense>
    </entry>
    <entry dateCreated="2021-02-12T18:20:23Z" dateModified="2021-02-12T18:20:23Z" id="z_7edcd860-68a1-4d68-a5ec-d119052c5d3d" guid="7edcd860-68a1-4d68-a5ec-d119052c5d3d">
        <lexical-unit>
            <form lang="fr">
                <text>z</text>
            </form>
        </lexical-unit>
        <trait name="morph-type" value="stem"/>
        <sense id="64c38713-1caa-48d9-a22a-dbd5f03597e2">
            <gloss lang="en">
                <text>y</text>
            </gloss>
        </sense>
    </entry>

Combine exported:

    <entry id="a" dateCreated="2021-02-12T13:20:03Z" dateModified="2021-02-12T18:31:26Z" guid="832e66dc-8cc2-4efc-b55c-3b3589b027b2">
        <lexical-unit>
            <form lang="fr">
                <text>a</text>
            </form>
        </lexical-unit>
        <sense id="b6518833-0121-40d0-9418-49ea3cd64c69">
            <gloss lang="en">
                <text>c</text>
            </gloss>
        </sense>
    </entry>
    <entry id="z" dateCreated="2021-02-12T13:20:23Z" dateModified="2021-02-12T18:31:26Z" guid="7edcd860-68a1-4d68-a5ec-d119052c5d3d">
        <lexical-unit>
            <form lang="fr">
                <text>z</text>
            </form>
        </lexical-unit>
        <sense id="7182ae26-d7c3-4f61-a665-fbc273f3da76">
            <gloss lang="en">
                <text>y</text>
            </gloss>
        </sense>
        <sense id="271c3b0b-9dff-4bec-8a6b-63eb3142550c">
            <gloss lang="en">
                <text>b</text>
            </gloss>
        </sense>
    </entry>
johnthagen commented 3 years ago

I've confirmed that Combine preserves the Sense GUIDs properly on import. If you export immediately after importing, they are correct.

Losing the GUIDs must happen on merge.

johnthagen commented 3 years ago

This seems to have been accidently fixed by #1045.

johnthagen commented 3 years ago

Related FieldWorks issue: https://jira.sil.org/browse/LT-20582