Skip to content

Report links to inactive items as inactive, not unknown - #802

Merged
jacebrowning merged 1 commit into
doorstop-dev:developfrom
Sanjays2402:fix/inactive-link-validation
Jul 26, 2026
Merged

Report links to inactive items as inactive, not unknown#802
jacebrowning merged 1 commit into
doorstop-dev:developfrom
Sanjays2402:fix/inactive-link-validation

Conversation

@Sanjays2402

Copy link
Copy Markdown
Contributor

Closes #726.

Tree.find_item() and Document.find_item() skip inactive items, so ItemValidator._get_issues_tree() never saw an inactive parent and its linked to inactive item branch was unreachable — the lookup raised instead, and the link was reported as linked to unknown item (a DoorstopError) rather than the intended DoorstopInfo.

Both lookups gain an include_inactive flag defaulting to False, so every other caller is unchanged, and the validator opts in. The new test fails on develop with the unknown-item error and passes with the fix.

Tree.find_item() and Document.find_item() skip inactive items, so
ItemValidator._get_issues_tree() never received an inactive parent and
its 'linked to inactive item' branch was unreachable. Validation of a
link to an inactive item raised DoorstopError('no item with UID: ...')
instead of the intended DoorstopInfo.

Both lookups gain an include_inactive flag (default False, so the
existing behaviour is unchanged for every other caller) and the
validator opts in.

Adds a regression test asserting the unknown-item error is no longer
logged when the parent exists but is inactive.
@jacebrowning
jacebrowning merged commit 8e879ef into doorstop-dev:develop Jul 26, 2026
13 checks passed
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.

Links to inacitve items raise DoorstopError instead of DoorstopInfo

2 participants