An imported campaign's rules link back to their content pack (export schema 19) (#1070) #1094
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/1070-rule-cards-relink"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #1070.
The facts first
The issue was written from a summary, so the premise was checked before building. It holds: the link did not travel.
prep_shelf_archive.pysaid so in its docstring, and the round-trip tests assertedreference_entry_id is Noneafter an import.shelf_cards.reference_entry_idshelf_pins.reference_entry_idprep_items.reference_entry_idlore_entries.source_reference_entry_identries[].refin JSONA pack and a record can be named across servers without a migration:
content_packs.key, unique among instance packs and kept when the same source is loaded again;(kind, slug)within its pack, which survives a reload where its id does not.Summary
{"pack": {"key", "scope", "system_key", "version", "sha256"}, "kind", "slug"}. No id is written or read. Its own content travels as before, so it reads correctly with or without the link.sha256, or equal stated version): linked;rule_links: {relinked, other_version, left_alone, no_pack, no_entry}, shown on the result screen.Limits
docs/OPERATIONS.mdsays so.Not done here, to be filed
Character sheet content rows keep the old server's
pack_idandentry_id.sheet_service.resolve_entrieslooks records up by that stored id, so an id from a file is honoured there today, behind its own_usableguard. Rewriting those references with the new resolver touches what the sheet evaluator keys on.Changelog
changelog.d/1070-rule-cards-relink.added.mdTest plan
7984 passed, 14 skipped, 107 deselected.tests/export/test_export_rule_links.py, 28 cases: the three import cases; a disabled or noticed pack; a malformed reference; a schema 18 file with and without the new fields; the report's counts; nothing linked by an id from the file. "Another server" is a reload of the pack after the export, which gives every record a new id.reference_entry_id is Nonechecks now expect the link, and "two imports share nothing" allows the shared pack record.unclassified: none.ImportCampaignForm,NewCampaign,AdminImport:62 passed; eslint 0 errors.🤖 Generated with Claude Code