snipe / snipe-it

A free open source IT asset/license management system
https://snipeitapp.com
GNU Affero General Public License v3.0
10.86k stars 3.14k forks source link

Edit Model, Resets Custom Fields (Even if using same fieldset) #15249

Open jayavman opened 1 month ago

jayavman commented 1 month ago

Debug mode

Describe the bug

If you go to an asset and change the model it then resets the custom fields

Reproduction steps

1.Edit Asset

  1. Edit model to a different model
  2. as soon as you change the model on the page, it resets the custom fields and you have to reenter the information

...

Expected behavior

Keep custom fields and not need to re-enter information If its using the same fieldset as the previous model

Screenshots

No response

Snipe-IT Version

v7.0.5 build 14092 (g294fb1f77)

Operating System

almalinux

Web Server

apache

PHP Version

8.1.29

Operating System

No response

Browser

No response

Version

No response

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

No response

Additional context

No response

snipe commented 1 month ago

How often does this come up? Seems like a fringe case

jayavman commented 1 month ago

It comes up a lot. So when we do a lifecycle change on an asset. We keep the same asset number but update the asset with the new item. Majority of the time it has a new model change. When you do this the custom fields will reset.

snipe commented 1 month ago

When you say asset number, you mean tag? What’s the reason for this workflow? It seems like that defeats a lot of the purpose of the system, since it’s now an entirely different object. (I’m not judging, just trying to understand the reason.)

jayavman commented 1 month ago

How we do things is. Our asset tags remain forever.

Eg.

Asset tag is 12082 We have a Panasonic projector dz120

But when that is end of life we update the information of that asset to the new projector Panasonic dz890

With new serial information and custom field data that needs to be modified. Then in the history we can see that asset id has had 2 projector changes in the history.

We do this to track change out of items as asset ids can never be changed.

Issue is that now if we change the model information it removes all the information in the custom field when you change the model

snipe commented 1 month ago

Huh - I’ve never heard of a workflow like that. Guess there’s still room for surprises in this project. Thanks for sharing that workflow with us.

snipe commented 1 month ago

@marcusmoore @Godmartinz can one of you two take a look at this since I’m on vacation?

marcusmoore commented 1 month ago

I believe this is the same as #15007. I started some work on it already and can pick it back up.