node-asana icon indicating copy to clipboard operation
node-asana copied to clipboard

client.tasks.findAll deprecation

Open dwelch2344 opened this issue 3 years ago • 1 comments

Following along with the example on the README and noticed I'm getting a deprecation warning.

  const workspaces = await client.workspaces.findAll()
  const ws = workspaces.data.find(el => el.name === 'Example Team')

  const me = await client.users.me()

  const tasks = await client.tasks.findAll({
    assignee: parseInt(me.gid),
    workspace: ws.gid,
    opt_fields: 'id,name,assignee_status,completed'
  })
  console.log(tasks)

Produces the warning:

    This request is affected by the "new_user_task_lists" deprecation. Please visit this url for more info: https://forum.asana.com/t/update-on-our-planned-api-changes-to-user-task-lists-a-k-a-my-tasks/103828
  Adding "new_user_task_lists" to your "Asana-Enable" or "Asana-Disable" header will opt in/out to this deprecation and suppress this warning.

Looks like its been a few years since the change was announced, but I'd imagine the library should have a way to adapt (or comment about ignoring/disabling warning)

dwelch2344 avatar Nov 03 '22 10:11 dwelch2344

has this issue been solved? if no, can i contribute to try and fix this issue?

HermanBide avatar Feb 23 '24 22:02 HermanBide