If you’re a Things user like me, and have to deal with Azure DevOps for working on software projects, I wouldn’t doubt that you’ve thought that there must be some way the two can be linked–some way to get the work items you’re focusing on from DevOps into Things. Up until now, I’ve been adding my important work items to my Things inbox manually, either by copy and pasting their titles, or re-typing their titles in their entirety–both methods of which are frustrating and time consuming. In my opinion, entering items into your task manager shouldn’t force you into a mental ‘context switch’, and switching into Things to paste/type in long-winded work items from DevOps typically leads to this happening, at least for myself.
Trying to solve this, I decided to automate the process with the new Shortcuts app in macOS Monterey. It’s my first ‘big’ shortcut, and whilst I am a software developer and could’ve very well written a fully-fledged script in a language of my choice for this, I settled on Shortcuts for this for two main reasons; it easily integrates with the applications I needed it to integrate with, and it’s easy to share the automations I create with others. The Shortcuts app is the future of automation in the Apple ecosystem, so I very much enjoyed this opportunity to properly dive into it.
So what does the shortcut do? It’s relatively simple; for each of the work items that have been copied to the clipboard from Azure DevOps, it creates an inbox item in Things telling you to “Complete work item” with the work item ID and title. It’s a quick and simple way to collect the things you need to do with your software projects into your Inbox, and organise them in one place with everything else you need to do in your day.
I’ve prepared a quick screen-recording below demonstrating the shortcut in action…
How does it work?
The shortcut leverages a few interesting qualities in the way DevOps copies work items when the ‘Copy to clipboard’ context menu item is selected. The items are copied as a HTML table, however they’re also (I’m assuming,) copied with metadata stating that the clipboard contents is ‘rich HTML text’. In the shortcut, I have it request the plain-text clipboard contents, causing macOS to convert the clipboard contents from rich to plain text. In doing this, it converts the HTML table to a tab-separated (TSV) plain text table, which can be trivially parsed.
Inside the shortcut, I implement a naive TSV parsing algorithm, splitting the clipboard input on new-lines, then splitting each line on tabs to get a row. I set aside the first row aside as the header, and refer to it later to ensure the right columns are selected. I then iterate over each row, using the Things 3 Add Item action to send these items to the Things inbox. All in all, the shortcut is 40 actions in total–my largest yet! 😁
Before you get too worried, no, I won’t make you painstakingly recreate the screenshot above piece by piece. Simply click the button below to add a copy of it to your Shortcuts app.
The last few months have been quite tumultuous (to put it lightly) for my productivity here in Melbourne. I’ve more or less shifted down to first gear, fulfilling the bare minimum of my obligations to preserve my energy. For now at least, whilst things restore and settle on ‘normal’, I can begin to set in general organisational structures like GTD, and so on, to keep myself productive; to achieve everything I wish to achieve whilst keeping on top of my work.
You may have noticed that this shortcut is for Things 3, and not OmniFocus which I have previously mentioned on this blog as my task manager. As part of myself re-kick-starting my GTD habits, I have decided to give Things a shot. This does deserve a whole post onto itself, but in short, I understand why people rave about this app now. Definitely expect a post on this.
But until next time, thanks for reading!