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

Đang mở
#2,930 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
68/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
django, javascript, python
Lĩnh vực
api, backend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
4
Fork
2
Merge trung bình
2 giờ 12 phút
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của OpenConceptLab/ocl_issues

Tất cả issue của OpenConceptLab/ocl_issues

Issue tương tự

Thêm issue về Backend & API Design

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.