Fix #169: keep citation links on GEDCOM export #232

Merged
justin merged 1 commits from fix-gedcom-citation-export into main 2026-06-09 12:37:05 -04:00
Owner

Export emitted SOUR records but never the per-fact SOUR links, so a Provenance→Provenance round-trip dropped the sources graph. Now emits citation links on the facts: person (1 SOUR+2 PAGE), name (2 SOUR under NAME), event (2 SOUR under the event, incl. partnership events in FAM), relationship (1 SOUR under FAM). Citations whose source didn't export are skipped.

Test: person + event citation round-trips export→import into a fresh tree with pages intact. GEDCOM suite 6 passed.

Closes #169

🤖 Generated with Claude Code

Export emitted SOUR records but never the per-fact SOUR **links**, so a Provenance→Provenance round-trip dropped the sources graph. Now emits citation links on the facts: person (`1 SOUR`+`2 PAGE`), name (`2 SOUR` under NAME), event (`2 SOUR` under the event, incl. partnership events in FAM), relationship (`1 SOUR` under FAM). Citations whose source didn't export are skipped. Test: person + event citation round-trips export→import into a fresh tree with pages intact. GEDCOM suite 6 passed. Closes #169 🤖 Generated with [Claude Code](https://claude.com/claude-code)
justin added 1 commit 2026-06-09 12:37:04 -04:00
Export emitted SOUR records but never the per-fact SOUR links, so a
Provenance→Provenance round-trip destroyed the sources graph (citations were
dropped). Emit citation links on the facts they sit on:
- person-level → 1 SOUR @Sx@ (2 PAGE)
- name-level   → 2 SOUR under 1 NAME
- event-level  → 2 SOUR under the event (incl. partnership events in FAM)
- relationship → 1 SOUR under FAM
Citations whose source didn't export are skipped.

Test: a person + event citation round-trips through export→import into a fresh
tree with their pages intact. GEDCOM suite 6 passed.

Closes #169

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Justin Paul <justin@jpaul.me>
justin merged commit 6d3147e86d into main 2026-06-09 12:37:05 -04:00
justin deleted branch fix-gedcom-citation-export 2026-06-09 12:37:05 -04:00
Sign in to join this conversation.