kitodo / kitodo-production

Kitodo.Production is a workflow management tool for mass digitization and is part of the Kitodo Digital Library Suite.
http://www.kitodo.org/software/kitodoproduction/
GNU General Public License v3.0
62 stars 63 forks source link

Duplication of meta data groups on anchor level on saving and displaying #2330

Closed henning-gerhardt closed 5 years ago

henning-gerhardt commented 5 years ago

After importing and creating a new process with meta data groups on level of multivolume_work (top element) the meta data groups are shown correct:

MetadataGroup-Initial

Even stored data is correct

<mets:dmdSec ID="DMDLOG_0000">
    <mets:mdWrap MDTYPE="MODS">
        <mets:xmlData>
            <mods:mods xmlns:mods="http://www.loc.gov/mods/v3">
                <mods:extension>
                    <goobi:goobi xmlns:goobi="http://meta.goobi.org/v1.5.1/">
                        <!-- shorted -->
                        <goobi:metadata name="slub_serialGroup" type="group">
                            <goobi:metadata name="slub_serialTitle">Dresdner Hefte</goobi:metadata>
                            <goobi:metadata name="slub_serialCurrentNo">...</goobi:metadata>
                        </goobi:metadata>
                        <goobi:metadata name="slub_serialGroup" type="group">
                            <goobi:metadata name="slub_serialTitle">Beiträge zur Kulturgeschichte</goobi:metadata>
                            <goobi:metadata name="slub_serialCurrentNo">...</goobi:metadata>
                        </goobi:metadata>
                    </goobi:goobi>
                </mods:extension>
            </mods:mods>
        </mets:xmlData>
    </mets:mdWrap>
</mets:dmdSec>

But if we open this process again, we see the following:

MetadataGroup-Reopen

and if we are storing this process the xml file get updated to this:

<mets:dmdSec ID="DMDLOG_0000">
    <mets:mdWrap MDTYPE="MODS">
        <mets:xmlData>
            <mods:mods xmlns:mods="http://www.loc.gov/mods/v3">
                <mods:extension>
                    <goobi:goobi xmlns:goobi="http://meta.goobi.org/v1.5.1/">
                        <!-- shorted -->
                        <goobi:metadata name="slub_serialGroup" type="group">
                            <goobi:metadata name="slub_serialTitle">Dresdner Hefte</goobi:metadata>
                            <goobi:metadata name="slub_serialCurrentNo">...</goobi:metadata>
                        </goobi:metadata>
                        <goobi:metadata name="slub_serialGroup" type="group">
                            <goobi:metadata name="slub_serialTitle">Dresdner Hefte</goobi:metadata>
                            <goobi:metadata name="slub_serialCurrentNo">...</goobi:metadata>
                        </goobi:metadata>
                        <goobi:metadata name="slub_serialGroup" type="group">
                            <goobi:metadata name="slub_serialTitle">Beiträge zur Kulturgeschichte</goobi:metadata>
                            <goobi:metadata name="slub_serialCurrentNo">...</goobi:metadata>
                        </goobi:metadata>
                        <goobi:metadata name="slub_serialGroup" type="group">
                            <goobi:metadata name="slub_serialTitle">Beiträge zur Kulturgeschichte</goobi:metadata>
                            <goobi:metadata name="slub_serialCurrentNo">...</goobi:metadata>
                        </goobi:metadata>
                    </goobi:goobi>
                </mods:extension>
            </mods:mods>
        </mets:xmlData>
    </mets:mdWrap>
</mets:dmdSec>

If we now open this process again, we see the following:

MetadataGroup-ReopenAgain

A not real possible work around is to delete the duplicated meta data groups before saving the work on this process.

Working with meta data groups on volume (on level under multivolume_work) or monograph works without any issue.

Effected version: Kitodo.Production 2.2.0

henning-gerhardt commented 5 years ago

Looks like an error inside Kitodo.UGH:

henning-gerhardt commented 5 years ago

Closing as solved in Kitodo.Production 2.3.0.