-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix: Undefined array key on Asset import #18917
base: 10.0/bugfixes
Are you sure you want to change the base?
Conversation
Hi @eduardomozart, I successfully completed the first import without any issues or The second import also ran without any errors. Could you provide me with an export of your computer rules? |
A test case to reproduce is needed |
Hello @trasher and @stonebuzz, I've updated the inventory file and exported the rules XML file as requested and was able to reproduce the issue by importing the inventory file manually. Please make sure to attempt to import the file with the GLPI Debug mode enabled and PHP ![]() |
Could you try again by resetting your rules? |
Checklist before requesting a review
Please delete options that are not relevant.
Description
Screenshots (if appropriate):
The error "Undefined array key" is thrown on GLPI-Agent 1.12 when importing Inventory from a Windows machine when modifying the "Computer update (by serial + uuid)" from "Link if possible" (default) to "Link if possible, otherwise imports declined".
I did a
error_log(print_r($datarules, true))
before the if call and it returns the following:This ID reflects the rule
Computer update (by serial + uuid)
which refers to the Rule where it stopped and the asset hasn't been imported. Notice that there's noaction
key on the array. This PR do theaction
validation only if it's set.The machine doesn't exist on the
glpi_computers
DB (it existed before but has been deleted). The inventory file of this machine is in attachment.computer_0_46.json
rules.xml.txt