我正在对体式进行任务查询。我有一个自定义标题,称为保持模式。这不是一项任务,它是一个自定义标题。在任务查询中,自定义标头伪装成任务并随任务调用一起进入。为什么会这样,我将如何排除它?
1 回答
Well, Here is what I found. Custom headers in asana are tasks that have a colon at the end. Asana then knows to treat them like labels, but it still comes in as a task in the query call. I had to write,
var lastChar = task.substr(task.length -1);
if (lastChar != ":"){
//basically don't include it as a task.
}
I was already manually pushing each task to my own array one by one so I could attach it to it's project, so I just made it to where it doesn't push the tasks with colons on the end. I did not understand when I posted question what made it a custom header. edit from first post: I have a custom header which Someone else created. It just seemed easier to say I made it. When I talked to the guy who made it he told me what it was he did, and then I was able to figure out what made it different than a task and exclude it.