Skip to content

Instantly share code, notes, and snippets.

@logicalgroove
Last active October 8, 2020 01:10
Show Gist options
  • Save logicalgroove/03e8073e047cf2cceeabd7784ea712fd to your computer and use it in GitHub Desktop.
Save logicalgroove/03e8073e047cf2cceeabd7784ea712fd to your computer and use it in GitHub Desktop.

Open browser with jira ticket from spotlight.

(For MAC only, for now)

I found this easy way to lunch a ticket in the browser from spotlight.

AppleScript version (recommended)

Compiled script as app can be downloaded here.

  1. Open Spript Editor app and create a new ApplScript with the following content:
set ticketDialog to display dialog "Ticket Number?" default answer ""
set ticketNumber to text returned of ticketDialog
do shell script "open https://springbig.atlassian.net/browse/DEV-" & ticketNumber
  1. Save the file and export as Application

Bash version

  1. Create this file jira.command with the content:
#!/bin/bash
echo 'Ticket number?'
read ticket
open https://springbig.atlassian.net/browse/DEV-$ticket
exit
  1. Add launch permissions
chmod u+x jira.command
  1. Allow terminal to quit after exit command:

Open Terminal.app Preferences > Profiles > (Select a Profile) > Shell. on 'When the shell exits' chosen 'Close the window'

  1. Done.

How to use?

  1. Command + space to open spotlight
  2. type jira.command (usually jira is enough as spotlight will autocomplete)
  3. press enter
  4. a terminal will popup asking for the ticket number
  5. type 1234 and press enter

Browser will open with the link https://springbig.atlassian.net/browse/DEV-1234

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment