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

User/Asset Merge Feature Request

Open Oscillometer opened this issue 6 years ago • 11 comments

Server (please complete the following information):

  • Snipe-IT Version v4.8.0 - build 4186 (master)
  • OS: Snipe-IT Hosted
  • Web Server: Snipe-IT Hosted
  • PHP Version: 7.1.33

Is your feature request related to a problem? Please describe. I was dropped into managing a very poorly setup Snipe-IT instance. There were hundreds of duplicate assets, users, and locations. Several other asset systems I previously worked in allowed merging of assets or users to correct duplications. Currently working with support to try and mass manipulate the database to consolidate my users as manually editing them would take months.

Describe the solution you'd like The option to initiate a merge of users, and if possible assets, together. It would be located in the bulk action drop down menu where "Bulk Checkin & Delete" is located.

It would work as follows: Select multiple users/assets Select "Merge" from the dropdown menu You are brought to a corresponding /users/merge or /hardware/merge The selected users/assets would display on the screen with radio buttons next to each item, to indicate the "master" user/asset A button to submit the merge would be in the bottom right of the screen.

Use Case: If userA, for instance, was missing the phone number. While userB had a phone number merged into userA then userA would now contain userB's phone number. If the reverse was done, A>B instead of B>A, then the phone number would stay the same.

All history info would be merged together, with an extra line indicating there was a merge of x users/assets that occured.

The best situation, to prevent data loss, would be to clone the master user/asset. Consolidate the info into this new user/asset then move the old users/assets and the old master to the corresponding deleted assets/users table. This way the original assets and users are unaltered in the deleted users/assets table. The new merged user would have a new ID number vs the original user/asset that was merged together.

If a bad merge did occur one could just restore the old users/assets then delete the new consolidated item without data loss.

This is a rather powerful feature, and as such should be limited to admins or its own permission group if possible.

Describe alternatives you've considered The only alternative that is possible would be attempting to manually merge users/assets, which is highly time consuming.

Oscillometer avatar Dec 16 '19 23:12 Oscillometer

Is this still relevant? We haven't heard from anyone in a bit. If so, please comment with any updates or additional detail. This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Don't take it personally, we just need to keep a handle on things. Thank you for your contributions!

stale[bot] avatar Feb 14 '20 23:02 stale[bot]

This issue has been automatically closed because it has not had recent activity. If you believe this is still an issue, please confirm that this issue is still happening in the most recent version of Snipe-IT and reply to this thread to re-open it.

stale[bot] avatar Feb 22 '20 00:02 stale[bot]

I am facing now a situationin which I have to merge 2 databases and this is still relevant.

dbTunder avatar Mar 05 '21 09:03 dbTunder

Yes please this would be a nice feature still.

ruddens avatar Oct 19 '21 09:10 ruddens

May we please re-open this feature request? It would be really useful feature to have.

mmartinescu avatar Feb 16 '22 21:02 mmartinescu

Okay, it looks like this issue or feature request might still be important. We'll re-open it for now. Thank you for letting us know!

stale[bot] avatar Feb 16 '22 21:02 stale[bot]

We have some of what we'd need to do this in the existing merge-users Artisan script - if we could refactor that stuff out, and make it available in other places, that probably ought to at least help.

uberbrady avatar Feb 16 '22 23:02 uberbrady

Hm, I don't think the artisan merge script would be re-usable here - they're kind of serving different purposes.

snipe avatar Feb 16 '22 23:02 snipe

FYI I've just come across the same situation, wanting to merge an asset to preserve the history. It's still a relevant feature. Thanks.

stoz avatar Apr 21 '22 06:04 stoz

This is very relevant for us. Not only to preserve the history, but to also merge laptops, for example, which can theoretically have more than 1 MAC address.

Krejar avatar Jul 08 '22 15:07 Krejar

Merging users via the GUI was added quite a while back. If you'd like to merge assets, please create a new issue.

snipe avatar Jun 14 '25 20:06 snipe