Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: when merging users - also merge their history & Other information #15005

Closed
NPGH0 opened this issue Jul 2, 2024 · 5 comments

Comments

@NPGH0
Copy link

NPGH0 commented Jul 2, 2024

Is your feature request related to a problem? Please describe.

i just noticed that when i merge user, their history of changes will not get merged.

Also other information is gone like for example:

  • User information (End-Date, start-date etc if populated)
  • File Uploads will not get merged to the new user

Merging right now only transfers assigned assets but nothing else :(

This makes it a little bit difficult to track the history of a user if duplicates existed and they got merged.

SnipeIT Version: 6.4.1 (maybe it changed already in 7.0.6?)

Describe the solution you'd like

merging all information from a user to the targeted user instead of only assets.

Describe alternatives you've considered

No response

Additional context

No response

@snipe
Copy link
Owner

snipe commented Jul 2, 2024

This does actually behave as intended - I think the problem here is that you want to be able to pick and choose what gets carried over from the one merged into. You pick which is the "real" version, and if that version doesn't have the extra info, the uploads, etc, then yes, you will lose them - but it's pretty tough to determine what folks would want to do there (IMHO). I can see the use-case, but in general, this tool was designed for an "oops" import/LDAP sync, not two fully formed "people" within the system with their own histories.

@snipe
Copy link
Owner

snipe commented Jul 2, 2024

Where I think this can get confusing, especially if it wasn't an "oops" is - these were, at some point, two different people, complete enough that you can take action on them, had changes to them, etc. How do we decide what to keep and what to throw away, and does the story the history is telling get fragmented and more confusing if we try to carry that over?

@NPGH0
Copy link
Author

NPGH0 commented Jul 3, 2024

i see your point. But somehow even this version of "merge" is confusing :)

unfortunately we have a challenge at our site which is like this:
when we started with SnipeIT we did the LDAP Sync with Active Directory A.
Now after a while we have to move to Active Directory B which contains User from A plus a lot more. Reasons for this can be getting 2 companies merged, change in Infrastructure or any other scenario where the AD changes.

Now since we have to move to Active Directory B, the Usernames will change and all user from A will be duplicated.
I thought it would be no problem to move LDAP sync to another AD since I assumed that the merge function will also move more (or better All) stuff to the new user :)

Actually i hoped that the merge will transfer everything to the targeted user without choice. Then, whatever is not needed could get deleted/removed after the merge.

On the other site, in our scenario if only assets get moved but files, history and other information not, we actually can start from scratch since there is no use moving to the other AD without keeping information. And at this point i'm afraid if someone suggest to move to another tool :(
Also keeping the old user is also not an option since this will cause confusion when handing out assets if there are 2 user with the same name and people choose the old/wrong one. Same for looking up assets/information about a user who is duplicated.

BTW its actually even worse. All files added to a person who gets merged into another one are deleted immediately after the merge. With history you can still access it from the deleted user (getting there takes several steps) but files are gone.

@snipe
Copy link
Owner

snipe commented Jul 3, 2024

So we actually already do handle history though...

foreach ($user_to_merge->userlog as $log) {
$log->target_id = $user_to_merge->id;
$log->save();
}

It does look like we're missing the files records in the merge though.

@NPGH0
Copy link
Author

NPGH0 commented Jul 3, 2024

in my tests, the history was not taking over :O
Is this maybe the history log that user x has been merged into user y?

i mean, the history log for the assets are not taken over correctly.

Like i have asset "Asset1" assigned to user x.
User x gets merged into user y.
The asset "Asset1" will be checkedout to user y but the history of "Asset1" does not cover this. it still has the old user in it with the old date and once the old user has been purged, the whole entry is gone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants