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

Adds snipeit:remove-explicit-eols command #15065

Merged
merged 7 commits into from
Aug 22, 2024

Conversation

Godmartinz
Copy link
Collaborator

@Godmartinz Godmartinz commented Jul 10, 2024

Description

This adds snipeit:remove-explicit-eols . This command allows you to provide the Asset model name and then removes the explicit EOLs that are applied to all assets with that model and updating them, this will refresh the assets with the Asset Model's EOL behavior.

This also adds an "all" option to update all assets.

Command Options Help:
image

Updating All Assets:
image

Updating one Model:
image

Error:
image

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • [ x] 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:

@Godmartinz Godmartinz requested a review from marcusmoore July 10, 2024 18:01
@Godmartinz Godmartinz requested a review from snipe as a code owner July 10, 2024 18:01
@Godmartinz Godmartinz changed the base branch from master to develop July 10, 2024 18:02
Copy link

what-the-diff bot commented Jul 10, 2024

PR Summary

  • Introduction of a New Command for Asset Management
    The team added an important file known as RemoveExplicitEols.php within the directory app/Console/Commands. This particular file comprises a fresh command named RemoveExplicitEols. The function of this command is to eradicate explicitly defined "End-of-Life" statuses on selected assets. Now, these assets can directly inherit the "End-of-Life" timeline set in the asset model, streamlining the asset management process.

@snipe
Copy link
Owner

snipe commented Jul 11, 2024

I don't see any harm in including this I guess. Normally we would just run a quick SQL command.

@Godmartinz
Copy link
Collaborator Author

Godmartinz commented Jul 11, 2024

I don't see any harm in including this I guess. Normally we would just run a quick SQL command.

the Asset Model EOL is not inherited if you clear the columns only. There is some logic in the update/save method that applies the asset model EOL if it is null.

@Godmartinz Godmartinz requested a review from snipe July 11, 2024 17:05
@snipe snipe merged commit 456c7d8 into snipe:develop Aug 22, 2024
8 of 9 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.

2 participants