Table of Contents

Due Date Requirements

Author: Victor Boctor

Introduction

Mantis currently tracks very well the project versions and issues status, however, it currently (up to 1.0.x) doesn't track progress relative to time. This is not a big issue for a bugtracker, but it may be a useful tool that helps with project management and also is very useful for scenarios where Mantis is used to manage things like tickets, to do lists, fullfilment of customer orders, etc. Hence, this feature is about assigning a due date for an issue. This due date doesn't have to be in line with any planner release or milestone.

Database Changes

Configuration Changes

Currently threshold can take either a threshold (e.g. DEVELOPER) or an array of allowed access levels (e.g. array(DEVELOPER, SENIOR_DEVELOPER) - in this case developer and senior developer but not manager, viewer, reporter, or updater).

General Changes

Reminders

  * Issues Due Today
    * Project 1
      * 20345: summary (status)
  * Issues Overdue 
    * Project 1
      * 12345: summary (status, due date).
    * Project 2
      * 11111: summary (status, due date).
      * 22222: summary (status, due date).

Integration Features

These are nice to have features:

Development Stages

Following are the development stages of this feature in order to avoid one big patch:

Feedback

Please add your comments and feedback in this section.

* The due date of tasks should also be integrated with the Roadmap/Version Deadline, see Roadmap Requirements. Probably there should be some consistency checks when the target version, issue deadline, or version deadline is changed.

* My suggestion is to be able to assign two time limits for each priority (by project). The inactivity timeout is the time an issue can stay without updates. The “SLA” timeout is the time an issue is expected to be resolved. Whenever one of this timers expires an email is sent to (configurable): the reporter, the assigned developer (if any) and the project manager.

* Would suggest that the Due date could be calculated by Mantis based upon a set number of days in config_inc.php or even better based upon a number of days set by project/category. Obviously when calculating the new date, we should only allow for working days, function can be found below:

* The concept of working days can definitively be different from one business model to the other. There is some time or type of business that could require due_date other than weekdays (ie newspaper would appreciate to be able to get a saturday or sunday due date for release of their news).


#
# This function calculates the next date only using business days
# @param startdate The start date
# @param duedays   Number of days to add
#
function calcduedate( $p_startdate, $p_duedays ) {
    $t_datecalc = $p_startdate;
 
    $i = 1;
    while ( $i <= $p_duedays ) {
        $t_datecalc  += 86400; // Add a day.
        $t_date_info  = getdate( $t_datecalc );
 
        if ( ( $t_date_info["wday"] == 0 ) or ( $t_date_info["wday"] == 6 ) )  {
                $t_datecalc += 86400; // Add a day.
                continue;
        }
 
        $i++;
    }
 
    return $t_datecalc;
}