Repository navigation
Make the task ID property remappable (#2574) - #2576
Merged
Merged
Conversation
Adds an id entry to the field mapping (default id) and uses it wherever the stable ID is read or written: reading tasks, creation, conversion and updates, the API field catalog, user-field reservation, and the canonical mdbase type merge (which now follows the mapping and moves the existing ID generator and uniqueness rule on rename). The settings page shows it as Task ID under metadata properties. Reminder IDs are unchanged. Requires @tasknotes/model 0.3.1.
This was referenced Nov 17, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2574 when merged. The task ID property can now be remapped like the other task properties, for example to
tasknote_id.Requires
@tasknotes/model0.3.1 (callumalpass/tasknotes-model#30, published to npm).package.jsonandpackage-lock.jsonpin 0.3.1 with its integrity hash.Changes
FieldMapping.idis optional and defaults toid. Settings saved without it keep usingid, so existing vaults are unchanged.customFrontmattercan't overwrite it.idin templates or custom frontmatter is left alone as ordinary data.catalog.fields()reports the mappedfrontmatterKeyforid.getByIdand the HTTP/MCP lookups follow automatically because they useTaskInfo.id.implements[].fields.idis read into the mapping.collection.uniquerule move to the new property, and the old generator is removed.id.ids are untouched.docs/releases/unreleased.md.Not changed
mdbase.yamlid_fieldfor existing collections. The model writes the mapped name for new collections, but the plugin doesn't rewritemdbase.yamlwhen the mapping changes.Checks (local, against a packed build of the model branch)
npm run typecheck,npm run lint(incl. architecture conformance),npm run i18n:check,npm run docs:checkandnpm run buildall pass.jest: 6507 passed. This includes newtests/unit/issues/issue-2574-remappable-id.test.ts, an API catalog case and a type-rename case inmdbaseMeaning.test.ts. The COMPAT-02 case now generates from the mapping its type declares.e2e/issues/issue-2574-remappable-id.spec.tspasses. It remaps totasknote_id, creates a task, finds it by ID and checks the settings label.e2e/tasknotes.spec.ts: 109 passed, 1 failed.