How to hide some child items on a gantt?

Modified on Wed, 10 Apr at 11:59 AM

Let's suppose you want to hide some items on a Gantt chart, for example we have a gantt with:

  • features
  • and work packages as children

And we want not to show the work packages that are in a status rejected, i.e. we want not to have GNT1-542 item from picture bellow on the gantt.




To do so, put the following lines into Widget Properties > Advanced > Item Script

if(wi.getStatus().getId()==="rejected"){
  task.hide = true;
}


And the rejected item is no longer there:

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article