glpi-project / glpi-inventory-plugin

GLPI Inventory plugin
GNU Affero General Public License v3.0
46 stars 27 forks source link

fix(userinteraction): compute default value for behavior on add #273

Closed stonebuzz closed 1 year ago

stonebuzz commented 1 year ago

If a user create UserInteraction

image

without save data from Behavior tab

image

some data are missing from databases

{
  "platform": "win32",
  "timeout": "0",
  "buttons": "ok",
  "icon": "none",
  "retry_after": "0",
  "nb_max_retry": "1",

  **//the following items are missing**

  "on_timeout": "continue:continue",
  "on_nouser": "continue:continue",
  "on_multiusers": "continue:continue",
  "on_ok": "continue:continue",
  "on_no": "",
  "on_yes": "",
  "on_cancel": "",
  "on_abort": "",
  "on_retry": "",
  "on_tryagain": "",
  "on_ignore": "",
  "on_continue": ""
}

This PR compute default value for behaviors data on create.

Fix for https://github.com/glpi-project/glpi-inventory-plugin/issues/272