Why does this work:
tell application "OmniFocus"
tell default document
set anItem to task id "ppkNM6eAXnn"
set newProject to make new project
set name of newProject to name of anItem
repeat with aChildTask in anItem's tasks
move (task id (id of aChildTask)) to end of tasks of newProject
end repeat
end tell
end tell
Whereas this doesn’t:
tell application "OmniFocus"
tell default document
set anItem to task id "ppkNM6eAXnn"
set newProject to make new project
set name of newProject to name of anItem
repeat with aChildTask in anItem's tasks
move aChildTask to end of tasks of newProject
end repeat
end tell
end tell
(The only difference is in the “move” line)