cconard96 / jamf

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

First merge (no import) - question and suggestions #39

Closed SynCinatti closed 4 years ago

SynCinatti commented 4 years ago

Hello Curtis,

Thanks for this new release (1.2.0).

This is not a proper bug, but a question (and maybe a feature request) about merging devices for the first time (i don't import and never will, since all devices are first created in GLPI, so are already existing before using Jamf, Fusion or anything. I updated to 1.2 and i can't seem to be able to merge new devices as easily as in 1.1 : indeed, it seems like the association between an existing device and a jamf device now relies on UDID (+serial+hostname?) where in 1.1 i remember that serial+hostname were enough to match. In 1.2 i have to manually select the existing device to merge :/ Problem is, i can't enter an UDID for a newly generated iPad in GLPI.

So... here are some feature requests :

  1. Would it be possible to add some options in the plugin config menu, such as 'merging criteria' where one could select on what he wants to merge his devices ?
  2. Going with it, would it be possible to add an option which would allow to set a default/defined status to be assigned when importing/merging devices ?

Furthermore, i'd like to discuss about translation ;)

Thank you !

cconard96 commented 4 years ago

I don't see anything specific that changed with merging in the last few versions apart from removing matching on names (UUID only for now) because I used a feature that isn't in GLPI yet (CASE in ORDER statements). I used this to find Computers with the same UUID first and then fall back to the name in the same SQL call. After 9.5 is released, it should be easier to match devices when merging, but I can add a config option to control how they are matched now. An option could be added to default status and it should really be added to the Import rule engine (and have another rule engine for sync/merge).

What would you like to discuss about the translations?

SynCinatti commented 4 years ago

So, you actually changed the matching pattern ;) Yes this would be really fine to let one choose on which criterium or sum of criteria he wants to first merge. As said, i can't enter the iPad's UUID when it's name is getting generated. Letting one choose whether he wants to merge on name or serial or uuid or name+serial (and so on) would be great.

About translation, i think we should locate labels granularity better : indeed, depending on where in the app is the translated label (device tab, config menu...), the translation would not be exactly the same. So, would it any be possible to tag/rename/locate the labels to translate, for example : 'Label' -> 'PluginConfigTab-Label' or 'DeviceTab-Label' or 'PluginsMenu-Label' so that one could more easily know how he exactly has to translate the given label. Hope this is clear enough?

SynCinatti commented 4 years ago

About statuses, i'd be glad to simply be able to choose which default status i want to set on new merged devices. Then there could be a rule engine to set another status after xx days of inactivity.

SynCinatti commented 4 years ago

After adding a device's uuid, i get a match as shown below :

Capture d’écran 2019-11-04 à 21 35 46

But after merging, nothing happens : no jamf link, no mdm commands, no data imported nor updated (ios, etc)

cconard96 commented 4 years ago

May be best to roll back to 1.1.X for now. There were no DB changes, so you can easily roll back. Merging works for me, but I only have fake devices in my developer instance of Jamf Pro (can't use my companies instance or else they can claim the copyright on this plugin).

Doesn't help that you literally have to create or match up 6 different GLPI items just to add an IP address.

SynCinatti commented 4 years ago

I will roll back for instant, as you suggest, thanks.

cconard96 commented 4 years ago

I know it has been a while as I have been working on another project since GLPI 9.5 has been delayed several times. I am working on changing the format for translations now to add contexts and will be looking into the matching/import system again. For translation messages, I've gotten used to using "menu.import" instead of "Import devices". In the PO format, "menu" would be the context and "import" would be the message ID. It isn't how GLPI and the majority of the plugins do things though. Do you think the messages should stay localized in English by default or be neutral?

cconard96 commented 4 years ago

Merge criteria was changed back to matching UUID first, then name as a fall back in c20a821ce2abd578715e7bc1c7c319b22559ff09

Contexts for strings was added in #55

Sync engines were changed significantly for version 2.0.0 to allow syncing computers in addition to mobile devices. I did not notice any issues with adding network information.

Default device statuc was added in #47

For changing matching criteria, I made a new Issue for it since this one has multiple requests in it. It will make it easier for me to track that way. See #56