Does anybody have a snippet of code that processes all tasks in a category recursively, constructing a textual tree of the result?
I’m trying to find a script to process all tasks with a tag (that part is easy) and format them into a hierarchy like you would see in a project view in OmniFocus (that part is hard because of recursion, promises, and being new to JavaScript).
Per your request, I just published a script. Does it solve your problem, @flight16 ?
Awesome, that is about 95% of the script I wanted to write! Thank you!
1 Like
Ok, just used it for real. Structure still looks good. I’m going to have to read the code and think about how to only export projects and folders with a matching task. But this script still gives me a great start.
Could you give a specific and concrete example to show where it does not behave the way you expect ?
If you have
Proj A:
Proj B:
And share tasks with tag_z, “Proj A” gets printed in the report, too, even though it contains no tasks visible in the report.
I’m not following. What do you mean by that ?