Skip to content
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

Update Status ID on Set-SnipeITAssetOwner #294

Open
Lokiarmos opened this issue Nov 24, 2022 · 1 comment
Open

Update Status ID on Set-SnipeITAssetOwner #294

Lokiarmos opened this issue Nov 24, 2022 · 1 comment

Comments

@Lokiarmos
Copy link

Context

So under the API for check in in you have to specify the status id, it looks like that the code is taking the last status id of the device that is deploy-able.

In an environment where you may be using status that indicate that an assets is deployed you have to set the status to asset first before assigning the status where if we call the API directly we can assign a status at the same time that the device is checked out.

Expected Behavior

The behavior should be over-writable via an option parameter that allow the user to specify a device.

Current Behavior

Takes whatever the current status is.

Possible Solution

Implement a -status_id optional parameter

@PetriAsi
Copy link
Collaborator

PetriAsi commented Dec 2, 2022

For me it seems that snipeit reference is not up to date. Not the first time :)
When looking at snipe-it code app\Http\Controllers\Api\AssetsController.php checkout function does not use status_id at all. And checkin function while using it, does now actually require it. Still file app\Http\Requests\AssetCheckoutRequest.php allows specifying status_id but does not require it.

Reset-SnipeitAssetOwner supports setting status_id if needed. And all cases where I have used it set-snipeitassetowner works fine. Do you have some case where this is making some kind of issue? There's no code in SnipeitPS that alters status_id at checkout it just left out in request.

Maybe this can be reported to snipe-it as reference issue, on their repo.

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

No branches or pull requests

2 participants