Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Creating tasks -- missing required field: workspace #2

Closed
JTown- opened this Issue · 4 comments

3 participants

@JTown-

Hey thanks for this -- I'm trying to implement it inside Unity, which required a couple edits to get it working with their version of .net (string.IsNullOrWhiteSpace and enum.HasFlag weren't available) but I seem to have it working for the most part. One thing I can't yet do is create a task.

What I'm attempting:

AsanaTask newTask1 = new AsanaTask(workspace);
newTask1.Name = "TASK_NAME_FROM_UNITY";
newTask1.Notes = "TASK_NOTES_FROM_UNITY";
newTask1.Assignee = me;
newTask1.DueOn = System.DateTime.Now.AddHours(2);
newTask1.Save(asana);

The error callback gives me missing required field: workspace even though I'm creating the AsanaTask with a valid workspace reference. Also, the first thing the error callback spits out (the request?) only has the name and notes

https://app.asana.com/api/1.0/tasks?name=TASK_NAME_FROM_UNITY&notes=TASK_NOTES_FROM_UNITY

But I can't seem to find why it only includes those properties

@JTown-

Also, when getting a project by id, the id of the project I get is 0. Name and some other things arrive correctly, and if I print the rawData in PackAndSendResponse() I see the correct id.

Seems like some numbers aren't being serialized/deserialized in json correctly

@acron0
Owner
@acron0
Owner

I can't seem to repro this. Can you paste your code please?

@robertmiles3
Collaborator

@JTown-, not sure if you are still needing help, but as for the "id always equals 0", I fixed that a few weeks ago. You can pull the latest code to grab the fix.

@acron0 acron0 closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.