The Omni Group Forums

The Omni Group Forums (
-   OmniPlan Extras (
-   -   Applescript creation of tasks with existing dates (

nikolaj 2010-09-01 04:16 PM

Applescript creation of tasks with existing dates
I am finishing up my python script (using appscript) to import all our project/clients/todos/time entries from basecamp and am having trouble figuring out how to set the start/end date of a task and have it stick.

Right now i am setting the project start date to the earliest existing Todo from my basecamp export, then i am setting the start/end date of each task as I create them.

Here is what I am doing (summarized and in appscript parlance):

for todo in todos:

When I run this all my tasks are lined up at the project start with start and end like:

Actual: T day 8:00 AM
Baseline: T+494w 1d 12:00 AM

I am still hunting for any examples on creating existing tasks with actual start/stop dates, but any help would be greatly appreciated.

Hopefully if I can get this ironed out i will post my scripts so others can utilize them.

nikolaj 2010-09-02 05:44 PM

Ok, so i got this working. I had to create the project, build tasks and organize them into subtasks, then set the project start date, and finally run through all tasks again and set their starting/ending time.

Roughly, this is how i do it with python/py-appscript


# assume todos=[{"name":"task name","basecamp_id":"123","start_date":datetime,"end_date":datetime}]
from appscript import *
# create your resources
for t in todos:
# here you might add a resource r
# i move to a parent task here:
# doc.move(task,to=project_task.child_tasks.end)
all_tasks.append((task,t)) # keep a record of this task and the todo for later

# then set the project start date

# then iterate through all tasks AGAIN and set the start/end
for t in all_tasks:

Now to have my script rip back through and update my basecamp Due Dates :)

All times are GMT -8. The time now is 09:12 PM.

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