cconard96 / jamf

JAMF Plugin for GLPI
GNU General Public License v2.0
6 stars 5 forks source link

Typo preventing sync task to save a device #102

Closed marekpierog closed 2 years ago

marekpierog commented 2 years ago

Hi, there is a minor typo that prevents mobile devices from being saved:

https://github.com/cconard96/jamf/blob/1d5abe9cf08f507d60e69b2dc0c180cacb58eed9/inc/mobilesync.class.php#L791

model_identifer instead of model_identifier

glpisqllog.ERROR: DBmysql::query() in /var/www/html/src/DBmysql.php line 368 *** MySQL query error: SQL: INSERT INTOglpi_plugin_jamf_devices(itemtype,items_id,udid,jamf_type,jamf_items_id,model_identifer) VALUES ('Phone', '23', '00008030-*********************', 'MobileDevice', '41', 'iPhone12,8') Error: Unknown column 'model_identifer' in 'field list' Backtrace : src/DBmysql.php:1310 marketplace/jamf/inc/mobilesync.class.php:791 DBmysql->insert() marketplace/jamf/ajax/import.php:63 PluginJamfMobileSync::import() {"user":"7@glpi","mem_usage":"0.169\", 2.38Mio)"}

GLPI: 10.0.0 PHP: 8.1.2 mySQL: 8.0.29

cconard96 commented 2 years ago

Hello, Can you test the fix made in #105?

marekpierog commented 2 years ago

Hello, Can you test the fix made in #105?

Yep, it helped with the device discovery from JAMF

cconard96 commented 2 years ago

Fix made for upcoming 3.0.1 release.