dsgk40568 2013-05-10 10:54
浏览 58
已采纳

在Asana中获得已完成任务与总任务的比率

I'm creating a panel for Panic's StatusBoard to show projects from my workspace, with the ratio of completed tasks to total tasks.

I can do this currently, based on what I'm seeing in the API Docs, the problem is I need to make about 40 requests to get all the info I need and this number will only get larger as more tasks are added to my selected projects.

I'm looping through each selected project and getting each individual task, but all I'm taking from that task object in the 'completed' property.

Is there a way to get each project with completed counts and total counts as properties?

Or, is there another approach that I could take so that I don't get timeout errors when making so many requests..

  • 写回答

2条回答 默认 最新

  • dongmei2351 2013-05-10 19:13
    关注

    You should be able to do this by getting all of the tasks for a project and selecting the completed field using the ?opt_fields=completed option on your request.

    E.g., http://app.asana.com/api/1.0/projects/[project]/tasks?opt_fields=completed

    where [project] is the project ID you're querying. This will return the completed status of all tasks within a given project. You would then iterate over the returned tasks and count the completed/uncompleted statuses.

    Note that with the opt_fields option, only the identified fields will be returned.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 phython如何实现以下功能?查找同一用户名的消费金额合并—
  • ¥15 孟德尔随机化怎样画共定位分析图
  • ¥18 模拟电路问题解答有偿速度
  • ¥15 CST仿真别人的模型结果仿真结果S参数完全不对
  • ¥15 误删注册表文件致win10无法开启
  • ¥15 请问在阿里云服务器中怎么利用数据库制作网站
  • ¥60 ESP32怎么烧录自启动程序
  • ¥50 html2canvas超出滚动条不显示
  • ¥15 java业务性能问题求解(sql,业务设计相关)
  • ¥15 52810 尾椎c三个a 写蓝牙地址