Asset model change
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:
- [ ] I have enabled debug mode
- [ ] I have read checked the Common Issues page
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/logsand 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
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.
Fixed in PR #4781