getResourceAssignments

returns all tasks assigned to the resource

array getResourceAssignments(string|number resourceId);

Parameters

resourceIdstring|numberthe id of the resource

Returns

arrayan array of objects with tasks assigned to the resource

Example

gantt.getResourceAssignments("6"); // -> see details

Related samples

Details

The method returns an array with objects as in:

[ 
    {task_id: 5, resource_id: "6", value: 5},
    {task_id: 18, resource_id: "6", value: 2},
    {task_id: 19, resource_id: "6", value: 3},
    {task_id: 21, resource_id: "6", value: 5}
]

Each object contains the following properties:

  • task_id - the id of the task
  • resource_id - the id of the resource
  • value - the quantity of the resource assigned to a task
See also
Back to top