AUI in JIRA Gadget

I took the sortable table example from AUI sandbox and added it to a JIRA gadget to see if it worked well. If so I could develop our companies gadget using AUI.

When I ran the gadget I got fairly similar looks of the table as to what was shown in AUI sandbox but the table wasn't sortable.

Is there something wrong in the way I call required resources, should I add something to my pom file?

I'm using ATLAS 4.2.3 and to create the plugin I used atlas-create-jira-plugin

Also is there another way to display data tables that can be used for rapid development?

here's excerpt of my code....

#requireResource("com.atlassian.jira.gadgets:common")

#requireResource("com.atlassian.gadgets.publisher:ajs-gadgets")

#requireResource("com.mycompany.plugin.dashboard:dashboard-resources")

...

<div id = "container">

<table id="mySortableTabley" class="aui aui-table-sortable">

<thead>

<tr>

<th class="aui-table-column-issue-key">Key</th>

<th>Issue Name</th>

<th>Watchers</th>

<th class="aui-table-column-unsortable">Description</th>

</tr>

</thead>

<tbody>

<tr>

<td><a href="#z">KAR-1123</a></td>

<td>Cannot sort tables</td>

<td>2</td>

<td>Table sorting should be allowed</td>

</tr>

<tr>

<td><a href="#y">KAR-87</a></td>

<td>Issue Page doesn't load in IE</td>

<td>0</td>

<td>When loading issue page on IE it doesn't show</td>

</tr>

<tr>

<td><a href="#b">KAR-1133</a></td>

<td>Program crashes on opening</td>

<td>3</td>

<td>When opening JIRA it crashses</td>

</tr>

<tr>

<td><a href="#a">KAR-4</a></td>

<td>Vending Machine is empty</td>

<td>9001</td>

<td>NO SOFT DRINK!</td>

</tr>

<tr>

<td><a href="#a">BAT-4</a></td>

<td>Computer is dead</td>

<td>1</td>

<td>Work computer is not turning on</td>

</tr>

<tr>

<td><a href="#a">BAT-11</a></td>

<td>Workers are being too loud</td>

<td>10</td>

<td>The people around me are too loud</td>

</tr>

<tr>

<td><a href="#a">BATA-8</a></td>

<td>Lift door sometimes doesn't open</td>

<td>16</td>

<td>When trying to enter the lift, the doors do not open</td>

</tr>

<tr>

<td><a href="#a">BATA-14</a></td>

<td>Coffee machine is needed</td>

<td>501</td>

<td>Coffee is needed</td>

</tr>

</tbody>

</table>

</div>

2 answers

Reviewing your code, I see the table header defined like

&lt;th class="aui-table-column-unsortable"&gt;Description&lt;/th&gt;

My research indicates that using the aui-table-column-unsortable class will restrict users from sorting the table. Please try calling the class aui-table-column-sortable to allow users to sort the results.

I know that sortable table is experimental. I tried regular table and used class "aui" The table doesn't look similar to what is showed in sandbox. That is, it doesn't draw a line after each row.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,203 views 13 19
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot