Skip to content

Conversation

@marcusmoore
Copy link
Collaborator

This PR adds a quantity column to the action_logs table and enables viewing the quantity checked out and the amount of seats where added/removed when updating a license.


Screenshots

Activity Report

image

Asset History

image

License History

image

Accessory History

image

Consumable History

image

Component History

image


Migrating old data

When adding or removing seats from a license, the notes field is populated with added x seats or deleted x seats so it is possible to use that note field to update the newly created quantity column.

This PR includes a command, snipeit:migrate-license-seat-quantities-in-action-logs, to do just that. I avoided including the logic in a migration in case I missed a detail that ended up screwing up action logs but if it looks good to everyone I can pull that logic into a new migration.

  • ❓ Should I move the command logic to a migration

Database details

In these screenshots of the action log, ID 1-17 were on the develop branch. I switched to this branch starting at ID 18. You'll see the quantity field starts being populated.

image

This is the result after the command is run:
image

Here are action_log entries when items are checked out, accepted, and declined:
image


Semi-related to #17703

Fixes #17816

@marcusmoore marcusmoore marked this pull request as ready for review December 17, 2025 01:37
@marcusmoore marcusmoore requested a review from snipe as a code owner December 17, 2025 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant