Clone the application into your local machine and install node modules.
git clone https://github.com/bitovi/jira-integrations.git
cd jira-integrations
npm i
The next step is to fill in your environment variables. You can use the .env.example to create your .env in your root folder
cp .env.example .env
Follow the steps below to get remaining environment variables:
- Open Jira developer console. https://developer.atlassian.com/console/myapps/
- Create your app and choose OAuth2.0, put in the app name and accept the terms.
- Click Permissions, add the Jira API scope then configure it to the following scopes:
- Jira
- read:jira-work
- write:jira-work
- Confluence
- read:app-data:confluence
- write:app-data:confluence
- Jira
- Click Authorization, input the callback url, as default for this application locally, use
http://localhost:3000/oauth-callback
and save. - Click Settings and scroll down to copy your CLIENT_ID and CLIENT_SECRET.
- The CLIENT_JIRA_API_URL is
https://api.atlassian.com
.
Note: All environment variables that start with CLIENT
will be sent to the client side and exposed.
Open the terminal and run
npm run dev
Open your browser and navigate to http://localhost:3000/ to view the minified version of the app.
Navigate to http://localhost:3000/dev to view the unminified version of the app.
The following setup steps will enable deployment of your app to Jira through Atlassian Connect. These steps should only need to be performed once.
- Create an Atlassian dev environment where you will upload the application for testing.
- Enable development mode so you can upload an application directly.
- Follow the Atlassian instructions to Prepare for tunneling where you create an ngrok account and copy your Authtoken.
- Open a fourth terminal and set up the ngrok environment.
npm install -g ngrok
ngrok authtoken <Authtoken>
The following steps are repeatable as many times as needed to re-deploy and re-tunnel your local app.
- Start ngrok and point it to the local service port
ngrok http 3000
- After the tunnel starts, you need to create the
atlassian-connect.json
file by runningnpm run create:atlassian-connect -- --local
- Once created, copy the secure domain (e.g.
https://46f7-8-47-99-200.ngrok-free.app
) and updatebaseUrl
in public/atlassian-connect.json with the domain. - Open your Jira dev environment and click Apps from the top nav, then
Manage Your Apps
. If you have enabled devlopment mode, you should see anUpload app
option next toBuild a new app
. ClickUplaod app
. - Paste the secure domain into the text box, and add
/atlassian-connect.json
to the end (e.g.https://46f7-8-47-99-200.ngrok-free.app/atlassian-connect.json
). ClickUpload
. - The apps list should refresh and show
Timeline Report
as a User-installed app. From here, clickApps
in the top nav and you should see aYour Apps
heading withTimeline Report
as an option underneath. ClickTimeline Report
and you should see the Timeline Report app load in the window!