Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

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

Jira Development: How to create a button

Kathleen Jacobs
Contributor
May 17, 2018

I'm creating a plugin that when a button is selected, it triggers some CSS changes for the page.

I have a drop down list on section = system.top.navigation.bar with web-section and web-items that triggers JS file when selected.

How would I go about creating a button? More specifically, would like it on the kanban board view.

This is on server.

1 answer

0 votes
Praveen
Contributor
May 17, 2018
Kathleen Jacobs
Contributor
May 20, 2018

 created a button following that info. Created a .vm file with:

<li id="test">
<a class="aui-button">Test Button</a>
</li>

Calling it from a web-panel:

<web-panel key="test" location="jira.agile.board.tools" weight="35">
<label>test</label>
<resource type="velocity" name="view" location="test.vm"/>
</web-panel>

 but the button keeps turning into a drop-down :/

Praveen
Contributor
May 20, 2018

Hi,

You have to write something linke this, (the li tag creates list)

<div id="test">
<a class="aui-button">Test Button</a>
</div>

  -Praveen

Kathleen Jacobs
Contributor
May 21, 2018 edited

Didn't fix the problem :/

Almost looks like it's pulling things from the other button?

What i'm using to call the .vm file:

<web-panel key="toggleCSS" location="jira.agile.board.tools" weight="35">
<resource type="velocity" name="view" location="toggleCSS.vm"/>
</web-panel>

Code I have for my button in the toggleCSS.vm file:

<button class="aui-button">Compress</button>

But when i inspect what it's creating:

<button id="toggleCSS-button" class="aui-button ghx-actions-tools ghx-dropdown-trigger" aria-controls="toggleCSS-button_drop" aria-haspopup="true" aria-expanded="false">undefined</button>

No idea where it's getting all that from. It keeps showing a dropdown button called 'undefined'.

If I have nothing in the .vm file, it removed both buttons on the agile board. 'undefined' and the jira 'boards' one.

Even tried changing toggleCSS.vm to what you suggested and it did not work:

<div id="test">
<a class="aui-button">Test Button</a>
</div>
Praveen
Contributor
May 21, 2018 edited

Can you create a new vm file (for example "test.vm") and try with the below code alone?

<button class="aui-button">Button</button>
Kathleen Jacobs
Contributor
May 21, 2018 edited

Just tried. Same thing.  Screenshot:

Screen Shot 2018-05-22 at 12.56.50 AM.png

screenshot of code:

Screen Shot 2018-05-22 at 12.59.19 AM.png

Screen Shot 2018-05-22 at 1.05.52 AM.png

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Upcoming Jira Events