OmniFocus, DEVONthink, and Jira

I’ve been tinkering with this AppleScript I keep in Keyboard Maestro for a while, and finally got it to where I’m mostly happy with it. The script asks for a Jira ticket number, and then creates a Markdown document in DEVONthink and a project in OmniFocus and links the two together.


tell application "Keyboard Maestro Engine"
	set newJiraTicket to getvariable "JiraTicket"
end tell

set jiraURL to "https://companyname.atlassian.net/browse/" & newJiraTicket

tell application "OmniFocus"
	tell front document
		set myFolder to folder named "companyname"
		set theTag to (first flattened tag where its name is "💻 Mac")
		set theProject to make new project with properties {name:newJiraTicket, sequential:true} at end of projects of myFolder
		tell theProject
			make new task with properties {name:"Research Ticket"}
		end tell
		set of_project_link to "omnifocus:///task/" & id of theProject
	end tell
end tell

set cd to (current date)

tell application id "DNtp"
	set destinationGroup to get record with uuid "8794E110-F848-4763-9650-89A9EXX52FC7"
	tell database "🎯 companyname"
		set theRecord to create record with {name:newJiraTicket, content:"# " & newJiraTicket & " 
- [Jira Link](" & jiraURL & ")
- [OmniFocus Project](" & of_project_link & ")

---

### Notes

", type:markdown} in destinationGroup
	end tell
	set theUUID to uuid of theRecord
	set callback to "x-devonthink-item://" & theUUID
end tell

tell application "OmniFocus"
	tell front document
		set theTask to the first flattened task where id = id of theProject
		set itsNote to the note of theTask
		set note of theTask to callback
		set value of attribute "link" of style of paragraph 1 of note of theTask to callback
	end tell
end tell

DEVONthink Note:

OmniFocus Project:

This lets me quickly setup a framework for keeping all my information accessible, while tracking my project in OmniFocus. I update Jira when finished, but the bulk of the tracking happens in OmniFocus.

3 Likes

I can see why you might do it this way. I never found Jira very helpful to my project planning, but I kept it up to date so that various managers would be happy. :upside_down_face:

Yea, Jira is there so I can work with the rest of the team. But it’s not something I want to spend a lot of time in. But it is good to track conversations in when we need better clarity on specifics.