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

feat(ex/skate/detours): add activated_at column #2910

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

firestack
Copy link
Member

@firestack firestack commented Dec 18, 2024

To be able to show the activated at time in various places within Skate, as well as for sorting, we need to start recording the time of activation for a detour.
This PR

  • adds the database column
  • backfills the database column so that currently active detours are marked as having been active since the last modification time
  • starts recording the activation time in the state machine when a detour is activated

Asana Ticket: https://app.asana.com/0/0/1208989312907929/f

@firestack firestack marked this pull request as ready for review December 18, 2024 15:53
@firestack firestack requested a review from a team as a code owner December 18, 2024 15:53
@firestack firestack changed the title feat(ex/skate/detours): add activated_at column feat(ex/skate/detours): add activated_at column Dec 18, 2024
@firestack firestack force-pushed the kf/asn/activated-at-column branch 2 times, most recently from 8253272 to fc6cd74 Compare December 19, 2024 21:42
Copy link
Collaborator

@hannahpurcell hannahpurcell left a comment

Choose a reason for hiding this comment

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

One question, otherwise looks great!

lib/skate/detours/detours.ex Show resolved Hide resolved
@@ -81,6 +81,22 @@ defmodule SkateWeb.DetoursControllerTest do
assert Skate.Repo.aggregate(Notifications.Db.Detour, :count) == 1
end

@tag :authenticated
test "adds `activated_at` field when provided", %{conn: conn} do
setup_notification_server()
Copy link
Collaborator

Choose a reason for hiding this comment

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

So far the notification server setup is only used for notification tests. Is there a reason the server is needed for this test?

Copy link
Member Author

@firestack firestack Dec 21, 2024

Choose a reason for hiding this comment

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

@firestack firestack force-pushed the kf/asn/activated-at-column branch from fc6cd74 to ebe052e Compare December 21, 2024 03:19
…t` field

Also update factory to add new field
@firestack firestack force-pushed the kf/asn/activated-at-column branch from ebe052e to ca99c97 Compare December 21, 2024 03:23
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.

2 participants