Calculating the progress based in the amount of time you think it would take, gives you a better perspective of your actual position.
Additionally, using that time and the remaining days until the next version release, we can calculate if we are ahead or behind schedule.
This is a quick (somehow dirty) way to enable accurate ETA (Estimated/Expected Time of Arrival) progress in roadmap and other features like:
* display progress of current assigned tasks as well (as a secondary color).
* calculate projected time (planned due date - eta times).
* manage holidays (used to calculate projected time)
(Please see screenshot (http://files.alepe.com/mantis/eta.jpg) and read explanation at the end)
NOTE: as I can't upload attachment though this forum (Could not upload attachment to ./files/22966_b21c196c5f9d403a2a6f9f1e7bb746e8), please download the code from:
http://files.alepe.com/mantis/roadmap_page.phps
http://files.alepe.com/mantis/holidays.phps
(rename *.phps into *.php files)
[ Using version: 1.2.0rc2 ]
1) Replace /roadmap_page.php with the one inside the zip file. Note: you can alternatively copy+paste the modified lines indicated with "//### NEW ###"
2) Add "holiday.php" in the root directory. Please edit holiday's array, in that file, accordingly to your country. For example:
Code: Select all
$holidays = array(
...
5 = array(2,7,8),
6 = array(),
...
);
For "June" (in the example) there are no holidays.
These are only holidays, so there is no need to add weekends (The function automatically takes out the weekends).
3) Modify the last 2 lines of /css/default.css file, with this:
Code: Select all
.progress400 { position: relative; width: 400px; border: 1px solid #d7d7d7; margin-top: 1em; margin-bottom: 1em; padding: 1px; }
.progress400 .bar { float: left; position: relative; background: #6bba70; text-align: center; font-weight: normal; color: #333; height: 1.2em; line-height: 1.2em; }
.progress400 .abar { display: inline-block; position: relative; background: #DBE6F0; text-align: center; font-weight: normal; color: #333; height: 1.2em; line-height: 1.2em; }
.progress400 label { position: absolute; padding-left: 10px; }
.progress400.ahead { border: 1px green solid; }
.progress400.behind { border: 1px red solid; }Code: Select all
$g_enable_eta = ON;
$g_enable_projection = ON;
$g_enable_product_build = ON;You will need to modify the "eta_enum_string" variables as well:
[in: /config_inc.php ]
Code: Select all
$g_eta_enum_string = '0:?,5:4h,10:1d,20:2d,30:3d,40:4d,50:1w,100:2w,150:3w,200:1m'; //not requiredCode: Select all
$s_eta_enum_string = '0:?,5:4h,10:1d,20:2d,30:3d,40:4d,50:1w,100:2w,150:3w,200:1m';This step is very important as with those values we are going to calculate the remaining days to accomplish the release schedule.
You can modify those values as you want, but keep in mind that "10" means "1 day" and "5" means "half day".
That is why "200" means approximately a month.
In the config_inc.php file, you can set the "assigned" status value like this:
Code: Select all
//$g_status_enum_string = '10:new,20:reported,30:acknowledged,40:confirmed,50:assigned,80:resolved,90:closed'; //As reference
$g_assigned_status = 50; //OPTIONAL5) Add all ETA to your issues and add optionally the "eta" column to be displayed in the "View Issues" page.
--------------------------
SCREENSHOT explanation:
The 35% (represented also by the green bar) express the progress in ETA time. 100% represents the total ETA of all your tasks inside a release version.
The blue bar is the representation of the currently assigned projects, which in the example is approximately 6% (in my case I use it as indicator for "in-progress" tasks)
The values expressed like "[ X Days ]" represents the number of days we are ahead or behind schedule (negative number means behind).
For the incoming release versions (for example, Beta - 2), those values are calculated starting from the previous release date.
This means from 2010-06-30 to 2010-08-31, in the example, minus the ETA of all the tasks under "Beta - 2" version. A negative value would mean
that your estimated times are longer than the number of working days in that period.
Additionally, the border of the progress bar will turn green if we are ahead and red if we are behind schedule.
The % of tasks accomplished (old %) is also displayed at the bottom as text.
I hope this is useful. If you don't understand something please ask. My English is not perfect (as you may already noticed).
A better way to do it could be as a plugin, if someone wants to do it, go ahead (I'm sorry I didn't have enough time).
Cheers.
A.Lepe