fmtnum function does not work in mediatypes

XMLWordPrintable

    • Type: Incident report
    • Resolution: Unresolved
    • Priority: Trivial
    • None
    • Affects Version/s: 6.4.6, 7.0 (plan)
    • Component/s: None
    • None
    • Environment:
      Rocky 8, httpd, Zabbix 6.4.6

      The fmtnum (and i assume fmttime) function do not work in the media types.

      Steps to reproduce:
      Import attached template.
      Import attached mediatype (I provided a webhook type,to prevent extra configuration, situation is the same for atleast email type notifications)
      Configure action, and media as one normally would do.

      Execute:
      Send in a floating point to the item:

      zabbix_sender -z localhost -s "test notification" -k float -o 0.04444545435345345
      

      Generate problem:

      zabbix_sender -z localhost -s "test notification" -k sender -o 5 
      

      Result:
      Go to Reports -> Action log and observe:

      Subject:
      Problem: test notification: Testing: 0.04 and without 0.044445454353453449
      
      Message:
      Without fmtnum: 0.044445454353453449
      With fmtnum: {0.044445454353453449.fmtnum(2)}
      

      Expected:
      fmtnum and fmttime to be resolved as they are in the eventname (subject in the result/message)

            Assignee:
            Zabbix Development Team
            Reporter:
            Brian van Baekel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: