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

Current Location value doesn't change for assets checked out to assets #11744

Open
2 tasks done
scott-horn opened this issue Aug 26, 2022 · 3 comments
Open
2 tasks done

Comments

@scott-horn
Copy link

Debug mode

Describe the bug

Expectation is that an asset checked out to an asset will change location with the asset it's checked out to the same way user/assets work. For example, a Camera asset checked out to a Case asset. The Camera asset changes its current location to be that of the Case asset when it's checked out to it the same way an as when an asset is checked out to a user. When the Case asset has it's default/current location changed, the Camera asset does not change with it, it still remains the same current location of the Case asset when it was checked out to it. If you change the location of the Case asset again the Camera asset still does not change, it's still the same current location as the Case was when the Camera was checked out to it. Checking in the Camera and then checking out the Camera to the same Case after the location change updates the Camera's current location. I have confirmed that this same scenario with a user/asset does in fact update the asset's current location when the user's default/current location is changed.

Currently using Version v6.0.8 - build 8409 (master)

Reproduction steps

  1. Check out asset1 to asset2.
  2. Confirm asset1's current location changes to asset2's default/current location.
  3. Change asset2's default location.
  4. Check asset1's current location. It will still show the original location of asset2 when it should have updated automatically to assets2's new default/current location.

Expected behavior

When updating an asset's default/current location that has assets checked out to it, the expectation is that the assets checked out to it automatically update to the new location with the asset it's checked out to. This is currently not the case for the version I'm working on.

Screenshots

No response

Snipe-IT Version

v6.0.8 - build 8409 (master)

Operating System

Ubuntu 22.04

Web Server

Apache

PHP Version

PHP 8.0.21 (cli) (built: Jul 13 2022 08:26:57) ( NTS )

Operating System

Windows 10 21H2

Browser

Chrome

Version

104

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

There are no error messages as this is behavior based.

Additional context

I am working on a fresh install with an imported and migrated DB.

@welcome
Copy link

welcome bot commented Aug 26, 2022

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@ccj9874
Copy link

ccj9874 commented Sep 23, 2022

This is an interesting situation that caught my eye, I was able to recreate this using the SnipeIT demo by following your steps you included. Its possible that this is a situation or use case that simply wasn't considered, but the situation you described is very plausible would be a great use of the option to check out to assets if it worked as you were hoping.

@jose-duarte
Copy link

jose-duarte commented Dec 6, 2023

Same problem here, we even have it on three levels, assets which are inside of a case which are then inside of a flight case.
The only thing I wanted to note here, is that if you sync the locations using this command https://snipe-it.readme.io/docs/asset-location-sync then it fixes the location correctly.
So this should all be attached to the action of check-in and check-out to trigger the location change of all "children"

Snipe-IT Documentation
If your asset locations don't seem to be reporting correctly, meaning they are checked out but their current location doesn't match the location of whoever/whatever they're checked out to, we have an artisan command to sync them up with where they should be. (This could have happened if your migrati...

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

3 participants