Error 404 fixed on submitting without mandatory field #11601
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
NOTE: this is another PR requested because I created PR with 'master' earlier. reference pull: #11557
The issue was related to Bulk Checkout page. If we leave mandatory field blank, it was giving 404 error.
Step 1: Click on 'Bulk Checkout' from left sidebar under 'Asset' tab.
Step 2: Directly click on 'Checkout' button without filling mandatory field 'User' if 'User' is selected in 'Checkout To'.
Step 3: You will be displayed 404 error. ( https://tinyurl.com/282vnoeo )
Fixes # I have fixed of 404 error on Bulk checkout page by giving setting the AssetCheckoutRequest instead of Request instance in BulkAssetsController.php in function storeCheckout. Doing this it will display prorper error as attached in screenshot (https://www.awesomescreenshot.com/image/30575927?key=09b321f39b00222a34bbb8295bb42783 )
Fixes # (issue)
Type of change
Please delete options that are not relevant.
[ # ] Bug fix (non-breaking change which fixes an issue)
How Has This Been Tested?
I have tested this manually. steps are below:
Step 1: Click on 'Bulk Checkout' from left sidebar under 'Asset' tab.
Step 2: Directly click on 'Checkout' button without filling mandatory field 'User' if 'User' is selected in 'Checkout To'.
Step 3: You will be able to see the proper error as attached in screenshot or link. ( https://www.awesomescreenshot.com/image/30575927?key=09b321f39b00222a34bbb8295bb42783 )
Test Configuration:
PHP version: 8.1
MySQL version: 8
Webserver version : Apache
OS version : Ubuntu 20
Checklist:
[ # ] I have read the Contributing documentation available here: https://snipe-it.readme.io/docs/contributing-overview
[ # ] I have formatted this PR according to the project guidelines: https://snipe-it.readme.io/docs/contributing-overview#pull-request-guidelines
[ # ] My code follows the style guidelines of this project
[ # ] I have performed a self-review of my own code
[ # ] I have commented my code, particularly in hard-to-understand areas
[ # ] I have made corresponding changes to the documentation
[ # ] My changes generate no new warnings
[ # ] I have added tests that prove my fix is effective or that my feature works
[ # ] New and existing unit tests pass locally with my changes