Bug (closed)

function projViewTasks() - Correction

Summary

closed
Jan 29, 2010
100%
Apr 15, 2012
Jan 29, 2010 / lcgs13
Apr 15, 2012 / pixtur
pixtur
 

Attached files

No files uploaded
 
In the project_more.inc.php in the initail part there is this block of code:

### get upcoming or selected milestone ###
/*
pixtur: 2008-09-60
WARNING: Selecting a milestone directly to limit the viewed tasks does not work because editing a task with a milestone will compromize the following task list. I have no idea, why this code is in here, or weather it is required at all.
*/
     $for_milestone= intval(get("for_milestone"));
     $milestone= NULL;
     if($for_milestone) {
         $milestone= Task::getVisibleById($for_milestone);
     }

This should define the next milestone for the project, in order to filter all the tasks related to the project that are assigned to the next milestone. But this is not working.

To fix this, I have commented this block of code and on the block of code that defines the next milestone filter I changed the line:

### next milestone ###
'next_milestone' => array(
   'name'=> __('for milestone'),
   'filter_empty_folders'=>true,
   'filters'=> array(
       'task_status'=> array(
             'id' => 'task_status',
             'visible' => false,
             'active' => true,
             'values' => array( STATUS_NEW, STATUS_OPEN,STATUS_BLOCKED, STATUS_COMPLETED),
             'min' => STATUS_NEW,
             'max' => STATUS_COMPLETED, ),
   'for_milestone' => array(
             'id' => 'for_milestone',
             'visible' => true,
             'active' => true,

      #'value' => $for_milestone, // replaced by:
       'value' => $project->getNextMilestone()->id , ),
.......




Issue report

Minor
Always
Apache/2.2.13 Server, PHP5.3
0.0902
In project_more.inc
Step 1 - Comment code:
     $for_milestone= intval(get("for_milestone"));
     $milestone= NULL;
     if($for_milestone) {
         $milestone= Task::getVisibleById($for_milestone);
     }

Step 2 - Replace
'value' => $for_milestone,
With:
'value' => $project->getNextMilestone()->id , ),
 

No Comments