View Single Post
Got it! One of these days I should learn AppleScript ;)

Here is the final snippet (changes in blue):
set itemTitle to name of anItem
set oldContext to name of context in anItem & ": "
set theDupe to duplicate anItem to after anItem
set completed of anItem to true

-- Configure the duplicate item
set oldName to name of theDupe
set name of theDupe to waitingPrefix & oldContext & oldName

set context of theDupe to theWaitingForContext
set repetition of theDupe to missing value

Note: I also changed the prefix as follows:
property waitingPrefix : "@"

As a result, the new task in the Waiting context looks like this:
@Phone: Call Tony to discuss bla bla bla