Skip to content

Fix document metadata links on transaction postings#2282

Open
cvaske wants to merge 3 commits into
beancount:mainfrom
cvaske:cv/issue-1866-doc-links
Open

Fix document metadata links on transaction postings#2282
cvaske wants to merge 3 commits into
beancount:mainfrom
cvaske:cv/issue-1866-doc-links

Conversation

@cvaske

@cvaske cvaske commented May 17, 2026

Copy link
Copy Markdown

When a document metadata key is attached to a posting rather than the transaction itself, the journal view was generating a broken link missing the entry_hash parameter. This was caused by _render_metadata being called without entry_hash for posting-level metadata in _journal_table.html. A second related bug in statement_path meant that even with a valid entry_hash, the backend only searched entry.meta and not posting-level metadata, so the document could never be resolved. Both are fixed, with a test covering the posting-level case.

Additionally, updating python test snapshots to ensure make test passes.

Fixes #1866

When a document metadata key is attached to a posting rather than the
transaction itself, the journal view was generating a broken link
missing the entry_hash parameter. This was caused by _render_metadata
being called without entry_hash for posting-level metadata in
_journal_table.html. A second related bug in statement_path meant that
even with a valid entry_hash, the backend only searched entry.meta and
not posting-level metadata, so the document could never be
resolved. Both are fixed, with a test covering the posting-level case.

Additionally, updating python test snapshots to ensure testing success.
@cvaske cvaske changed the title Fix document metadata links on transaction postings #1866 Fix document metadata links on transaction postings May 17, 2026
@cvaske cvaske marked this pull request as draft May 17, 2026 22:03
@cvaske cvaske marked this pull request as ready for review May 18, 2026 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing entry_hash in link to document

1 participant