Conversation
Introduce a stop_datetime column and support for auto-unpublishing notifications. Adds a migration to add stop_datetime, updates the Notification model with a future-date validation, a currently_active scope, and expire_past_due! (uses update_all to mark past-due items unpublished). Admin controller and form now permit and edit stop_datetime (with a clear button), and the API controller calls Notification.expire_past_due! before serving notifications. Tests and factory updated to cover the new behavior.
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
…nhancements-admin-messages-to-end-based-on-set-stop-datetime
updated spacing really as the rails is not using 8.1, plus added one new filed in notification table stop_datetime
…nhancements-admin-messages-to-end-based-on-set-stop-datetime
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Implemented scheduled expiration for notifications, allowing users to set a specific future timestamp (stop_datetime) at which the notification will automatically stop displaying.
Banner usability enhancements - Admin - messages to end based on set: stop datetime
What type of change is it?
[ ] New feature
How was the change tested?
I verified the notification creation flow through the Admin UI and validated the API endpoints using Postman to ensure full end-to-end functionality.