qwat / QWAT

TEKSI Water module (project QWAT) - QGIS project
https://www.teksi.ch
GNU General Public License v2.0
58 stars 31 forks source link

leak form (.ui file) shows non existing fields #296

Closed haubourg closed 5 years ago

haubourg commented 5 years ago

The form for leaks shows fields that are (no longer?) in the datamodel. image

I'm wondering why leaks are not anymore referenced to district ? @3nids any idea?

Related to task #233 and #181

ponceta commented 5 years ago

Pully

We are now fully using drag and drop forms.

The reason why fk_district is not in leaks anymore is that every leak is linked to a pipe which already have an fk_district. -> Sufficient for export views but not for edition purposes.

In Pully we restored this fk_district field for edition purposes.

What would be the good practice in this case? I still wonder.

haubourg commented 5 years ago

We are now fully using drag and drop forms.

Hi, could you share your branch so that I can give it a try ?

In Pully we restored this fk_district field for edition purposes.

is that a customization of the database model constraints ? Do you handle that with PUM? I'd be pleased to see your branch too.

What would be the good practice in this case? I still wonder.

Well, we first need to know if this is a requirement for the field work to link a leak to a district. IMO, I don't see any reason why we shouldn't because a pipe can cross many districts, but leaks can be handled by different field workers depending on the district. I have no strong opinion. I was asking because the forms showed that this constraint existed in the past and it was removed at some point. I couldn't find any explanation for that removal.

haubourg commented 5 years ago

closing, we are switching to drag and drop fields on the demo project