[5] add2scheduler-deleteactionlogs#41064
Conversation
|
@alikon I've allowed myself to update your branch to latest 5.0-dev and fix the conflict. Please pull the changes before you continue to work on your local clone. |
|
@alikon Could you rename the update SQL scripts to something newer than "5.0.0-2023-07-12.sql" (= newest update SQL right now in the 5.0-dev branch), e.g. to "5.0.0-2023-07-27.sql"? Thanks in advance. |
|
@alikon It needs again to rename the update SQL scripts, this time to something newer than "5.0.0-2023-08-21.sql". I suggest to use "5.0.0-2023-08-25.sql" for this PR here. |
|
done |
|
please resolve conflicts, since the checkin task has been merged. Building multiple PRs editing the same files would better be done based on each other. |
|
@alikon I've solved the merge conflict caused by the recently merged globalcheckin task plugin, so before you continue to work locally on your branch you have to pull the changes from remote. |
plugins/task/deleteactionlogs/src/Extension/DeleteActionLogs.php
Outdated
Show resolved
Hide resolved
Co-authored-by: heelc29 <66922325+heelc29@users.noreply.github.com>
|
@heelc29 The PR is ready for testing. Code style error is not related to the PR but to the current 5.0-dev branch. Could you test again? Testing instructions can be found in the description of this PR. Thanks in advance. |
|
I've updated the testing instructions by more detailed tests. |
plugins/task/deleteactionlogs/src/Extension/DeleteActionLogs.php
Outdated
Show resolved
Hide resolved
|
I have tested this item ✅ successfully on f422632 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/41064. |
|
thanks richard awesome work |
|
thank you all for your help |
split from #40519
Summary of Changes
add the plg_system_actionlogs feature "Days to delete logs after" to a proper scheduled task plugin
Testing Instructions
Hint: The execution times and hours shown for tasks in the administrator are in the UTC timezone.
New installation
Make a new installation with this PR applied.
Check if there is an enabled task scheduler plugin "Task - Delete Action Logs".
Check if there is any scheduled task using that plugin.
Update
On a Joomla 4.4-dev version or 4.4.0 alpha 4, note the endabled status and the configuration parameters of the of the "System - User Actions Log" plugin.
Now either disable that plugin or enable it and optionally change some of the configuration parameters to a value different to the default.
Update to the patched package or custom update URL created by Drone for this PR.
Check if the configuration parameters of the "System - User Actions Log" plugin have been removed.
Check if there is a task scheduler plugin "Task - Delete Action Logs".
Check enabled status and configuration parameters of that plugin.
Check if there is a scheduled task "DeleteActionLogs" using that plugin. If so, check the configuration parameters, too.
Repeat the previous steps with different endabled status of the "System - User Actions Log" plugin and - if enabled - different configuration parameters.
Actual result BEFORE applying this Pull Request
Deletion of outdated user action logs is done by the "System - User Actions Log" plugin.
Expected result AFTER applying this Pull Request
New installation
The "Task - Delete Action Logs" plugin is enabled.
There is no scheduled task using that plugin because on a new installation old user action logs are not configured to be deleted (parameter "Days to delete logs after" = 0).
Update
The configuration parameters of the "System - User Actions Log" plugin have been removed by the update.
A new task scheduler plugin "Task - Delete Action Logs" has been created and is enabled.
If the "System - User Actions Log" plugin was enabled and field "Days to delete action logs after" was set to a value greater than zero in the parameters of that plugin before the update, a new scheduled task "DeleteActionLogs" has been created and is enabled.
The task will execute every 24 hours at the hour of the Joomla installation.
The configuration parameter "Days to delete action logs after" of that task is set to the same value of the same parameter of the old system plugin.
If the old "System - User Actions Log" plugin was disabled or field "Days to delete action logs after" was set to zero in the parameters of that plugin before the update, there is no task for that plugin.
Link to documentations
Please select:
Documentation link for docs.joomla.org: link will be added later
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed