A simple bash script to convert Asana tasks to Jira tickets. Utilizes jira-cli for Jira API calls but makes direct curl calls for Asana.
- Install jira-cli locally. It will handle the API calls on the Jira side. Jira-cli also sets a default project which is where the a2j script imports to (this can be overriden when calling jira-cli, however I didn't plumb that through to the cli call in my script yet).
- Create a personal access token (PAT) in Asana. For specific details on how to do this, see the Asana API instructions. When you have your PAT, you must export it from your shell as an environment variable by the name of
ASANA_PAT_TOKEN
for the a2j script to read. chmod
the a2j script to allow execution and run it!
a2j <asana_id> [-p projectKey] [-t jira_issue_type] [-P parent issue]
-
<asana_id>
is required and is the 16 digit id from the task URL. To find this ID, open your asana ticket and look at the URL. Theasana_id
is the LAST id in that URL. For example, with url:https://app.asana.com/0/0000000000000000/1111111111111111
theasana_id
is1111111111111111
. -
projectKey is optional. It defaults to the "home" project defined in
jira-cli
. (example: project key PROJ would create a ticket PROJ-123) -
Jira issue type is optional. It defaults to Task, but you can override with Bug, Story, Epic
-
Parent issue is optional. If provided, the parent issue should be the Jira ID of an epic the new ticket will be created under.
The body of the Jira ticket created will contain a link to the original Asana ticket at the start of the ticket body.