QGEP / qgepqwat2ili

3 stars 3 forks source link

INTERLIS Import Dataowner / Provider not filled in right #154

Open sjib opened 3 months ago

sjib commented 3 months ago

Describe the bug A clear and concise description of what the bug is.

When importing the Transferdatensatz of the VSA an additional organisation is created on import and all fields fk_dataprovider / fk_provider are filled in with that new organisation instead of ch080qwzPR000012

To Reproduce Exact steps to reproduce the behavior:

  1. Click on 'INTERLIS Import'
  2. Select the xtf file
  3. Start import
  4. See table of class

Expected behavior A clear and concise description of what you expected to happen.

If dataowner / provider is in one of the organisation datasets delivered it should not create a new one.

Screenshots / data If applicable, add screenshots or data to help explain your problem. 20240802_import_mutation_creates_new_datenherr_datenlieferant

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

Check that function to figure out what is happening: https://github.com/QGEP/qgepqwat2ili/blob/48c8a7fe15f55a26c8ba0c65eb43eee23573cb55/qgepqwat2ili/qgepdss/import_.py#L98

sjib commented 3 months ago

20240802_import_organisation_with_new_datenherr_lieferant

sjib commented 3 months ago
            <DSS_2015_LV95.Siedlungsentwaesserung.Amt TID="ch080qwzAM001217">
                <OBJ_ID>ch080qwzAM001217</OBJ_ID>
                <Metaattribute>
                    <SIA405_Base_LV95.Metaattribute>
                        <Datenherr>ch080qwzPR000012</Datenherr>
                        <Datenlieferant>ch080qwzPR000012</Datenlieferant>
                        <Letzte_Aenderung>20140519</Letzte_Aenderung>
                    </SIA405_Base_LV95.Metaattribute>
                </Metaattribute>
                <Bemerkung>Amt für Umwelt</Bemerkung>
                <Bezeichnung>AfU</Bezeichnung>
            </DSS_2015_LV95.Siedlungsentwaesserung.Amt>

and ch080qwzPR000012 is also in dataset

            <!-- neu 15.6.2021 für Konvertierung 2020 -->
            <DSS_2015_LV95.Siedlungsentwaesserung.Privat TID="ch080qwzPR000012">
                <OBJ_ID>ch080qwzPR000012</OBJ_ID>
                <Metaattribute>
                    <SIA405_Base_LV95.Metaattribute>
                        <Datenherr>ch080qwzPR000012</Datenherr>
                        <Datenlieferant>ch080qwzPR000012</Datenlieferant>
                        <Letzte_Aenderung>20140519</Letzte_Aenderung>
                    </SIA405_Base_LV95.Metaattribute>
                </Metaattribute>
                <Bemerkung>Verband Schweizer Abwasser- und Gewässerschutzfachleute (VSA)</Bemerkung>
                <Bezeichnung>VSA</Bezeichnung>
            </DSS_2015_LV95.Siedlungsentwaesserung.Privat>
sjib commented 3 months ago

@ponceta Can you check if opengis could check on this?