java-asana
java-asana copied to clipboard
Problem creating subtasks
I have the following code. All work's fine:
Task task= client.tasks.createInWorkspace(workspaceId)
.data("name", "TEST")
.data("assignee", userID)
.execute();
client.tasks.addProject(task.id)
.data("project", projectID)
.data("section", sectionID)
.execute();
Now I try to create a subtask and it do nothing.
client.tasks.addSubtask(task.id)
.data("name", "[" + nameSubtask + "]")
.execute();
I think it reaches timeout time. I don't know if something is wrong in my code.
Could you help me?
Thank's!!
┆Issue is synchronized with this Asana task
After some tests, the problem is with accents. If the subtask name contains accents (like "á"), it never creates the subtask.
How can I solve it? I need to creat tasks and subtasks with accents...
Thank you again!!
I have used this and it works. I don't like it, but it works:
String subtaskName = new String("éxample".getBytes("UTF-8"))
Any other idea?
Thank you. I had the same problem. Could this be fixed by changing line 153 in Client.java from: content = new ByteArrayContent("application/json", json.getBytes()); to content = new ByteArrayContent("application/json", json.getBytes("UTF-8"));
Thanks we'll take a look at addressing this.