Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export will fail when drawing new reaches #425

Open
ponceta opened this issue Sep 20, 2024 · 1 comment
Open

Export will fail when drawing new reaches #425

ponceta opened this issue Sep 20, 2024 · 1 comment
Labels
datamodel Concerns the datamodel INTERLIS About INTERLIS exchange format (import / export) plugin Concerns the wastewater plugin

Comments

@ponceta
Copy link
Member

ponceta commented Sep 20, 2024

Describe the bug
Create a new reach will make the export fails because they don't inherit yet of fk_dataowner and fk_provider which are mandatory for export.

To Reproduce
Exact steps to reproduce the behavior:

  1. Create a new reach
  2. Try to export
  3. See error

Expected behavior¨
Drawing new reaches does not make the export fail.

Proposed solution
Make reach points inherit fk_dataowner and fk_provider from reaches (insert or update) so the export works without too much extra work.

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

Desktop (please complete the following information):

  • TWW version
  • QGIS Version
  • OS

Additional context
Add any other context about the problem here.

@ponceta ponceta assigned ponceta and unassigned ponceta Sep 20, 2024
@ponceta ponceta added datamodel Concerns the datamodel plugin Concerns the wastewater plugin INTERLIS About INTERLIS exchange format (import / export) labels Sep 20, 2024
@cymed
Copy link
Contributor

cymed commented Sep 30, 2024

If digitised from the main reach view, we do set the values:

INSERT INTO tww_od.reach_point (
[...]
)
([...]
fk_dataowner = COALESCE(NULLIF(NEW.rp_to_fk_dataowner,''), NEW.fk_dataowner),
[...]
)

if NEW.fk_dataowner should have a default set from tww_od.default_values

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datamodel Concerns the datamodel INTERLIS About INTERLIS exchange format (import / export) plugin Concerns the wastewater plugin
Projects
None yet
Development

No branches or pull requests

2 participants