To learn more about Tempo products, please visit our Help Center. For support, see our Support Portal.
Running Prime Cloud Locally
Details of Jira plugins on cloud
https://developer.atlassian.com/cloud/jira/platform/
Repository:
Clone https://bitbucket.org/tempo-io/cloudtimesheet/src/master/ (Ask access to Krisztian)
If you log to http://bitbucket.org using Google, create an App password inside your Bitbucket Account Settings and use that as the HTTPS password
Config the dev environment
This page helps how to do it: https://developer.atlassian.com/cloud/jira/platform/getting-started-with-connect/
Install nvm by brew -
brew install nvm
Install Node version 12.x -
nvm install 12.x
Be aware about the npm version, it must be 6.x
Install project (npm install)
Configure ngrok
Create the account on https://dashboard.ngrok.com/ with google email of Tempo
Download ngrok here
Unzip file:
unzip ngrok-stable-darwin-amd64.zip
Connect your account with the step by step on the dashboard of ngrok
New versions of ngrok require you to execute
ngrok config add-authtoken
. Older versions will usengrok authtoken
If you have problem with permission to install or unzip due to security on your Mac, do the following way
Create a folder. Example: /Users/your_user/Documents/Executable
Unzip the file you downloaded in this folder
open your ~/.zshrc and add this line there export PATH=/Users/your_user/Workspace/Executable:$PATH. Close and save the file
Configure the dev environment on Atlassian
Create your Jira on http://go.atlassian.com/cloud-dev
Enable development mode by following the page help on the start of this topic
Config a new password for external API
Go to https://id.atlassian.com/manage-profile/security/api-tokens > Create API token
Create a new file in the project's root directory with the name "credentials.json" with the content:
{ "hosts": { "https://<YOUR_WORKSPACE>.atlassian.net": { "product": "jira", "username": "<YOUR_TEMPO_EMAIL>", "password": "<API_TOKEN_PREVIOUSLY_CREATED>" } } }
Run the server locally (node static.js)
It automatic upload your plugin to your Jira and will load everything from your computer
After run the server, open the link generated in your terminal, for you allow ngrok. It will be required every time you run this command.
Local tunnel established at https://xxx.ngrok.io/You should click on "Visit Site" button
Now it is running!
We only need to config it to the profile that your user have and see it.
Open the menu item "Apps" > "Manage your apps" > "Timesheet Configuration".
Than, add the profiles on the Auditors Groupps: jira-administrators, atlassian-addons-admin, site-admins.
After that, the menu "Timesheet" must appear inside the menu "Apps".
DO NOT uninstall, install nor activate the plugin via JIRA. You won't be able to install it again, so you'll have to create another Jira instance, with another domain.
This is a Atlassian bug. To install and uninstall, npm start
and CTRL + C should be enough.
Inside the code
The project run with AngularJS and NodeJS, the pointer is the "static.js" file that start everything.
Front:
All the front end is inside the folder "public".
The application is started by the file "public/js/app.js".
It has a MVC pattern
Backend
All the backend is inside the folder "app".
Its used to connect with somethings on Jira
Tests
To run the tests, we only need to run "npm test".
Debug
To debug the front inside of browser, we need to do this:
Open the dev tools by F12 or inspecting element
Go to the "Source" tab
Inside of "top", expand the "extension_id" arrow.
Inside this arrow expanded, expand the first one with the ngrok domain.
Now all your code is there, and you can put all break points you want on the files that you changed
Remember, locally we can put break points inside of the files changed, not only inside of all.js