diff --git a/app/models/card.rb b/app/models/card.rb index 74818320e..ba26a18d7 100644 --- a/app/models/card.rb +++ b/app/models/card.rb @@ -45,7 +45,7 @@ class Card < ApplicationRecord transaction do old_collection = Collection.find_by(id: collection_id_before_last_save) if old_collection.present? - track_event "collection_changed", particulars: { + track_event "collection_changed", particulars: { old_collection: old_collection.name, new_collection: collection.name } diff --git a/test/models/card_test.rb b/test/models/card_test.rb index 01405ef25..f99bdec70 100644 --- a/test/models/card_test.rb +++ b/test/models/card_test.rb @@ -133,10 +133,10 @@ class CardTest < ActiveSupport::TestCase card = cards(:logo) assignee = users(:david) card.toggle_assignment(assignee) - + collection = collections(:private) assert_not_includes collection.users, assignee - + card.update!(collection: collection) assert_includes collection.users.reload, assignee end