Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

User Macro to Get a count of likes or comments on a page?

Hello, 

 

Can anyone help with custom macro to display number of likes (or comments) on a page?

 

I'm trying to populate "page properties report" but build in likes/comments count functionality has a bug and column headers don't display likes/comments.

 

So i'm building out template for "page properties" macro to capture the data and than pull it on higher up report page. 

 

Thanks in Advance!

1 answer

1 accepted

1 vote
Answer accepted
Dominic Lagger
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.
Aug 24, 2021

Hi @Alex Kulichkov 

I only get the answer for the comments:

#set( $page = $pageManager.getPage($content.getId()) )
Comments: $page.getComments().size()

For the likes, I do not know how to get it. Sorry.

Regards, Dominic

Hi @Dominic Lagger , 

 

Thanks for the answer, i think i know the variable for likes.

 

One question is it all i need to include in Custom Macro?

 

Best,

Alex

Dominic Lagger
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.
Aug 25, 2021

My full "No macro body" looks like this:

## Macro title: My Macro
## Macro has a body: Y or N
## Body processing: Selected body processing option
## Output: Selected output option
##
## Developed by: My Name
## Date created: dd/mm/yyyy
## Installed by: My Name

## @noparams

#set( $page = $pageManager.getPage($content.getId()) )
Comments: $page.getComments().size()

Please share your code for the likes. I'm interessted into this.

Regards, Dominic

Thanks for the full code, comment count works, but we are still researching one for likes.

We tried likesManager.getlikes() but it didnt work. 

 

We will be working with Atlassian to find the solution and post it here once found!

Like Dick likes this

Hey. Did you end up finding a solution with Atlassian?

Like Tia Marciel likes this
Tia Marciel
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Aug 09, 2023

yes, any updates?

Like Firas Chikhrouhou likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
7.12.3
TAGS
AUG Leaders

Atlassian Community Events