Gantt view - Add New Task - predecessor dropdown not populating

The Gantt chart allows you to add a projectTask by clicking Add New Task button, and the window that pops up allows you to select a predecessor, however the dropdown values are not loading.

I can see that line 102 of modules/Project/views/view.ganttchart.php has seems to have the select options commented out - as following:

    <label for="Predecessor"><?php echo $mod_strings['LBL_PREDECESSORS']; ?></label>
                                echo '<select id="Predecessor" name="Predecessor" class="text ui-widget-content ui-corner-all" />';
            /* foreach ($tasks as $task) {
                                    echo '<option rel="'.$task->id.'" value="'.$task->order_number.'">'.$task->name.'</opion>';
            echo '</select>'; ?>

I’ve tried uncommenting, but it still does not work . It makes the Gantt Chart difficult to use - Is this a feature that’s not yet complete?

I don’t know the answer, but meanwhile let met just check - does your code really say opion instead of option ?

well spotted! - yes it does.

I’ve just checked on GitHub and it also say opion there too.

unfortunately correcting the typo and uncommenting didn’t work

That code has been commented there since time immemorial, this probably never worked since the SugarCRM days…

Having looked a little more into the project tasks module, i wonder how/if people are using it successfully?

The demo suitecrm8 does populate the predecessor list, but the popup still looks buggy and you cant seem to assign a task when creating it in Gantt view.

As a side issue, i also found that the MyFilters dropdown was missing from listview - same issue as #5364

1 Like

I’m curious about this behavior in the demo. I am not sure, but I don’t think Suite8 uses the new UI framework for Project Tasks. So it would still be using the old code, the same you show above. So why does it populate?

I suggest you go hunt for some Javascript that is doing that populating work behind the scenes, after the page has loaded…