fusioninventory / fusioninventory-for-glpi

FusionInventory plugin for GLPI
http://www.FusionInventory.org/
GNU Affero General Public License v3.0
361 stars 148 forks source link

Import to various organizations #2988

Open mmmex opened 4 years ago

mmmex commented 4 years ago

I am using glpi 9.4.6, with the final fusioninventory-9.4+2.4 plugin. In glpi, I have configured several organizations with an individual data model. org1, org2, org3 - the name of the organization. The assets of org1 computers and printers are not displayed to users of the org2 organization. I imported the _fusioninventory-inventory.bat > winhost1.xml from command line (with CMD for windows) to import inventory into GLPI for org1 organization. Import was successful. After that I imported data from another computer and to another org3 organization. And now I see all the assets of the computers of all organizations in one org3. Assets in other organizations are now unavailable, they have disappeared from the list of assets! Help me figure it out, maybe I chose the wrong path for fusioninventory.

mmmex commented 4 years ago

Most likely the problem is with the file where the field of the current user organization should be (from which the name of the import is performed) http: //glpihost.local/plugins/fusioninventory/front/inventorycomputerimportxml.php After the transfer with a regular tool, everything works as expected :) By default, fusioninventory imports into the Root entity (the root organization in my case), then I just select on behalf of the user with the super-admin role and do a transfer to another entity (organization).

JOJ0 commented 4 years ago

Hi @mmmex I am afraid I can't really help but would like to join this issue because I have a related question. Maybe you can help me: We have it organized like this: Everything in one Organization but we have different entites. The "Root Entitiy" of course and then we have sub-entities. My problem is, as you just wrote in your last sentence, that all machines that fusioninventory imports (or updates) are dropped into the root-entity. I tried your approach of moving the machines over to a sub-entity manually, but when fusioninventory is run the next time, the machines jump back to the root-entity.

It seems like your behaviour is different. I played around with a lot of rules and stuff recently to get rid of this problem but couldn't figure out which rules are matching (There is a lot of possibilities found in "Administration - Rules"). Did you have to put any rules to make your computers stay in the manually-moved-to organization?

JOJ0 commented 4 years ago

Oh, I am just reading your post again and realize that acutally we have exactely the same setup: You just use the entities as organizations (or probably they are supposed to be seen like this). In my case we just use them for different team responsibilites. Anyway, same same.

Thanks a lot in advance! all the best Jojo