Taks fields come as null + Java SDK


#1

Hi All,

I am trying to get all some task information(created, completed, etc ) of tasks that belong to a Project. I am using the following code and sending the specific fields I need values for, I get all the tasks but I only get the values of task.name and task.id, task.completed, the rest of the fields especially the dates ones come as null even though those tasks do have values in the UI. Am I missing something?

CollectionRequest tasks = client.tasks.findAll().query(“project”, project.id)
.option(“fields”, Arrays.asList(“createdAt”, “completed”,“tags”,“completedAt”,“dueAt”,“dueOn”,“modifiedAt”));

Thanks


#2

Actually, the problem was that the fields name were wrong … should have been “due_on” instead of “dueOn” etc