Mapper: Context is saved but the API never returns it, so the next save erases it

Abierto
#2,930 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
68/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
django, javascript, python
Área
api, backend

Línea de trabajo

Start in core/map_projects/serializers.py and trace MapProjectSerializer, MapProjectDetailSerializer and the create/update serializer; then inspect MapProject.jsx to follow how Context is loaded and saved. Check whether Create similar copies configurations, including the configurations/ path named in the issue. Add coverage for saving Context, reading it after reload and saving again; done when the API returns the saved description and the round trip preserves it.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

component/api component/mapper decision/human-review signal/needs-human signal/quick-win signal/small-scope signal/well-specified stage/triaged type/bug

Found on production (API 2.3.227, Mapper 1.0.31-beta) on 2026-10-20 while preparing the OHDSI 2026 Mapper demo.

The Mapper's Context field (Configure) is stored in MapProject.description. MapProjectCreateUpdateSerializer accepts it, but no read serializer returns it:

  • core/map_projects/serializers.py: MapProjectSerializer.Meta.fields, and so MapProjectDetailSerializer, leave out description. MapProject.CONFIGURATION_FIELDS doesn't include it either.
  • oclmap loads it with setDescription(response.data?.description || '') (MapProject.jsx), so it always loads '', and every save sends description back (formData.append('description', description)).

Reproduced on a project:

  1. Enter Context and save. The map_projects row has the text.
  2. Reload the project. Context is blank.
  3. Save again for any reason. description is now '' in the database.

Every user who fills in Context loses it on the next save after a reload, with no warning.

Acceptance criteria

  • GET on a map project returns description.
  • After a reload the Mapper shows the saved Context, and saving keeps it.
  • Decide whether Create similar copies Context; if so, include it in configurations/.
  • A test covers the save, read and save-again round trip.
Lenguaje dominante
Sin datos de lenguaje
Estrellas
4
Forks
2
Merge medio
2 h 12 min
PR fusionados (30 d)
1

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de OpenConceptLab/ocl_issues

Todos los issues de OpenConceptLab/ocl_issues

Issues similares

Más issues de Backend & API Design

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.