Missed Team ’24? Catch up on announcements here.

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

Objects and soy templates?

Sune Mølgaard November 13, 2012

A customer wants a change to the recently-updated-dashboard macro. Our previous approach was to edit the velocity file - specifically creating a new change set and populating it with a subset of the change items, based on the user's group memberships.

Since the macro has been updated to a soy template in recent versions, my question is how to do this in soy. For instance, can I get a list of groups that the user is a member of ($userAccessor.getGroupsAsList($action.remoteUser) in velocity)?

3 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Joe Clark
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 6, 2012

It looks like the recently updated dashboard macro is a little bit more complicated now. It can actually be rendered in two different places - parts of it may be rendered on the client, as you say, by dashboard-macros.js, but the initial render of the macro still takes place on the server in com.atlassian.confluence.plugins.macros.dashboard.recentupdates.RecentlyUpdatedContentMacro.

You could also look at changing the soy template itself - recently-updated-dashboard.soy


Sune Mølgaard December 11, 2012

Incidentally, I had gone ahead and done my desired chanegs in RecentlyUpdatedContentService.java, but since that, essentially, is one of your recommendations, I shall mark your answer as accepted.

Thank you :-)

0 votes
Sune Mølgaard November 21, 2012

Anyone, please?

0 votes
Sune Mølgaard November 15, 2012

Incidentally, I have found the dashboard-macros.js file that should seem to be the one sending the data to the template - it just doesn't quite seem to work with my attempted changes.

Would anyone happen to know how I can turn on debugging for whatever part of Confluence that touches that .js file so I can see if/where it fails?

TAGS
AUG Leaders

Atlassian Community Events