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

Add default values for fk_provider and fk_dataowner #173

Merged
merged 24 commits into from
May 6, 2024

Conversation

cymed
Copy link
Contributor

@cymed cymed commented Feb 26, 2024

This pr adds a metatable in tww_od (in first few pushes it was tww_sys) and the corresponding function to manage default values of any obj_id type. For now, only fk_provider and fk_dataowner are implemented. The functionality can easily be expanded for any obj_id based fk i.e. fk_pipe_profile.

@sjib
Copy link
Contributor

sjib commented Mar 4, 2024

Should solve #135

@cymed cymed closed this Apr 16, 2024
@cymed cymed force-pushed the default_values_for_fk_provider_dataowner branch from 25a25de to dcf0590 Compare April 16, 2024 08:42
@cymed cymed reopened this Apr 16, 2024
@sjib
Copy link
Contributor

sjib commented Apr 16, 2024

@cymed Can you add some documentation how to use this feature? Where do you add or select the default dataowner / provider? Screenshots?

cymed and others added 3 commits April 16, 2024 11:11
shell needs different formatting than python
@cymed
Copy link
Contributor Author

cymed commented Apr 16, 2024

Is the solution ok like this (default handling by sysadmin only in tww_sys)?

@sjib
Copy link
Contributor

sjib commented Apr 16, 2024

Is the solution ok like this (default handling by sysadmin only in tww_sys)?

@urskaufmann @ponceta @varrieta and others - your more in daily business

@urskaufmann
Copy link
Contributor

In most cases, this should be ok. I have some databases with more than one dataowner. In this case it would be better, when also non-admin-users can change the default value (or I show them how to set a default in the attributform. If I set a default in the attributform, will it overwrite the default, that comes from tww_sys?)

@cymed cymed self-assigned this Apr 17, 2024
@cymed
Copy link
Contributor Author

cymed commented Apr 17, 2024

In most cases, this should be ok. I have some databases with more than one dataowner. In this case it would be better, when also non-admin-users can change the default value (or I show them how to set a default in the attributform. If I set a default in the attributform, will it overwrite the default, that comes from tww_sys?)

if you want regular users to alter the default values, it must not be in tww_sys as tww_user does not have the necessary rights for it.

@sjib sjib added enhancement New feature or request datamodel Concerns the datamodel labels Apr 17, 2024
@cymed cymed added this to the TEKSI Wastewater 2024.0 milestone Apr 17, 2024
@cymed cymed requested a review from ponceta April 17, 2024 11:40
@cymed
Copy link
Contributor Author

cymed commented Apr 17, 2024

@ponceta ready for review, feedback from @urskaufmann was included in #615edd6

Co-authored-by: Arnaud Poncet-Montanges <[email protected]>
@ponceta ponceta closed this May 6, 2024
@ponceta ponceta reopened this May 6, 2024
@ponceta ponceta self-requested a review May 6, 2024 08:18
@ponceta
Copy link
Member

ponceta commented May 6, 2024

This is great and simplify greatly the fk_provider and fk_dataowner process.

@ponceta ponceta merged commit cfa76a7 into teksi:main May 6, 2024
17 checks passed
@ponceta ponceta mentioned this pull request May 7, 2024
4 tasks
@cymed cymed deleted the default_values_for_fk_provider_dataowner branch July 17, 2024 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datamodel Concerns the datamodel enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants