-
Problem report
-
Resolution: Fixed
-
Trivial
-
None
-
None
-
Sprint 62 (Mar 2020), Sprint 63 (Apr 2020), Sprint 64 (May 2020)
-
0.125
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 {