Skip to content

Mermaid-Chart/jira-plugin

Repository files navigation

Mermaid chart JIRA plugin

Installation

  1. Set up environment variables:
NODE_ENV=production
MC_CLIENT_ID=6643413f-36fe-41f5-83b6-18674ec599f0
MC_BASE_URL=https://test.mermaidchart.com
  1. Configure application with config.json file (set up domain and DB connection) for production env
  2. Run npm run start
  3. How to add plugin into atlassian marketplace

Configure diagram selection page

  1. Attach plugin js to the page
<script src="https://[jira plugin domain]/js/plugin.js"></script>
  1. Call function window.CP.saveData(data) on diagram selection (iframe will be closed automatically after execution). Example
window.CP.saveData({
  documentID: "c2f481f9-433f-4491-a9d4-811d7150122f",
  major: "0",
  minor: "1",
});
  1. Call function window.CP.cancel() if you want close iframe without selecting diagram
  2. Function window.CP.getData() returns current selection diagram data.
  3. Example file /example/index.html

Development

  1. Configure your local environment with following guide (steps 1-3)
  2. Add a credentials.json (copy from sample) file in your app directory with your information:
  1. Set up environment variables:
MC_CLIENT_ID=6643413f-36fe-41f5-83b6-18674ec599f0
MC_BASE_URL=https://jiratest.mermaidchart.com
  1. Start application npm run start