dotProject Forums

Go Back   dotProject Forums > NEW MODULES AND PATCHES > New Patch Announcements
Register FAQTop Posters Members List Calendar Search Today's Posts Resend Activation Email Mark Forums Read
dotProject Documentation dotProject FAQ Bugs & Feature Requests Language Packs & Themes Download dotProject

New Patch Announcements Please place announcements of new patches here. For support on patches, please go to the General Forums

Reply
 
Thread Tools Display Modes
  #1  
Old 20-03-12, 04:47 PM
Asadullo Asadullo is offline
Junior Member
New Participant
dotProject Version: 2.1.5
php Version: 5.3
MySQL Version: 5.1
Operating System Version: Linux
Browser: Firefox
 
Join Date: 20-03-12
Posts: 2
Send a message via Skype™ to Asadullo
Smile Gantt Chart - Show only current tasks in selected period

Hi All!

For our project needs we wanted to show only current tasks in the selected period in Gantt Chart. So that tasks that are finished or tasks that are not started between the selected periods must not be shown.

Using dotproject 2.1.5 version.

in modules/tasks/gantt.php after line 90 just after the block
PHP Code:
if ($showPinned) {
        
$q->addWhere('task_pinned = 1');
    } 
add lines
PHP Code:
//Show only the tasks which are due to that period
    
if(dPgetParam($_GET'start_date'0) && dPgetParam($_GET'end_date'0)){
        
$q->addWhere('!(task_start_date >=\''.dPgetParam($_GET'start_date'0).'\' AND task_start_date >=\''.dPgetParam($_GET'end_date'0).'\')');
        
$q->addWhere('!(task_end_date <=\''.dPgetParam($_GET'start_date'0).'\' AND task_end_date <=\''.dPgetParam($_GET'end_date'0).'\')');
    } 
and also add the above lines after the line 109 after the block
PHP Code:
if ($f != 'myinact') {
        
$q->addWhere('task_status > -1');
    } 
Thats it...

And the long list of tasks shorten to show only the tasks which are in the period you have selected.

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +10. The time now is 05:31 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.