snipe-it icon indicating copy to clipboard operation
snipe-it copied to clipboard

Location values in DB are gone

Open rodeff opened this issue 8 years ago • 4 comments

Expected Behavior (or desired behavior if a feature request)

Noticed when generating report that a lot of assets are missing location values. Checked in the web interface and all of them have location displaying just fine, but when I opened the DB, 1/3 of our assets are missing the value in the location column. Strange thing is that in the web interface the location is displaying just fine.


Actual Behavior

In the reports and in the database 1/3 of the assets are missing their location, but it displays just fine in the front end.


Please confirm you have done the following before posting your bug report:

  • [x] I have enabled debug mode - no errors displayed.
  • [x] I have read checked the Common Issues page - yes and couldn't fine anything related to this issue.

Provide answers to these questions:

  • Is this a fresh install or an upgrade? Upgrade.
  • Version of Snipe-IT you're running - v4.1.10 build 3249 (g8d3a214)
  • Version of PHP you're running - 7.1.9
  • Version of MySQL/MariaDB you're running - MariaDB 10.0
  • What OS and web server you're running Snipe-IT on - Windows 2016
  • What method you used to install Snipe-IT (install.sh, manual installation, docker, etc) - GIT
  • WITH DEBUG TURNED ON, if you're getting an error in your browser, include that error - No error
  • What specific Snipe-IT page you're on, and what specific element you're interacting with to trigger the error - */hardware
  • If a stacktrace is provided in the error, include that too.
  • Any errors that appear in your browser's error console. - n/a
  • Confirm whether the error is reproducible on the demo: https://snipeitapp.com/demo. - Not reproducible.
  • Include any additional information you can find in storage/logs and your webserver's logs.
  • Include what you've done so far in the installation, and if you got any error messages along the way.
  • Indicate whether or not you've manually edited any data directly in the database - Yes, but long time ago and not modifying the locations.

Please do not post an issue without answering the related questions above. If you have opened a different issue and already answered these questions, answer them again, once for every ticket. It will be next to impossible for us to help you.

https://snipe-it.readme.io/docs/getting-help

rodeff avatar Feb 06 '18 06:02 rodeff

If you reload the locations table (using the little reload icon, not reloading the browser screen) does anything show up? Is there anything in your storage/logs? If you try to search in the table search field, does anything come up? If you clear your cookies and cache, does that affect anything?

snipe avatar Feb 06 '18 16:02 snipe

Actually, in re-reading this, I think I’m diagnosing the wrong problem.

but when I opened the DB, 1/3 of our assets are missing the value in the location column.

Did you run the location sync after upgrading? https://snipe-it.readme.io/docs/asset-location-sync

We changed the way locations were handled a few point releases ago, and while future updates will update the location_id in the assets table, you have to run that asset sync script once (just once) to copy over all of the correct location IDs based on RTD location, whether or not they’re assigned, etc.

snipe avatar Feb 06 '18 16:02 snipe

Hi, Welcome back. You are right, even thought I knew this, I might have missed to run the command. Now everything seems to be fine. Thanks much. Just one suggestion - you can add this to the common issues page, so it will be easier to find it :)

Wish you all the best and thanks again.

rodeff avatar Feb 07 '18 06:02 rodeff

Closing.

rodeff avatar Feb 07 '18 06:02 rodeff