-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Adds require serial as Asset Model option #16947
Conversation
uberbrady
left a comment
There was a problem hiding this 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.
database/migrations/2025_05_12_183803_add_req_serial_bool_to_models_table.php
Outdated
Show resolved
Hide resolved
|
before this gets merged, let me know if you would like me to make any changes 👍 |
|
Any movement on this? [FD48448] |
|
@viclou if there was, you’d have seen it here. |
snipe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see a requiredness indicator on the serial number in those screenshots.
|
Enhancement Request: Improved Asset Tracking - Unique Serial Numbers or Customizable Forms Team, To prevent duplicate asset entries and improve inventory management, we propose two solutions: Enforce Unique Serial Numbers: Implementing a system constraint to ensure unique serial numbers would prevent duplicate entries and significantly improve data accuracy. This is particularly important when assets share the same asset tag but have distinct serial numbers. Customizable Forms with Conditional Serial Fields: Alternatively, providing customizable forms with the ability to show or hide the serial number field would offer flexibility. We have already implemented a workaround using custom fields to prevent duplicate serials, but a built-in solution would be more efficient and user-friendly. We request that you consider incorporating either of these enhancements in a future update. This will greatly improve the accuracy and flexibility of our asset tracking. Thank you for your consideration. |
|
@DECStudioHub - this PR is the solution. It's just still in testing. |
|
@Godmartinz did we get the requiredness indicator handled? |
|
[FD-48448] |
|
@DECStudioHub If you select that on the model, yes, per the original PR summary. |



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:
Bulk Model edit:
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:

(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:

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

Tests have been included.