Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-17425

template.massupdate API doesn't add the new list of macros to the selected templates

XMLWordPrintable

    • Team D
    • Sprint 62 (Mar 2020)
    • 0.125

      Problem description: when template.massupdate API is used to replace the list of existing macros with new ones, existing macros are removed from templates, but the new macros are not added.

      Steps to reproduce:

      1. Create a couple of templates and add user macros to each of them
      2. Attempt to replace all user macros with new ones using template.massupdate API like below:
        {
            "jsonrpc": "2.0",
            "method": "template.massupdate",
            "params": {
                "templates": [
                    {"templateid": "99063"},
                    {"templateid": "99014"}
                ],
                "macros": [
                    {"macro": "{$TEST7}", "value": "MACROTEST7"},
                    {"macro": "{$TEST8}", "value": "BBBBBBBB"},
                    {"macro": "{$TEST9}"}
                ]
            },
            "auth": "7342ce9c11a529f8fc9bdd2447ba194b",
            "id": 1
        }
        

      Result: the old macros were removed, but the new ones were not added to the templates.
      Expected: new list of macros from the API should replace exiting macros for the selected templates.

      Example:

            rlataria Roberts Lataria (Inactive)
            solonkins Sergejs Olonkins
            Team D
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: