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.