Sorting of comments

When I add a comment onto one of my spaces the old comment keeps at the top of the page and the new comment falls below it. Is there a way to flip flop this, so the new comment shows first and the old comment falls to the bottom?

** I need to be able to reverse the order on comments on a certain space not for a whole. When i do the following:"If you want to do this per space simply wrap it in {html} tags and place it in the custom header area: Space Admin -> Look And Feel -> Themes -> Configure Theme -> Header."

I recieve an error message on each header of each page that shows below. What am I doing wrong for this not to work correctly?

Unknown macro: {html}

<script>
AJS.toInit(function(){
$comments = AJS.$('#page-comments');
$comments.children().each(function(i,li){$comments.prepend(li)})
});
< /script>

1 answer

1 accepted

I guess not possible in OnDemand. But on an installed variant, David's suggestion will help - https://answers.atlassian.com/questions/28999/is-it-possible-to-reverse-the-order-in-which-comments-appear

** I need to be able to reverse the order on comments on a certain space not for a whole. When i do the following:"If you want to do this per space simply wrap it in {html} tags and place it in the custom header area: Space Admin -> Look And Feel -> Themes -> Configure Theme -> Header."

I recieve an error message on each header of each page that shows below. What am I doing wrong for this not to work correctly?

Unknown macro: {html}

<script>
AJS.toInit(function(){
$comments = AJS.$('#page-comments');
$comments.children().each(function(i,li){$comments.prepend(li)})
});
< /script>

{html} macro is not enabled in OnDemand, AFAIK.

I am not in OnDemand. We are currently an enterprise installation. Is this code possible on this sort of instance? If this code is possible, maybe we could set up a call for you to maybe walk me through this? I really need to get this to work.

You can enable the html macro if you are an Enterprise Hosted customer. Read https://confluence.atlassian.com/display/DOC/Enabling+HTML+macros

But remember, once you are migrated to OnDemand this will be turned off.

This works but if you click reply from an email when a new comment is created you will be unable to type into the reply field.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Monday in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

499 views 6 11
Read article

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