Skip to content

GO-6803 Fix Set by Relation not finding objects with unactivated properties#3047

Open
KirillSto wants to merge 5 commits intodevelopfrom
go-6803-fix-set-by-relation-unactivated-properties
Open

GO-6803 Fix Set by Relation not finding objects with unactivated properties#3047
KirillSto wants to merge 5 commits intodevelopfrom
go-6803-fix-set-by-relation-unactivated-properties

Conversation

@KirillSto
Copy link
Copy Markdown
Member

Summary

  • When querying by relation source (e.g. "Set by Relation: Done"), the subscription filter now also matches objects whose type recommends the relation, not just objects that physically have the key in their details
  • Adds typesRecommendingRelation() helper that queries the object store for types whose recommendedRelations, recommendedFeaturedRelations, or recommendedHiddenRelations contain the given relation
  • The filter becomes FilterExists{Key} OR TypeIn(types recommending relation), with graceful fallback to the original FilterExists-only behavior on errors

Linear

GO-6803

Test plan

  • New test "relation source includes objects whose type recommends the relation" — verifies objects without the key but with a recommending type are found, while objects of unrelated types are excluded
  • All existing subscription tests pass (go test ./core/subscription/...)
  • Database filter tests pass (go test ./pkg/lib/database/...)

🤖 Generated with Claude Code

…erties

When querying by relation source (e.g. "Set by Relation: Done"), the
subscription filter now also matches objects whose type recommends the
relation, not just objects that physically have the key in their details.
This fixes the case where a relation is added to a type but existing
objects never get the key written until the user interacts with it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@KirillSto KirillSto self-assigned this Mar 25, 2026
@KirillSto KirillSto marked this pull request as draft March 25, 2026 08:47
@github-actions
Copy link
Copy Markdown

New Coverage 46.7% of statements
Patch Coverage 70.4% of changed statements (19/27)

Coverage provided by https://github.com/seriousben/go-patch-cover-action

@KirillSto KirillSto requested a review from deff7 April 3, 2026 13:40
@KirillSto KirillSto marked this pull request as ready for review April 3, 2026 13:40
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.

1 participant