Closed VanAxl closed 2 years ago
I believe you are looking for Administration > Rules > Rules for assigning an item to an entity to control which entity an asset is added to when imported.
Thanks for your reply. Well in fact there is no rules that can match this manual filing. My computers have just been put in some sub-entity "by hand". I just want them to stay where they are with that new GLPI-Agent . Here is the log in History tab of the asset, showing that the glpi-agent inventory has moved my computer :
Same here for many hosts
Does issue occurs on migration, or when a new inventory occurs?
That's happens on a new inventory. Old items (with no recent inventory) are not impacted.
Ok, then the issue title is wrong. The entities_id
field should have been locked, since it's been edited by user.
2 solutions: an issue on plugin migration, or an issue on locking fields.
If you change by hand the entity on a computer; and run a new inventory on it, do you have the same behavior?
"If you change by hand the entity on a computer; and run a new inventory on it, do you have the same behavior?" => I've tried that, and it stays on the correct entity. I confirm that the migration has no impact for old devices : It will only move back the asset to the root entity when a new inventory (from the new glpi agent) is received for this asset.
Here, we still use fusioninventory-agent
Maybe a workaround would be to force the entity_id to be locked for all assets (placed manually in a entity) before doing the migration, or at least before receiving any new GLpi-Agent inventory ? I'm not sure how to do this.
Agent is not relevant. This is an issue migrating from fi plugin. Have you installed and migrated to glpi-inventory-plugin? If so, there is something wrong in its migration.
If you did not activate the new plugin, nothing gets migrated; but you can add a global lock on entities_id
field.
BTW, adding a global lock is certainly the way to go in your case; this will ensure inventory will never try to update the field. This feature is available since 10.0.1
Agent is not relevant. This is an issue migrating from fi plugin. Have you installed and migrated to glpi-inventory-plugin? If so, there is something wrong in its migration. If you did not activate the new plugin, nothing gets migrated; but you can add a global lock on
entities_id
field.
Yes for my tests, I used a computer that was linked to the production GLPI environnement (in 9.5). on that computer I've used the vbs script (glpi-agent-deployment.vbs) to uninstall and install the new glpi-agent , and point this agent to my test environment where I have the Migrated GLPI server (10.0.1) by the server= command argument.
I will try to test now with keeping the FI agent , and only change the server to report the inventory. I will see if it keeps my asset to the good entity. I'll keep you posted.
As I've already said, agent is not relevant
Ok you are right. Same result even when keeping the fusion inventory agent. Do know what I missed in the GLPI migration process. The glpi plugin has not really be "installed" in glpi, as it seems to be part of the system now, from my understanding. I just delete the old fusion inventory plugin from the Setup>plugins page.
Can you point me to the right direction to set that global Lock of the entity of my assets ? I can't find where to set this on, on my own.
There is a button in the inventory configuration page
There is a button in the inventory configuration page
ok thanks for that. I've found that page. But I didn't find the computer entity on the dropdown list, when trying to add a global lock
I 'm thinking about doing that in a different way. All my computers/assets have a user reported from the inventory (User field of the asset). Is it possible to create some kind of rule that will put the computer in the same entity as where the user is ? Cause my users are still in good entities.
Indeed, entity field is not available for global locks. As a workaround, you can try to insert directly in database:
INSERT INTO `glpi_lockedfields` (`itemtype`, `items_id`, `field`, `value`, `is_global`) VALUES
('Computer', 0, 'entities_id', NULL, 1);
entities_id
fields available on global locks. Initial issue can only be fixed with a migration of locked fields from fusioninventory plugin with glpiinventory plugin.In facts, glpi-inventory plugin already takes care of migrating locked fields; but was not taking care of old global locks. This will be fixed as of https://github.com/glpi-project/glpi-inventory-plugin/pull/128
We still see this issue in 10.0.12 with GLPI Inventory 1.3.5. We didn't have Fusion Inventory before. We locked the Entity field individualy for a test computer, and then globaly with the SQL mentioned above. And the inventory update just doesn't respect the locked field and just updates it.
In fact, it does not only change the entity field, but also changes the values in the soundcard and harddrives fields. Changing 7 to 0, and those are the ids of the entities too.
@cablop Please open a new issue and give all requested information.
Code of Conduct
Is there an existing issue for this?
Version
10.0.1
Bug description
Hi, I've testing the migration from glpi 9.x to the version 10.0.1. Everything is working fine so far. So I did create a group policy to run the vbs script to install the GLPI agent 1.2 (with the option to uninstall the Fusion Inventory agent first). That works too.
But my computers are put in sub entity when they are created, I mean manually by the technician when he setup the computer for the first time, before providing it to the final user.. There is no rules for auto assignment.
And with this new GLPI agent, it moves automatically the computer to the root entity (we have such entity change in the history of the computer). That is very annoying cause we do have several hundred of computers in GLPI. So I would like to avoid to move again manually all my computer.
Is it a bug, or is there any settings to keep computer on their current entity ?
Thanks Nicolas
Relevant log output
No response
Page URL
No response
Steps To reproduce
Migrate GPI 9.5 to GLPI 10.0.1 update the GLPI agent on a test computer from FusionInventory to glpi agent 1.2 Run the agent on the computer, so it sends the inventory to the GLPI 10.0.1.
Then computer is changed to root entity.
Your GLPI setup information
Information about system installation and configuration
Server
GLPI constants
Libraries
LDAP directories
SQL replicas
Notifications
Plugins list
Anything else?
No response