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

Added/Fixed: track changes on asset checkin/out #13557

Merged

Conversation

johnson-yi
Copy link
Contributor

@johnson-yi johnson-yi commented Sep 1, 2023

Description

At the moment changes to action_date, name, status_id, location_id and expected_checkin during Asset checkin/out are not tracked in the actionlog
image
Currently missing changes
image

This PR fixes the actionlog to contain these changes
image

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Tested via UI and API

  • Checked out asset with no changes
  • Checked in asset with no changes
  • Checked out asset with changes
  • Checked in asset with changes

Test Configuration:

  • PHP version: 8.1.22
  • MySQL version
  • Webserver version: Apache/2.4.57
  • OS version: Ubuntu

Checklist:

@what-the-diff
Copy link

what-the-diff bot commented Sep 1, 2023

PR Summary

  • Addition of New Property to Event Classes
    The classes CheckoutableCheckedIn and CheckoutableCheckedOut, associated with tracking check-ins and check-outs in the system, now include a new property called originalValues. This addition will aid in retaining historical data which could prove useful for user behaviour analysis or restoring system states.

  • Modification of Controller Methods for Check-in/Check-out Actions
    Changes have been made to methods in the AssetsController (responsible for managing assets) and AssetCheckinController (specifically handling check-in functionality for assets). These modifications involve capturing and passing on original values at the time of an asset's check-in.

  • Changes to Methods in Asset Model and Loggable Model
    Modifications to the checkOut method in the Asset model and logCheckout and logCheckin methods in the Loggable model were made. These changes are designed to capture the original values during check-out and log events, allowing for a more nuanced tracking of attribute changes over time.

These enhancements aim to record the original state data during asset transactions (both check-ins and check-outs), which provides a rich history of asset transitions giving better auditing capabilities and improved troubleshooting capacity in the case of asset-related issues.

@johnson-yi johnson-yi force-pushed the fixes/add_changes_to_checkinout_actionlog branch from ada851c to 09f7b3d Compare September 1, 2023 03:13
@snipe
Copy link
Owner

snipe commented Sep 5, 2023

I know we have a lot of overhauling right now on the logging system. I'd probably want @spencerrlongg to take a look at this and make sure it won't conflict with the work he's doing. (He wasn't feeling well last week, so I'm not sure if he'll be in today or not though.)

Copy link
Collaborator

@spencerrlongg spencerrlongg left a comment

Choose a reason for hiding this comment

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

I think this makes sense for now 👍

@snipe snipe merged commit d6dd332 into snipe:develop Sep 5, 2023
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.

3 participants