-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Update goal in segment #5027
base: master
Are you sure you want to change the base?
Update goal in segment #5027
Conversation
test/plausible/goals_test.exs
Outdated
assert updated_segment.segment_data == %{ | ||
"filters" => [ | ||
["is", "event:page", ["/blog"]], | ||
["is", "event:goal", ["Signup from nav", "SIGNUP"]], | ||
["is", "event:props:variant", ["A"]] | ||
] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue: Noticed that we also override segment updated_at
.
If that's intentional, it would be good to assert it here as well, with something like segment.updated_at < updated_segment.updated_at
.
Alternatively, we may want to not override updated_at on these automatic updates. May be confusing when the message in the UI (Last updated at <stamp> by <name>
) doesn't match with their usual online time.
Or we could also just rephrase it in the UI: Last updated at <stamp>, belongs to <name>
or similar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments inline
%Plausible.Goal{} = stale_goal, | ||
%Plausible.Goal{} = updated_goal | ||
) do | ||
goal_filter_regex = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This requires inline commentary so the reader won't have to wonder what are we trying to achieve here
When a goal's display name is updated, this PR makes it so the segments containing that goal are also updated accordingly