Skip to content

Possible regression: entities_id not preserved #601

@lir-ht

Description

@lir-ht

Code of Conduct

  • I agree to follow this project's Code of Conduct

Is there an existing issue for this?

  • I have searched the existing issues

GLPI Version

10.0.24

Plugin version

2.14.4

Bug description

When using the datainjection plugin to update existing users, the entity of the updated user is changed to the entity of the user running the import.

This might be a regression, since it sounds similar to issue #262 which was fixed in version 2.10.1 (by commit bddc5ae), but the code that fixed it was later removed in version 2.12.0 (by commit 1884516) along with some similar code which was then re-added by commit 338117f.

Relevant log output

Page URL

No response

Steps To reproduce

  1. Create a new model, with options:
    • Allow lines update: Yes
    • Allow update of existing fields: Yes
  2. Create a CSV file for importing phone numbers for users, e.g. the following:
Login;Phone
tech;12345
  1. Select the root entity in the profile of the using session performing the import.
  2. Change the entity (the field "Default entity") of the "tech" user to some other entity, other than the root entity.
  3. Run the import.

Expected result:
The "Default entity" field of the "tech" user should be unchanged after the import, i.e. it should retain the value set in step 4.

Actual result:
The "Default entity" field of the "tech" user has changed to the root entity.

Your GLPI setup information

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions