Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#7293] Update Notable#all_notes #8408

Merged
merged 1 commit into from
Nov 22, 2024
Merged

Conversation

gbp
Copy link
Member

@gbp gbp commented Oct 11, 2024

Relevant issue(s)

Fixes #7293

What does this do?

Update Notable#all_notes

Why was this needed?

Update the concern so that records tagged with name:value will be associated with notes tagged as name.

Copy link
Member

@garethrees garethrees left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haven't looked in detail but looks good and be good to have this working

@@ -4,12 +4,20 @@
describe '#all_notes' do
subject { record.all_notes }

before { record.tag_string = 'foo' }
before { record.tag_string = 'foo:1' }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be worth making this an additional spec so that we're testing both foo and foo:1?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep good shout, I have added this in a fixup.

Before this PR we had:

  • PublicBody tagged with "foo:bar" would be associated with a note with tagged with "foo:bar" but not "foo"
  • PublicBody tagged with "foo" would be associated with a note with tagged with "foo" but not "foo:bar"

After this PR:

  • PublicBody tagged with "foo:bar" would be associated with a note with tagged with "foo:bar" or "foo"
  • PublicBody tagged with "foo" would be associated with a note with tagged with "foo" but not "foo:bar"

What do you think about that last case... should a PublicBody tagged with "foo" be associated with a note with tagged with "foo:bar".

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After this PR:

  • PublicBody tagged with "foo:bar" would be associated with a note with tagged with "foo:bar" or "foo"
  • PublicBody tagged with "foo" would be associated with a note with tagged with "foo" but not "foo:bar"

This sounds like the correct behaviour to me.

Update the concern so that records tagged with `name:value` will be
associated with notes tagged as `name`.

Fixes #7293
@gbp gbp force-pushed the 7293-tagged-notes-without-values branch from 6c53468 to 8496335 Compare November 22, 2024 09:27
@gbp gbp merged commit 53a8d38 into develop Nov 22, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Notes set against a key do not render when key:value is present
2 participants