Skip to content

Update notification titles when a puzzle is renamed - #578

Closed
KingLizard1020 wants to merge 10 commits into
crosshare-org:masterfrom
KingLizard1020:fix-notification-titles
Closed

Update notification titles when a puzzle is renamed#578
KingLizard1020 wants to merge 10 commits into
crosshare-org:masterfrom
KingLizard1020:fix-notification-titles

Conversation

@KingLizard1020

Copy link
Copy Markdown
Contributor

When you rename a puzzle, the puzzle document gets the new title but existing notifications still show the old one. They store a copy of the name as pn, and nothing was writing that back on title edits.

This updates those records in the puzzleUpdate trigger, same approach we already use when privateUntil changes. Added a test that renames one puzzle and checks only that puzzle’s notifications pick up the new title.

Fixes #577

@mdirolf mdirolf left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks great but can you find a way to clean up the commit history so you aren't deleting / recreating the puzzleUpdate test file multiple times? It just makes it harder to use git blame down the line. If you can't change it on this PR maybe a new PR with just the final changes to the two files?

Again - looks great! Thank you very much for contributing

@KingLizard1020

Copy link
Copy Markdown
Contributor Author

Hi!

Yes of course sorry about that, no clue what happened but was having some issues yesterday.

@KingLizard1020

Copy link
Copy Markdown
Contributor Author

Squashed this into a single commit as requested. New PR with the same two-file change and a clean history: #579

Closing this one so git blame is not polluted by the intermediate test-file delete/recreate commits.

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.

Update puzzle title in notification records when it is changed

2 participants