Im trying to create a task with "dueAt" and "dueOn" fields but Im unable to fill these fields.
I have created the task "copyTask" by Asana website and Im able to fill due dates. But if I try to create another task using Asana API for Java and give it any value to "dueAt" or "dueOn" fields, they aren't filled with anything.
I have used this:
newTask = asanaClient.tasks.createInWorkspace(workspaceId)
.data("name", "MyProofTask")
.data("notes", "MyDescriptionTask")
.data("projects", Arrays.asList(newProject.id))
.data("dueAt", (copyTask.dueAt != null) ? new com.google.api.client.util.DateTime (copyTask.dueAt.getValue()) : null)
.data("dueOn", (copyTask.dueOn != null ? new com.google.api.client.util.DateTime (copyTask.dueOn.getValue()) : null))
.execute();
Any solution?
Use "due_at"
and "due_on"
.
newTask = asanaClient.tasks.createInWorkspace(workspaceId)
.data("name", "MyProofTask")
.data("notes", "MyDescriptionTask")
.data("projects", Arrays.asList(newProject.id))
.data("due_at", (copyTask.dueAt != null) ? new com.google.api.client.util.DateTime (copyTask.dueAt.getValue()) : null)
.data("due_on", (copyTask.dueOn != null ? new com.google.api.client.util.DateTime (copyTask.dueOn.getValue()) : null))
.execute();