View Issue Details

IDProjectCategoryView StatusLast Update
0008297mantisbtreportspublic2014-11-25 11:04
Reportertrigras Assigned To 
Status newResolutionopen 
Product Version1.1.0a3 
Summary0008297: Cumulative By Date graph displays wrong data

Data in Cumulative By Date graph lines representing open and resolved bugs do not represent real data: it looks like data used for drawing graph excludes last closed bug. In attached picture you can see graph represented from test project data with two bugs and both closed.

Steps To Reproduce

I am not sure but I think following should be enough:

  1. create some project
  2. report 2 bugs.
  3. close both bugs
  4. look at at advanced summary cumulative graph - you should find something similar to attached image.
Additional Information

looking at mantis code I found that closed bugs are calculated using next algorithm:

  1. get data from DB for all bugs where bug state was changed to resolved.
  2. go through data and increment amount of resolved bugs at specific date when bug number changes so state change to "resolved" is calculated only once for each bug. However, then last bugs data is processed - it is not calculated as resolved bug as bug number does not change anymore. As PHP is not very strict language, to workaround this issue I've changed line 623 of graph_api.php
    for ($i=0;$i<$bug_count;$i++) {
    for ($i=0;$i<=$bug_count;$i++) {
    so now last resolved bug is also added to graph data when bug number changed from X to "nothing".

This may be not finest solution, however I hope it will help one to implement nice fix for this (ant maybe some other?) bug.

TagsNo tags attached.


2007-08-22 10:06


Issue History

Date Modified Username Field Change
2007-08-22 10:06 trigras New Issue
2007-08-22 10:06 trigras File Added: summary_graph_cumulative_bydate.php.png
2014-11-25 11:04 vboctor Category graphs => reports