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 eager loading for changedinfo and removed encrypted values from Asset history #13507

Merged
merged 13 commits into from
Aug 31, 2023

Conversation

Godmartinz
Copy link
Collaborator

@Godmartinz Godmartinz commented Aug 22, 2023

Description

Checks if a field is encrypted and returns encrypted instead of the hashed string. asset_eol_date now reads EOL date in the Asset History Log

image

Also eager loads the queries with soft deletes which was needed for the changedInfo method

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Test Configuration:

  • PHP version:
  • MySQL version
  • Webserver version
  • OS version

Checklist:

@what-the-diff
Copy link

what-the-diff bot commented Aug 22, 2023

PR Summary

  • Improved Data Protection in ActionlogsTransformer.php
    The logic in this file has been revised for better data security. When a data field is 200 characters long, it is now labelled as "encrypted", ensuring that sensitive data remains private.

  • Added changedInfo Method
    This new method has been added to refine the handling of clean metadata. This ensures more accurate and streamlined data operations.

  • Enhanced Mapping of Key Information
    Specific keys, supplier_id and asset_eol_date, are now directly mapped to Supplier and EOL date in the clean metadata. This enhances data clarity and access.

@Godmartinz Godmartinz marked this pull request as ready for review August 22, 2023 19:39
@Godmartinz Godmartinz requested a review from snipe as a code owner August 22, 2023 19:39
@Godmartinz Godmartinz changed the title WIP removed encrypted values from Asset history Added eager loading for changedinfo and removed encrypted values from Asset history Aug 22, 2023
@Godmartinz
Copy link
Collaborator Author

added soft deletes to all the queries:
$location = Location::withTrashed()->get(); $company = Company::withTrashed()->get(); $supplier = Supplier::withTrashed()->get(); $model = AssetModel::withTrashed()->get();

@marcusmoore marcusmoore mentioned this pull request Aug 28, 2023
2 tasks
@snipe snipe merged commit c515740 into snipe:develop Aug 31, 2023
8 checks passed
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.

None yet

3 participants