-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Added #10454: Bulk Checkin #10462
Added #10454: Bulk Checkin #10462
Conversation
@@ -280,6 +281,7 @@ public function availableForCheckout() | |||
* @param Carbon $expected_checkin | |||
* @param string $note | |||
* @param null $name | |||
* @param null $location |
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 noticed that this was not in the notes at this line. So I added it.
@@ -7,6 +7,7 @@ | |||
'does_not_exist' => 'Asset does not exist.', | |||
'does_not_exist_or_not_requestable' => 'Nice try. That asset does not exist or is not requestable.', | |||
'assoc_users' => 'This asset is currently checked out to a user and cannot be deleted. Please check the asset in first, and then try deleting again. ', | |||
'no_assets_selected' => 'You must select at least one asset from the list', |
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.
Refactoring this made the most sense to me. But let me know if there is a different way.
* @author [A. Janes] [<[email protected]>] | ||
* @param Carbon $checkin_at | ||
* @param string $note | ||
* @param null $name |
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 included the $name
variable to keep it consistent with checkOut()
. It isn't going to be used by this PR. But, it seemed like it made sense to keep if this method is reused.
</a> | ||
</li> | ||
@endcan | ||
|
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.
Putting the menu item above bulk checkout made the most sense to me. But again, feel free to offer a different suggestion.
Unit testing successful. Ready for review. |
Your checkin function on the asset doesn't do all the same checks and debugging as the asset checkin controller. -- As an aside, I'd request a followup PR that updates the asset checkin controller to use the new function on the model. |
I am trying to find those checks you are referring to. Perhaps you could give me an example or two?
That would be nice. This PR isn't going to do that since it serves a different purpose. But I like the idea. :) |
@Sxderp Alright, I've been doing some thinking and reviewing on this. Take all of this with a grain of salt, as I could be wrong about design standards...
That being said, the checks you are referring to are performed at different parts of the application, outside of the model. First, the view itself won't let you select an asset that doesn't exist, or isn't eligible for check in. Next, the Thoughts? EDIT: Oh, also, this was designed to work very nearly exactly how the bulk checkout function currently operates. I assume if bulk checkout is written this way, then this is how @snipe wanted bulk checkin written? (Please don't let me put words in your mouth @snipe. I am referring to #10455 (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.
@Sxderp Added comments to the lines of code that perform these checks. Please let me know your thoughts at your convenience. :)
I was mostly talking about this bit: snipe-it/app/Http/Controllers/Assets/AssetCheckinController.php Lines 86 to 107 in 2d304ec
It's backwards compatibility code that likely needs to remain even for bulk checkin. |
@Sxderp Got ya. I will work on implementing that. Thank you so much for clarifying. :) You are correct. Implementing it into the model itself would be ideal, especially because it's to correct a backwards compatibility issue that affects the model itself. |
Alright, I pushed that update, but I haven't had the chance to test it. I will try to get testing in today. |
…nnot_be_null Fixes: Column activated cannot be null [sc-18528]
Because #10455 was merged, there is the potential that this PR may be un-needed entirely now. However, continuing to operate under the assumption that this COULD be potentially merged in the future, what would make the most sense in terms of menu arrangement for this? Would it make sense to rename "Quick Scan Checkin" to "Bulk Checkin" and offer the option of which experience the user wants? Just spit balling UI/UX ideas here. |
Apologies for reopening this but in my opinion there's still space for bulk checkin since it still differs from the "Quick Scan Checkin" menu. The biggest point is for people not using a barcode scanner, when you do a bulk checkout, you can easily use your numpad to write down the X digits of your asset tag and press enter (it will search on the background for the best match). Hopefully you consider moving forward with this feature which could still co-live with the quick scan. |
Description
This will add an additional menu option and page for 'Bulk Checkin'. This page will allow you to bulk checkin assets in a similar way to bulk checkout.
Adds #10454 #9551
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: