Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Adding a customized button plugin to Jira Issue Page Edited

Hi, I am trying to add a customized button plugin to all my Jira issues. I am new to plugin dev and maven projects.

I have finished making the functionality of the button with JS, which calls Jira Rest API and automatically creates a new issue with some of the fields filled in already.

The button has a client and server side which the client (inside public directory) is triggered to read the issue key on the webpage and call server (index.js), and the server calls the api. I also have another version of the button server which uses Java.

This is the code for the client's side:

document.getElementById("create-test-case-link").addEventListener("click", findTestCase);
async function findTestCase() {
let form = document.getElementById("data-issue-key"); //input of issue key
let issueKey = form.elements[0].value; //getting the issue key from input
const data = {issueKey}; //wrapping issue key as json package to pass to server
const options = {
method: 'POST',
headers: {
'Content-Type': 'application/json'
body: JSON.stringify(data)
const response = await fetch ('/api', options);
const json = await response.json();
console.log(json); //logging the response from the server


Currently I am stuck on how to place the button onto my issue.

I tried to create a Web Item (circle in red) on the issue page, but I don't how to proceed further to "migrate" the code over.

<web-item name="Create Test Case" i18n-name-key="" key="create-test-case" section="transitions-all" weight="1000"> 
<description key="create-test-case.description">The Create Test Case Plugin</description>
<label key="create-test-case.label"></label>
<link linkId="create-test-case-link">/projects/PLAT/issues/</link>




Can someone give my any suggestions on where or how to put my code for the button onto the jira plugin?  Or how to "link" my button code to the web item?


Thanks a lot

0 answers

Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you