Skip to content

Adds require serial as Asset Model option #16947

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

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

Conversation

Godmartinz
Copy link
Member

@Godmartinz Godmartinz commented May 14, 2025

This gives users the option to require serials by asset model.
This can be done via each model individually, or through bulk editing models
Model edit:
image
Bulk Model edit:
image

I was concerned with "What if you update an asset model to require serials, how do we deal with that retroactively?" My solution is not to make validation fail if you update an asset w/o a serial, but to provide a 'warning' message that that asset needs a serial appended. it is an undertaking that a user should be prepared to fill.

Asset Update:
image
(If a bad user deletes the serial, that info is readily available in the history log of the asset.)

Moving forward with asset creation, if the Asset model selected requires a serial, a form validation will fire:
image

Require Serial Number is also a sortable field in the Asset Models index:
image

Tests have been included.

@Godmartinz Godmartinz marked this pull request as ready for review May 19, 2025 17:08
@Godmartinz Godmartinz requested a review from snipe as a code owner May 19, 2025 17:08
@Godmartinz Godmartinz requested a review from marcusmoore May 19, 2025 17:08
@Godmartinz Godmartinz changed the title WIP: Adds require serial as Asset Model option Adds require serial as Asset Model option May 19, 2025
Copy link
Member

@uberbrady uberbrady left a comment

Choose a reason for hiding this comment

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

Probably have a few things to talk about in there, but this is very clean code, very well-executed. Let's chat more offline and see if we want to embed in other stuff or take this as-is.

@Godmartinz Godmartinz requested a review from uberbrady May 21, 2025 18:24
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.

2 participants