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

Misleading error shown when formula cannot be updated during LLD

    XMLWordPrintable

    Details

    • Team:
      Team C
    • Sprint:
      Sprint 62 (Mar 2020), Sprint 63 (Apr 2020), Sprint 64 (May 2020)
    • Story Points:
      0.125

      Description

      Create item prototype

      trap1["{#M}"]
      

      Create calculated item prototype with formula

      100*last(trap1["{#M}])
      

      Notice the error

      Cannot update item: Invalid first parameter "trap1["{#M}]".
      

      Expected:
      It should be clear from the error that the problem is not in item but in formula

      Cannot update item, error in formula: Invalid first parameter "trap1["{#M}]".
      

      Example fix, but should also be made for creation:

      diff --git a/src/libs/zbxdbhigh/lld_item.c b/src/libs/zbxdbhigh/lld_item.c
      index 1089a49efa..79de6677d8 100644
      --- a/src/libs/zbxdbhigh/lld_item.c
      +++ b/src/libs/zbxdbhigh/lld_item.c
      @@ -2066,7 +2066,7 @@ static void	lld_item_update(const zbx_lld_item_prototype_t *item_prototype, cons
       			}
       		}
       		else
      -			*error = zbx_strdcatf(*error, "Cannot update item: %s.\n", err);
      +			*error = zbx_strdcatf(*error, "Cannot update item, error in formula: %s.\n", err);
       	}
       	else
       	{
      

        Attachments

          Activity

            People

            Assignee:
            arimdjonoks Artjoms Rimdjonoks
            Reporter:
            vso Vladislavs Sokurenko
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: