View Issue Details

IDProjectCategoryView StatusLast Update
0011743mantisbtfeaturepublic2014-02-14 09:16
Reporterllattan Assigned Toatrol  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionno change required 
Product Version1.2.0 
Summary0011743: New field "date_resolved"
Description

I think bug table ("mantis_bug_table") should have a new field called date_resolved.
It can be useful to get wonderful statistics.
Sometimes there is a gap between resolved date and closed date.

Lastest version only has "date_submitted" and "last_updated".

It can be useful to have "date_assigned" field too. (It is not the same that submission date unless auto-assignment)

TagsNo tags attached.

Activities

thraxisp

thraxisp

2010-04-03 18:01

reporter   ~0025012

You can find this information in the mantis_bug_history table by finding the entry where the status becomes "resolved". Some of the graph by time pages do this as I recall.

watergad

watergad

2010-04-21 09:04

reporter   ~0025192

You can also try to store this data in a separate field:

  1. create a custom field "Date_resolved", type Date, edit by admin only, etc.

  2. assign this field to a project

  3. create function like:


    function set_resolve_date_to_custom_field( $p_bug_id ) {
    $resfield = custom_field_get_id_from_name('Date_resolved');
    $p_project_id = bug_get_field( $p_bug_id, 'project_id' );
    if( custom_field_is_linked($resfield, $p_project_id) ) {
    $resdate = db_now();
    custom_field_set_value( $resfield, $p_bug_id, $resdate, false );
    }
    }

  4. Change the core/bug_api.php:
    find function bug_resolve(....)
    add at the end of the function (before "return true;") following:

set_resolve_date_to_custom_field( $p_bug_id );

What's the result:

  • Date_resolved will be set to the sysdate when the bug is set to "resolved"
  • Date_resolved will NOT be set when the bug is set to "closed"
  • Date_resolved will NOT be cleared when the bug is reopened or smth like that
  • The filter will be available to search by Date_resolved

Since there are changes in the core (bug_api.php) and it's possible to differ this field and the real history date of resolving, -
This is NOT the good solution, you may use it only if you can't use the mantis_bug_history table (see the thraxisp comment) - for example, if you want to see the resolve date in the View Issues page.