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

Territory form. Parent territory panel doesn't show "Province" type territories #156

Open
Tracked by #4
codinachssm opened this issue Mar 8, 2024 · 1 comment
Open
Tracked by #4
Assignees
Labels
bug Something isn't working

Comments

@codinachssm
Copy link

In this list I only see "Municipi" and "Mancomunitat" territories type. I need to select a "Provincia" territory as the parent of a "Municipi".
What territories type appear in the "Parent territory" panel list?

@codinachssm codinachssm changed the title Territory form. Parent territory panel doesn't shouw "Province" type territories Territory form. Parent territory panel doesn't show "Province" type territories Mar 8, 2024
@fjlopez
Copy link
Contributor

fjlopez commented Mar 10, 2024

Each territory has a territory type (STM_TER_TYP). Each territory type has two properties:

  • tet_top, true when it cannot be contained by other territory (e.g. Província)
  • tet_bottom, true when it cannot have children

The current values of the table STM_TER_TYPE are:

tet_id tet_name tet_official tet_top tet_bottom
1 Àrea true false false
2 Consell Comarcal true false false
3 Consorci true false false
4 Mancomunitat true false false
5 Parc natural true false true
6 Municipi true false false
7 EMD true false true
8 Província true true false

I have checked the current behaviour of the forms and I've detected the following bug:

  • When parent territory is shown:
    • Not includes territories with territory type with tet_top=true 🐛
    • Includes territories with territory type with tet_bottom=true 🐛
  • When child territory is shown:
    • Includes territories with territory type with tet_top=true 🐛
    • Not includes territories with territory type with tet_bottom=true 🐛

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Status: AdminApp F2
Development

No branches or pull requests

3 participants