-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Added the option to make Asset serials required and error messages #14955
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
base: develop
Are you sure you want to change the base?
Conversation
PR Summary
|
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 think there might be a better implementation. Let me know what you think.
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.
Added your suggestions @marcusmoore 👍 |
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.
Looks good 👍🏾 😄
@@ -242,7 +242,8 @@ public function edit($assetId = null) | |||
|
|||
return view('hardware/edit', compact('item')) | |||
->with('statuslabel_list', Helper::statusLabelList()) | |||
->with('statuslabel_types', Helper::statusTypeList()); | |||
->with('statuslabel_types', Helper::statusTypeList()) | |||
->with('settings', Setting::getSettings()); |
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 think we have the settings in a shared view now so this isn't needed, no?
This looks good - might we want to warn folks here if their existing assets do not meet the required and/or uniqueness constraints? |
@Godmartinz sorry, looks like we have some more conflicts here |
Conflicts resolved @snipe 👍 |
Description
So this adds a validation rule
require_serial
. This makes a serial required or nullable based on a boolean in the settings:Unique error:


Required error:
Fixes #FD-41625
Type of change
Please delete options that are not relevant.
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 Configuration:
Checklist: