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

Remove old_state and new_state #1708

Merged
merged 1 commit into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions app/components/timeline_entry/component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,14 @@ def status_changed_vars
old_status:
render(
StatusTag::Component.new(
status:
timeline_event.old_state.presence || timeline_event.old_value,
status: timeline_event.old_value,
class_context: "timeline-event",
),
).strip,
new_status:
render(
StatusTag::Component.new(
status:
timeline_event.new_state.presence || timeline_event.new_value,
status: timeline_event.new_value,
class_context: "timeline-event",
),
).strip,
Expand Down
2 changes: 0 additions & 2 deletions app/models/timeline_event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
# mailer_action_name :string default(""), not null
# mailer_class_name :string default(""), not null
# message_subject :string default(""), not null
# new_state :string default(""), not null
# new_value :text default(""), not null
# old_state :string default(""), not null
# old_value :text default(""), not null
# requestable_type :string
# subjects :text default([]), not null, is an Array
Expand Down
2 changes: 0 additions & 2 deletions config/analytics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -389,10 +389,8 @@
- mailer_action_name
- mailer_class_name
- message_subject
- new_state
- new_value
- note_id
- old_state
- old_value
- requestable_id
- requestable_type
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
class RemoveStateFromTimelineEvents < ActiveRecord::Migration[7.0]
def change
change_table :timeline_events, bulk: true do |t|
t.remove :old_state, type: :string, default: "", null: false
t.remove :new_state, type: :string, default: "", null: false
end
end
end
2 changes: 0 additions & 2 deletions db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 0 additions & 15 deletions lib/tasks/timeline_events.rake

This file was deleted.

2 changes: 0 additions & 2 deletions spec/factories/timeline_events.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
# mailer_action_name :string default(""), not null
# mailer_class_name :string default(""), not null
# message_subject :string default(""), not null
# new_state :string default(""), not null
# new_value :text default(""), not null
# old_state :string default(""), not null
# old_value :text default(""), not null
# requestable_type :string
# subjects :text default([]), not null, is an Array
Expand Down
2 changes: 0 additions & 2 deletions spec/models/timeline_event_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
# mailer_action_name :string default(""), not null
# mailer_class_name :string default(""), not null
# message_subject :string default(""), not null
# new_state :string default(""), not null
# new_value :text default(""), not null
# old_state :string default(""), not null
# old_value :text default(""), not null
# requestable_type :string
# subjects :text default([]), not null, is an Array
Expand Down