Skip to content
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

Fixed action_date in action_logs #16469

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from
Open

Fixed action_date in action_logs #16469

wants to merge 13 commits into from

Conversation

snipe
Copy link
Owner

@snipe snipe commented Mar 10, 2025

This should fix an issue where we were not always including an action_date in the action_logs table, which meant that sorting by date could get a little confusing in history, since every item has a created_at, but action_date was meant to be an override in case the action "really" happened in the past or future. We always want to record the actual date the action was recorded, but also wanted to display the date the action was taken, which could sometimes be different.

This also adds a boot method to make sure that action date is correctly recorded on every action_log entry, and adds an index to the action_date since it's something that is likely to be searched on or sorted on.

I do know @uberbrady is working on a refactor of the logging system, so parts of this change might be subsumed or replaced when his PR is ready, but this solves the immediate problem.

Copy link

what-the-diff bot commented Mar 10, 2025

PR Summary

  • Initialization time for actions enhanced: Now actions will automatically have their date and time set at the moment the action takes place if no other date/time is specified.

  • Reduced redundancy in logging functions: An unnecessary check for the action date has been removed, simplifying the process.

  • Added a History Presenter feature: This new class improves the way we track history by organising it into a neat data table layout.

  • Improved handling of action dates: Created a way to copy timestamps from when items were created over to their corresponding action dates where such dates are missing. Also, made this field easier to search within the action logs.

  • Language updates: Included 'action date' and 'admin user' in translation files for multilingual compatibility.

  • Improved views with History Presenter: Integrated the data table layout into multiple views for better management and visualisation of logging history.

  • Improved display of file creation dates: Dates when files were created are now displayed in a more readable format.

  • Added feature to view history of components: Now you can view a component's history logs and data under a dedicated 'History' tab.

  • Implemented History presenter for license history table: Providing a data layout for better management, and removing the older cumbersome structure.

  • Implemented History presenter for activity report table: Providing a data layout structure for better organisation, and removing the older cumbersome structure.

@snipe snipe requested a review from marcusmoore March 12, 2025 14:57
Copy link
Collaborator

@marcusmoore marcusmoore left a comment

Choose a reason for hiding this comment

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

Looks good 👍🏾

'activity_report' => 'Activity Report',
'address' => 'Address',
'admin' => 'Admin Settings',
'admin_user' => 'Admin User',
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think this one is actually used?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants