Skip to content

Conversation

@jorgemanrubia
Copy link
Member

The problem was that publishing a card with #publish was tracking the event after updating the status, which was clearing the saved changes and preventing the code from detecting the mention.

See:
https://app.fizzy.do/5986089/cards/2835

The problem was that publishing a card with `#publish` was tracking the event
after updating the status, which was clearing the saved changes and preventing the
code from detecting the mention.

See:
https://app.fizzy.do/5986089/cards/2835
@jorgemanrubia jorgemanrubia merged commit 11dd960 into main Dec 1, 2025
7 checks passed
@jorgemanrubia jorgemanrubia deleted the new-invites-mentions branch December 1, 2025 14:46

# So that we can check it in callbacks when other operations in the transaction clean the changes.
def remember_initial_status
if will_save_change_to_status?
Copy link
Member Author

Choose a reason for hiding this comment

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

moved the if to the callback here e1a78f4


assert_difference -> { Mention.count }, +1 do
card.published!
card.publish
Copy link
Member Author

Choose a reason for hiding this comment

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

this was the reason why the test was passing, becuase it wasn't exercising the event tracking

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