Make the fid / primary key field read-only in feature forms
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 52/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- cpp
- Área
- backend-api-design, mobile
Línea de trabajo
Start by tracing how QGIS layer primary key fields are represented in feature forms for adding, editing, and multi-feature editing; the issue does not name files or tests. Check the existing related behavior in #4580 and the QGIS form configuration handling. Done means primary keys stay read-only with the specified values and styling across these cases, while hidden fields and relation-created child features retain their stated behavior.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Current situation
Template projects hide fid, but if the author sets the primary key widget to an editable type (e.g. Text Edit), the mobile app lets surveyors change it. This can break relations and cause sync conflicts. In multi-feature editing, fid also shows as empty instead of * Mixed Values * (#4580).
Solution
Always make the layer's primary key field(s) read-only in the form, whatever the field name or widget type. Visibility still follows the QGIS form configuration.
Acceptance criteria
- The primary key field is read-only in the feature form, regardless of the widget type set in QGIS
- Applies to any primary key field, not only fields named
fid - Applies when adding a new feature, editing an existing one and editing multiple features
- On a new feature, the field shows
Autogenerateand is not validated as user input, so no constraint error blocks saving - On an existing feature, the field shows the current value
- In multi-feature editing, the field shows
* Mixed Values *like other fields, and cannot be edited (closes #4580) - If the field is hidden in the QGIS form configuration, it stays hidden
- Read-only styling matches other non-editable fields in the app
- Child features created through relations get their primary key generated as before
Related issues
- #4580
- #1694
- #1745
- Lenguaje dominante
- C++
- Estrellas
- 394
- Forks
- 91
- Merge medio
- 2 d 10 h
- PR fusionados (30 d)
- 16
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de MerginMaps/mobile
-
Sign up button opens the Sign in page instead of the Sign up page for Enterprise edition serversAbiertoauth bug ui/ux
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
MerginMaps/mobile#4795 ·
Los mantenedores suelen responder en 2 días
-
bug ui/ux
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
MerginMaps/mobile#4786 ·
Los mantenedores suelen responder en 2 días
-
bluetooth bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
MerginMaps/mobile#4741 ·
Los mantenedores suelen responder en 2 días
-
bug ui/ux
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
MerginMaps/mobile#4669 ·
Los mantenedores suelen responder en 2 días
-
bug Good first issue ui/ux
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
MerginMaps/mobile#4665 ·
Los mantenedores suelen responder en 2 días
Todos los issues de MerginMaps/mobile
Issues similares
-
Issue-Docs Needs-Triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
microsoft/winget-cli#6692 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
stratum-mining/sv2-tp#167 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
HarperFast/rocksdb-js#1118 ·
Los mantenedores suelen responder en 1 día
-
bug triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
26.04 bug dark-mode Easy Hack impress symptom: visual
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
CollaboraOnline/online#16421 · 1 comentario ·