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

Asset model change

Open mochange opened this issue 10 years ago • 2 comments

Expected Behavior (or desired behavior if a feature request)

I have multiple configurations of a model so each has its own asset model but they use the same custom fields.

Changing models should preserve relevant custom fields


Actual Behavior

If I change the asset model from within the "edit asset" page it loses the data from the custom fields. If I select the asset from the "view assets" page and click edit (like bulk edit) and change the asset model that way the info is preserved.


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


Please provide answers to these questions before posting your bug report:

  • Version of Snipe-IT you're running v3 beta3
  • What OS and web server you're running Snipe-IT on centos7 Apache
  • What method you used to install Snipe-IT (install.sh, manual installation, docker, etc) got pull
  • If you're getting an error in your browser, include that error
  • What specific Snipe-IT page you're on, and what specific element you're interacting with to trigger the error
  • If a stacktrace is provided in the error, include that too.
  • Any errors that appear in your browser's error console.
  • Confirm whether the error is reproduceable on the demo. No
  • Include any additional information you can find in app/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

mochange avatar Jun 23 '16 15:06 mochange

I think the way this would work is we would have to tweak the 'onchange' handler to load up the new 'view', then run through and re-populate the custom-field values that had been saved before. Then, finally, at the end, re-save the custom-field values.

I don't think it'd even be that much JS, really.

uberbrady avatar Jan 10 '18 04:01 uberbrady

Fixed in PR #4781

uberbrady avatar Apr 07 '18 01:04 uberbrady