How to display the JIRA plugin functions in a spinner ( droplist ) on the page of the summary of projects ?

SIWEI ZOU February 4, 2013

How are you?

Recently, I have updated my JIRA to version 5.2.3. Then it caused that my report plugin changed its display format: from a spinner on the top-left side of the projects' summary page, to a visualable unfolded list on the right-down side of the projects' summary page.

Therefore, I want to change it back to show in a spnner list, which named "report" and the list contants all the functions in the plugin.

Thanks a million, if someone can share me any information about this issue.

May u have a nice day! All the best~~~^_^

2 answers

1 accepted

2 votes
Answer accepted
Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 4, 2013

Stuff this into your annoucement banner and you are going to be surprised :) This is for JIRA 5.2.5.

<script type='text/javascript'>
AJS.$(document).ready(function() {


var nwelem = '<table width="100%"><tr><td><h2>Summary</h2></td><td style="text-align:right;"><div id="reportDropDown"><div class="aui-dd-parent"><h2><a href="#" class="aui-dd-trigger unstyled">Reports</a></h2><ul class="aui-dropdown aui-dropdown-left aui-box-shadow">';
AJS.$('#fragprojectreports').children('.mod-content').children('.issues').children('.item').each(function(i){

var hf = AJS.$(this).children('.issue').attr('href');
var name = AJS.$(this).children('.issue').text();
nwelem = nwelem + '<li><a href="' + hf + '">' + name + '</a></li>';
});

nwelem = nwelem + '</ul></div></div> </td></tr></table>';


AJS.$('#project-tab').children('h2').replaceWith(AJS.$(nwelem));

AJS.$("#reportDropDown").dropDown("Standard");
AJS.$('#fragprojectreports').hide();
 

});
</script>

EDIT: Included the javascript block in the beginning.

0 votes
Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 4, 2013

Apart from modifying JIRA code, I am not sure how to achieve this. Should be possible with some javascripting, but may be tedious to do it.

Btw, that is the issue with this format?

SIWEI ZOU February 4, 2013

thank you very much. And yes, this is a issur about format. Meanwhile, I prefer the jira company can support a method to choose the format, as they had it before.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 4, 2013

I can echo what Renjith says, I had a quick look at something similar the other day - you'll need to amend the core code that's generating the http page. Or write javascript that re-arranges the screen.

SIWEI ZOU February 4, 2013

Thanks a million. Could you tell me more information about how to amend the core code which generating the http page, or show me some links for the detail solution?

That's so nice u all, thanks again ^_^

Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 4, 2013

That's going to be tough :) You can download the source code from https://my.atlassian.com if you have a license and start playing around with that code. And it is not going to be easy.

https://confluence.atlassian.com/display/JIRA/Building+JIRA+from+Source

Suggest an answer

Log in or Sign up to answer