hikerspath
4/19/2019 - 6:25 PM

Automator: Jira Task Templates

So here you would create 2 separate "Services" using the "Run AppleScript" builder in Automator. Call them what you want, only I would suggest labling them so that you are able to make distinction when it comes to setting up keyboard shortcuts.

By default, when the services are saved, you will have the ability to see the service in your named application menu. If you are using 'Chrome' for example, it would be the 'Chrome' menu. There would now be separate items for the automations you created in the 'Services' sub-menu.

If you would like, you can take each of these and make them a short-cut that you can invoke with keyboard in any description box (Bee, Bodo, or Chrome for Jira).

on run
  set dateString to do shell script "date +'%Y-%m-%d'"
  tell application "System Events"
    keystroke "{panel:title=Requirements}"
    key code 36
    keystroke "__problem__"
    key code 36
    keystroke "__personal__"
    key code 36
    keystroke "__frequency__"
    key code 36
    key code 36
    keystroke "{panel}"
    key code 36
    key code 36
    keystroke "{panel:title=Requests}"
    key code 36
    keystroke "||Date||Team||Team Member||Details"
    key code 36
    keystroke "|" & dateString & "|__team__|__reporter_name__|__details__"
    key code 36
    key code 36
    keystroke "{panel}"
    key code 36
    key code 36
    keystroke "{panel:title=Acceptance Criteria}"
    key code 36
    keystroke "- __acceptance_criteria__"
    key code 36
    key code 36
    keystroke "{panel}"
    key code 36
    key code 36
    keystroke "{panel:title=Notes}"
    key code 36
    keystroke "__interesting_information__"
    key code 36
    key code 36
    keystroke "{panel}"
  end tell
end run
on run {input, parameters}
  set dateString to do shell script "date +'%Y-%m-%d'"
  tell application "System Events"
    keystroke "{panel:title=Observed Behaviour}"
    key code 36
    keystroke "__observed_behaviour__"
    key code 36
    key code 36
    keystroke "{panel}"
    key code 36
    key code 36
	keystroke "{panel:title=Steps to Reproduce}"
    key code 36
    keystroke "- __steps__"
    key code 36
    key code 36
    keystroke "{panel}"
    key code 36
    key code 36
    keystroke "{panel:title=Expected Behaviour}"
    key code 36
    keystroke "__expected_behaviour__"
    key code 36
    key code 36
    keystroke "{panel}"
    key code 36
    key code 36
    keystroke "{panel:title=Reports}"
    key code 36
    keystroke "||Date||Team||Team Member||Details"
    key code 36
    keystroke "|" & dateString & "|__team__|__reporter_name__|__details__"
    key code 36
    key code 36
    keystroke "{panel}"
    key code 36
    key code 36
    keystroke "{panel:title=Notes}"
    key code 36
    keystroke "__interesting_information__"
    key code 36
    key code 36
    keystroke "{panel}"
  end tell
end run