Describe the bug
When exporting a SIA405 from a DB with value list extensions, the value_de is matched directly from the primary key instead of the vsacode. This results in unexpected behaviour.
In the test case, the value 'Platzwasser' was inserted into the vl of channel_usage_current to conform with AG-96 ili here.
The vl addition was done using plain sql:
INSERT INTO qgep_vl.channel_usage_current (code,vsacode,value_de,value_en,active) VALUES (999993,4520,'Platzwasser','square_water',true) ON CONFLICT DO NOTHING;
In the export, the result is
[...]<Nutzungsart_Ist>Platzwasser</Nutzungsart_Ist>[...] instead of [...]<Nutzungsart_Ist>Regenabwasser</Nutzungsart_Ist>[...]
To Reproduce
Exact steps to reproduce the behavior:
Add vl addition accordizbg to description
Add a channel with usage_current='Platzwasser'
Export Interlis
Check output
Expected behavior
qgepqwat2ili should map the vl indirectly by accessing the vsacode (if distinct from code) and get the corresponding value_de
Screenshots / data
DB dump can be sent privately (live data), to be used for bug fixing only
Desktop (please complete the following information):
Describe the bug When exporting a SIA405 from a DB with value list extensions, the value_de is matched directly from the primary key instead of the vsacode. This results in unexpected behaviour. In the test case, the value 'Platzwasser' was inserted into the vl of channel_usage_current to conform with AG-96 ili here.
The vl addition was done using plain sql:
INSERT INTO qgep_vl.channel_usage_current (code,vsacode,value_de,value_en,active) VALUES (999993,4520,'Platzwasser','square_water',true) ON CONFLICT DO NOTHING;
In the export, the result is
[...]<Nutzungsart_Ist>Platzwasser</Nutzungsart_Ist>[...]
instead of[...]<Nutzungsart_Ist>Regenabwasser</Nutzungsart_Ist>[...]
To Reproduce Exact steps to reproduce the behavior:
Expected behavior qgepqwat2ili should map the vl indirectly by accessing the vsacode (if distinct from code) and get the corresponding value_de
Screenshots / data DB dump can be sent privately (live data), to be used for bug fixing only
Desktop (please complete the following information):
Additional context See vsacode handling in #208