无法使用 Asana API 为 Java 更新任务中的 "dueAt" 或 "dueOn" 字段
Unable to update "dueAt" or "dueOn" fields on Tasks using Asana API for Java
我正在尝试使用 "dueAt" 和 "dueOn" 字段创建任务,但我无法填写这些字段。
我已经通过 Asana 网站创建了任务 "copyTask",我可以填写截止日期。但是,如果我尝试使用 Asana API 为 Java 创建另一个任务,并为 "dueAt" 或 "dueOn" 字段赋予任何值,它们将不会填充任何内容。
我用过这个:
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();
有什么解决办法吗?
使用"due_at"
和"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();
我正在尝试使用 "dueAt" 和 "dueOn" 字段创建任务,但我无法填写这些字段。
我已经通过 Asana 网站创建了任务 "copyTask",我可以填写截止日期。但是,如果我尝试使用 Asana API 为 Java 创建另一个任务,并为 "dueAt" 或 "dueOn" 字段赋予任何值,它们将不会填充任何内容。
我用过这个:
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();
有什么解决办法吗?
使用"due_at"
和"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();