The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniFocus > OmniFocus Extras
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
Possible to add task to a project without calling compact? Thread Tools Search this Thread Display Modes
I have written a simple script (Ruby which uses AppleScript calls to interact with OmniFocus) that syncs my Jira tickets with my OmniFocus task list. However I haven't figured out how to add a task to a project without creating it as an inbox task, marking it's assigned container to the project I want to put it in, and then calling compact.

This works, however by calling compact every 10 minutes (my script schedule), it clears all the completed tasks from my perspective, whereas I personally like to see what I've checked off that day, and only run Clean Up at the end of the day, so I can see my progress, not just what's left ahead.

Any ideas on how I can add a new task to the project without having to call compact?

Thanks!

Devon
 
You probably want to tell the project to create the task, rather than the app/inbox.
 
Thanks Lizard! Do you know where I can find an example or docs that would cover that type of flow? Looking at the OmniFocus AppleScript dictionary I don't see any methods on the project class to adding tasks? I'm very new to this stuff, so I could just be missing it:) Thanks in advance!

Devon
 
Other scripts posted in this Extras forum are probably the best documentation/examples available.
 
Got it figured out! If anyone else is trying to solve this via Ruby appscript you need to do something like this:

....
proj_name = new_task_properties["project"]
proj = omnifocus_document.flattened_tasks[proj_name]
.... build task props
proj.make(:new => :task, :with_properties => tprops)



Instead of the old:

new_task = omnifocus_document.make(:new => :inbox_task, :with_properties => tprops)
new_task.assigned_container.set(proj)
omnifocus_document.compact

I had before.
 
If anyone is interested you can see my completed, very simple, Jira to OmniFocus integration script here: http://www.digitalsanctuary.com/tech...tegration.html
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes



All times are GMT -8. The time now is 10:06 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.