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

Incorrect generation of the order of preprocessing steps

    XMLWordPrintable

    Details

    • Team:
      Team B
    • Sprint:
      Sprint 54 (Jul 2019)
    • Story Points:
      1

      Description

      Problem 1:
      /include/classes/api/services/CItemGeneral.php:

      protected function createItemPreprocessing(array $items) {
                      $item_preproc = [];
                      $step = 1;
       
                      foreach ($items as $item) {
                              if (array_key_exists('preprocessing', $item)) {
                                      foreach ($item['preprocessing'] as $preprocessing) {
                                              $item_preproc[] = [
                                                      'itemid' => $item['itemid'],
                                                      'step' => $step++,
                                                      'type' => $preprocessing['type'],
                                                      'params' => $preprocessing['params']
                                              ];
                                      }
                              }
                      }
      

      Variable definition $step=1 is outside of the foreach cycle, 99999+ step can be generated.

      Problem 2:
      The same step generation:

      Result:
      Steps are performed out of order.

      Expected:
      Steps are performed in step by step order.

        Attachments

        1. proc3.jpg
          proc3.jpg
          34 kB
        2. sql2.jpg
          sql2.jpg
          63 kB

          Issue Links

            Activity

              People

              Assignee:
              iivs Ivo Kurzemnieks
              Reporter:
              edgar.akhmetshin Edgar Akhmetshin
              Votes:
              3 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: