Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding project to task while creating the task #21

Open
gosr opened this issue Apr 18, 2014 · 4 comments
Open

Adding project to task while creating the task #21

gosr opened this issue Apr 18, 2014 · 4 comments

Comments

@gosr
Copy link

gosr commented Apr 18, 2014

Hi,
First of all, great work here.
I can currently manage to create a task, and assign it to myself (for testing purposes).
I want to add the task to a project while creating it, but it doesn't seem to work. That is, the project is not added to the task when I look in Asana (browser).

public void CreateTask()
{
    AsanaProject project = myProject;
    AsanaTask task = new AsanaTask(myWorkspace);

    task.Name = "Test task!";
    task.Notes = "asd asd asd asd lots of text";
    task.Assignee = me;
    task.DueOn = DateTime.Now.AddHours(4);
    task.AddProject(project, asana);
    task.Save(asana);
}

It should be noted that me, asana, myProject, and myWorkspace are correctly fetched before calling CreateTask().

I tried looking around in the source code, but I can't seem to find the reason why the project is not added to the new task.

The project has the following properties:

Archived = false
...
IsObjectLocal = false
...
Name = "<name of the project in Asana>"
...
base.Host.APIKey = "<my Asana API key>"
base.Host.AuthType = Basic
base.Host.EncodedAPIKey = "<some encoded key here>"
...
base.ID = <ID number of the project>
...

The other values represented by "..." are all null.

@niieani
Copy link
Contributor

niieani commented Apr 18, 2014

That's a limitation of the current implementation.
I'm working on a new implementation of Asana in C# which should implement 100% of the Asana API. While this one is a very good job (kudos acron0!), even after adding loads of functionality and writing the 2.0 version of it (my fork, 2.0 branch), I found this way of implementation to be a bit limiting. Mine will allow that what you speak of.

For now, with AsanaNet, you need to Save the task first and only then you can add the project/tag.

Mine should be ready in 1-2 months:
https://github.com/niieani/AsanaSharp

@acron0
Copy link
Owner

acron0 commented Apr 19, 2014

Cheers Bazyli ;) For me, this project was entirely experimental -- I have never actually used AsanaNet in production. So yes, the design is pretty edgy and limiting in a number of cases. I was impressed it was useful to anyone at all!

But I would definitely put your time and effort into AsanaSharp. I have no plans to maintain AsanaNet.

@workshub-stage
Copy link

This issue is now published on WorksHub. If you would like to work on this issue you can
start work on the WorksHub Issue Details page.

@workshub-stage
Copy link

This issue is now published on WorksHub. If you would like to work on this issue you can
start work on the WorksHub Issue Details page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants