Unable to Update Tasks with Due Dates

Hi! I recently started running into a problem with updating tasks with due dates. I am able to update the custom fields just fine, but I can’t add tasks with due dates to projects or move columns via the API. I can do those things with the same user account manually (aka not through the API). The script and user have not changed in months and worked fine up until 12/20 when the error started popping up daily, so I believe the change happened on Asana’s end.

For main tasks, I got a asana.error.ForbiddenError: Forbidden: Cannot add task to project due to task sharing permission settings of the target project or one of the task’s existing projects. As soon as I removed the due date from the task, the script ran without error and added the task to the project. The line of code throwing the error is this: result = client.tasks.add_project_for_task(df1[‘gid’][row], section, opt_pretty=True)

For subtasks, I have a subtask based project where the subtasks all have due dates and move columns based on a custom field. The custom field is updating normally, but the subtasks are not changing columns. As soon as I deleted a due date on a subtask that hadn’t moved in days, it moved columns appropriately. There is no error popping up for this, but it is ignoring the api call. Here is the code: meh_result = client.tasks.add_project_for_task(gid, section, opt_pretty=True). For reference, I printed out gid and section and they print out the expected response, so it knows what column it’s supposed to be going to.

Other than deleting all my due dates and hoping my users never add any ever again, is there a fix for this that will still allow me to reliably use the API?

Thanks and happy new year!

2 Likes

Hi Clare,

I’m seeing several instances of this in Flowsana support tickets within the past week or so as well. Also I think this forum post is the same issue.

@John_Baldo @John_Vu can you check into this? Thanks!

1 Like

This is absolutely the right problem. We had the same issue with a different circumstances (adding a project to a task that already had that same project); this used to work fine until recently. We use a very old version of the Python client (0.10.13), but nevertheless:

  1. When the tasks exists and project A but not project B, calling asana.client.tasks.add_project(task_id, {'project': PROJECT_ID}) works fine
  2. When the task belongs to both A and B and has a due date, the call fails with the error “asana.error.ForbiddenError: Forbidden: Cannot add task to project due to task sharing permission settings of the target project or one of the task’s existing projects.”
  3. Removing project B from the task also works, however a second call puts us back in situation (2) above so this isn’t a workable solution
  4. When the task belongs to both A and B but does not have a due date, the call works fine

Hope this helps provide a repro case :slight_smile:
6. Removing

1 Like

Ugh, apologies for all the typos. Apparently one cannot edit a reply after sending it (why?!)

I think it’s a limitation for brand new forum users for their first post or two, not sure why really… But thanks for the post and detailed info!

Hi,

We rolled back a change which we believe caused this issue with due dates. Apologies for the inconvenience. We’ll be sure to fix this before rolling out the change again. Any updates will likely be posted on this thread: [ Upcoming ] Custom field permissions value editing: Add new restrictions on custom fields

Thank you for reporting the problem here. Please let us know if this resolves the issue for you.

4 Likes

Seems to work now, thanks!

1 Like