-
-
Notifications
You must be signed in to change notification settings - Fork 449
Add CLI script for managing the admin notifications with advanced filtering #4973
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
base: main
Are you sure you want to change the base?
Add CLI script for managing the admin notifications with advanced filtering #4973
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new CLI shell script for managing admin notifications in OpenMage with advanced filtering and safety features. The script provides comprehensive functionality for cleaning up notifications while protecting unread messages by default.
Key changes:
- New shell CLI script with advanced filtering options (date, severity, read status)
- Built-in protection for unread notifications with explicit override requirement
- Dry-run preview mode with tabular output for safe operation verification
…leanup' into maintenance/admin-notification-cleanup
|
Add CLI script for managing the admin notifications with advanced filtering
This PR introduces a shell CLI script (
shell/notifications.php
) for advanced management of the admin notifications.Features
Advanced filtering:
--before YYYY-MM-DD
)--severity-0
,--severity-1
,--severity-2
,--severity-3
)--only-read
,--include-unread
)Preview mode (
--dry-run
):Protection for unread notifications:
--include-unread
is specified--all
is used without--include-unread
, the script aborts and displays a clear error message, including the count of unread notificationsSafe bulk deletion:
--all --include-unread
)Flexible deletion and preview:
Clear error reporting and usage instructions:
Usage examples
Important
=
):--before 2024-01-01