Is it possible to change the number of Issue Links that display by default?

Currently in a JIRA ticket that has Isue Links - the default is to show the first 5 links followed by a "Show x more links..." which will expand the Issue Links display to show all links.

Is it possibile to either force the default to display all issue links or to change the default to show 10 links?

3 answers

1 accepted

4 votes

It is hard coded in LinkBlockContextProvider class.

private static final int DEFAULT_DISPLAYED_LINK_COUNT = 5;

You ca override it in the linkblock.vm in the jira-view-issue-plugin, which is a bundled plugin. Some tips on editing a bundled plugin can be found in this post.

http://www.j-tricks.com/1/post/2012/05/modifying-atlassian-bundled-plugins.html

Wow, thanks a lot Jobin!

I've found the code, but there is no such a line in linkblock.vm.

I'm not sure what to change in the code, could you please suggest?

http://dl.dropbox.com/u/27118118/linkblock.vm

Totally *Untested* suggestion. Put the following line after the first #set statment.

#set ($modifiedDisplayedLinkCount = 10)

And then replace all uses of $displayedLinkCount with $modifiedDisplayedLinkCount

Yooohoo! Incredible, it works :) Thank you so much!

The only issue is that amount of clones left as hidden (in braces) is not displayed correctly. Attached a screenshot.

I have no idea where to find and fix it. Maybe you know where to fix this thingy?

explanation

That goes again to the action class. You might be better of removing that. Remove this:

<span>($hiddenLinkStats)</span>

The count is there in the link anyways!

Thank you very much Jobin!

Modifiying the JIRA source code might become a real headache making harder upgrade to newer versions.

On the other hand, the Links Hiearchy add-on shows all the linked issues at a glance without requiring you to modify any source code. By default, it expands the first depth level but users can configure it to auto expand n-levels automatically.

> It is hard coded in LinkBlockContextProvider class.

 

latest.png

Hi Andy,

I'm sure it can't be changed inside Jira. Maybe you will need to a little code change in the Jira files. Not sure if it's worth the trouble.

Hi Ramiro,

In our case we really need to increase the amount of links shown there. We need at least 12...

I spent a couple of hours digging the code of Jira and didn't find any suitable info.

Do you know where to search for it?

Thanks for any help in advance.

Thank you very much Jobin!

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,342 views 14 20
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