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 Today's Posts

 
Combining Tasks Thread Tools Search this Thread Display Modes
Hello all.

I'm looking for a script to combine two tasks and the notes in them.

I have 0 applescript skills– but I thought someone might be able to whip this up, or might have developed it already. Any advice would be appreciated

I often have a task in my database, along with a note containing the relevant details. Then, an email comes in from somewhere with additional information. In order to be sure not to miss it, I add this email to my inbox. Then, later, when sorting the inbox, I realize that this task is already in my database, but the additional email, now in the note of a second task in the inbox, is something I want to add to the existing task in my database. The process of combining these takes way to many clicks.

Any ideas?
 
note: I love the way the Mail Clip-o-tron handles input when multiple messages are selected. What I'm looking for is this kind of functionality for combining multiple tasks within Omnifocus.
 
Concatenating the notes from two or more tasks is a straightforward idea, but how would you propose to resolve the task name? Display them and pick one? Type in a new one? Arbitrarily choose one automatically and go with it?
 
hrmmm.... Well– In never noticed the way the clip-o-tron handles multiple messages, so I guess it handles them well...

I just checked.

I keeps the first message subject as the title of the task in omnifocus...

But then– in the first lines of the note of the task– it lists the subjects off all the source emails. Then, skips a line, and then underneath displays the body of all the messages. Something parallel would be great.
 
This script will combine two or more selected tasks. The first one is kept as the base and the rest are appended and then deleted. I haven't figured out how to retain any formatting that may be in the notes so the new task will be all plain text if that matters to you.

Code:
-- Combine two or more selected tasks into one
tell application "OmniFocus"
	tell document window 1 of default document
		set _trees to selected trees of content
		if (count of _trees) < 2 then
			display dialog "You must have more than one task selected"
		else
			set _tasksToDelete to {}
			set _masterTask to value of item 1 of _trees
			set _names to "From:  " & name of _masterTask
			set _notes to name of _masterTask & return & note of _masterTask
			repeat with i from 2 to count of _trees
				set _task to value of item i of _trees
				set end of _tasksToDelete to _task
				set _names to _names & return & "From:  " & name of _task
				if note of _task is not "" then
					set _notes to _notes & return & return & name of _task & return & note of _task
				end if
			end repeat
			set note of _masterTask to _names & return & return & _notes
			repeat with _task in _tasksToDelete
				delete _task
			end repeat
		end if
	end tell
end tell
 
 




Similar Threads
Thread Thread Starter Forum Replies Last Post
combining planning view and context view Gizmo OmniFocus 1 for Mac 7 2011-11-23 12:47 PM
Combining lines stevechamp OmniGraffle General 1 2007-12-17 01:38 AM
Dividing and combining rows Harvey Leff OmniOutliner 3 for Mac 1 2007-11-25 11:41 AM
Combining two OmniFocus documents? jasong OmniFocus 1 for Mac 3 2007-07-03 02:42 PM
Combining shapes - masking, cutout, cutaway, compositing… chirsten OmniGraffle Extras 0 2006-11-22 03:17 PM


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


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