0

I've found some weird behaviour that we're unable to explain.

Creating new tasks via the Asana API works great, by using the https://github.com/ajimix/asana-api-php-class functionalities. We have no problem creating a task for the API Key user, assigning it to a project.

The weird behaviour occurs when we try to assign that task to another team member directly. The following unwanted things occur:

  1. The task can not be found by any of the other team members (even searching does not work)
  2. The user the new task is assigned to does have a new task, but the team can't see it by clicking it's task list.
  3. The task is not in the project as it was before, it has 'No project'. The user does have access to that project.

Any clue about how to debug this even further? Is this an authorization issue? Because, I'm able to assign the task to the other user from asana directly.

Rvanlaak
  • 2,971
  • 20
  • 40
  • This sounds like an Asana support issue? – Dan Smith Apr 02 '15 at 09:03
  • You're probably right, but Asana sends us to Stack Overflow themselves ;) https://asana.com/developers/documentation/getting-started/overview – Rvanlaak Apr 02 '15 at 09:18
  • I guess I meant it didn't sound like an API issue, rather a bug or misunderstanding of how their system works in general. If this is an issue with your code, you'll need to post the code that isn't working. – Dan Smith Apr 02 '15 at 09:55
  • 1
    Generally, tasks are visible to a user if either (a) the task appears in a project that is public / visible to the user, or (b) the user is a follower of the task. If you create a task and assign it to someone without putting it in a project, whether in the product or via the API, it will only be visible to the assignee and the creator (both of whom are followers). Are you sure the task is both assigned AND in a public project? – Greg S Apr 06 '15 at 10:11

1 Answers1

0

The solution was to assign the task to a project in the first call directly. The confusion lies in the parameters for creating a task. We expected that project should be a single integer, but it is projects and an array with one or more projects is expected over there.

The project was assigned to the given user, but was private. So using addProject in a separate call after the task was created did result into an authorization error.

Rvanlaak
  • 2,971
  • 20
  • 40