How to change text on right?

Modified on Wed, 28 Aug 2019 at 02:26 PM

So you want to render some more data  on the gantt?

For example:

Consider you have a Work item of type Epic and you want to render Owner field to the right of the task

To do so, you need to things:

  1. Prepare the data
  2. Configure how to render the data

Prepare the data

To prepare the data you use the Advanced > Item Script parameter, put following snippet there:

    var o = wi.getValue("owner");

You see, it is simple, you can keep pass any additional data using task.getFields().put(KEY,VALUE)

Configure how to render the data

Now lets set the template to render the right side text via, you can do it via Advanced > Gantt Config Script widget parameter. Put following snippet there:

gantt.templates.rightside_text = function(start, end, task){
    return  (task.fields.owner?"Owner: <b>"+task.fields.owner+"</b>":"");

That's it. Not the gantt will render an Owner to the right to the task.

What else you can render? If you want to render the "assignee" field, use following Item Script

    var aIt = wi.getAssignees().iterator();
    var assignees = "";
    var separator = "";
        var assignee =;
        assignees =  assignees +  separator +;
        separator = ",";

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 atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article