pie graph may request more history than an item may have

XMLWordPrintable

    • Type: Incident report
    • Resolution: Unsupported version
    • Priority: Trivial
    • None
    • Affects Version/s: 2.4.6
    • Component/s: Frontend (F)

      When worked with pie graphs with single (easier to notice) or several items I've noticed that the graph may request 2 times more history that an item has in "keep history" settings.

      When look to code (CPieGraphDraw.php:181) in v2.4.6 we can see line:

      if (!$trendsEnabled || (($item['history'] * SEC_PER_DAY) > (time() - ($from_time + $this->period / 2)))) {
       .... processed as history here ....
      

      which is identical to main part of another code line (CLineGraphDraw.php:235), which is for normal/stacked graphs.

      It's possible to notice in bottom right corner of graph - Data from history or trends.

      The behavior plus almost duplicated code line - it looks do me like a bug.

            Assignee:
            Unassigned
            Reporter:
            Oleksii Zagorskyi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: