Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

feat(einsatzdaten): the address model cannot hold a house number, PLZ or Ort

Đã đóng
#401 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

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

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
42/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
csharp, sqlite
Lĩnh vực
backend, database

Hướng nghiên cứu

Start with Incident.cs, Formatting.Address, and the existing migration chain in Sqlite/Migrations.cs (currently v21); then trace the fields through IncidentDataDialogView.axaml, IncidentHeaderSection.cs, and the sync snapshot. The issue leaves open whether District remains distinct from Place, so settle that design question before changing the model. Done means optional address fields are migrated and carried through the form, formatting, PDF header, and sync.

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

Mô tả

enhancement

From a portability review of main (ecb341b).

The gap

An incident's location is two free-text fields and nothing else:

// src/LageBuch.Domain/Incident.cs
public string? Street   { get; private set; }   // :40
public string? District { get; private set; }   // :42

Columns incident_meta.street and incident_meta.district; Formatting.Address joins them with ", "; the placeholders are z. B. Hauptstr. 12 and z. B. Puch (IncidentDataDialogView.axaml:31,34). There is no house-number field (it goes in Street by convention), no PLZ, no Ort, no country.

Why it is a limit even in Bavaria

For a Feuerwehr documenting incidents inside its own Gemeinde this is exactly right and adding fields would be noise. It stops working in two cases that are not unusual:

  • Überörtliche Hilfe. The Ort is the discriminating field and there is nowhere to put it. Today it goes in District, which then means something different from one incident to the next.
  • A Landkreis-level ELW. Same problem, permanently.

The PDF header (IncidentHeaderSection.cs:53) and the Einsatzbericht that reaches the Kreisbrandinspektion inherit the ambiguity.

Outside Germany it is a harder stop: UK postcodes and US city/state/ZIP have nowhere to go at all.

Proposal

Add HouseNumber, PostalCode and Place to incident_meta, keep Street and District, and keep every field optional so the current one-Gemeinde workflow stays a two-field form. Formatting.Address grows a canonical join that drops the empties.

.fwincident has a real migration chain (Sqlite/Migrations.cs, currently at v21) so this is a routine additive migration — no data loss, old files open with the new fields null.

Fields follow through to IncidentDataDialogView, IncidentHeaderSection, and the sync snapshot.

Open question

Whether District (Ortsteil) survives as its own field once Place exists, or whether the two collapse. I lean towards keeping both — an Ortsteil is genuinely how a rural incident gets located, and it is not a city district.

Ngôn ngữ chính
C#
Star
1
Fork
3
Merge trung bình
4 giờ 15 phút
Pull request đã merge (30 ngày)
181

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 CodeForFire/lagebuch

Tất cả issue của CodeForFire/lagebuch

Issue tương tự

Thêm issue về C#

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.