I've been using the Alfred app for macOS for many years to help me quickly find and open information. I had a very simple Alfred workflow which lets me open a Jira issue quickly by typing Cmd-Space then the issue key. It was super useful when speaking with someone who mentions an issue key; with that keyboard shortcut I'd have the issue they mentioned open in a second.
But that Alfred workflow was very basic and there was so much more I wanted to do, like search Jira when I don't know the exact issue key. The Codegeist competition was impetus for me to finally implement a fully featured search for Alfred.
What it does
The 'Jira search for Alfred' is a Forge app which lets you configure an Alfred workflow specifically for your Jira Cloud instance. It lets you pick projects you want to search on, then generates an Alfred workflow file which you download onto your Mac. Once installed into Alfred you can search your Jira Cloud instance by:
- Typing an issue key — which shows you that issue and its linked issues
- Typing a project key plus a search query
jiraplus a search query
Then select an issue by pressing the down arrow on your keyboard, and then press enter to open it in your browser. Once you're used to it you'll have issues open in a fraction of a second!
How I built it
The app turned out to be trickier than I expected because it required three distinct pieces of code: the UI code as a Forge app, the code to generate the Alfred workflow as a Netlify function / AWS lambda, and the Alfred workflow itself as a Python script.
Challenges I ran into
I had hoped I could generate the Alfred workflow directly inside the Forge app, but unfortunately that turned out to not be possible. Though Forge does provide functionality like web triggers which could theoretically download a file, they don't suit an Alfred workflow which is a zip file with a custom
I ended up dealing with that by moving that part of the code to a Netlify function, which like a Forge is an AWS Lambda. The Forge app provides the UI for configuration, then hands over to the Netlify app to generate the file.
What's next for Jira search for Alfred
I'd love to work out a way to move everything into the Forge app so it can be self-contained. I don't think that's possible just yet but I'm looking forward to more features in Forge so one day it can take on full responsibility...