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

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


1 badge earned


Participate in fun challenges

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


Gift kudos to your peers

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


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!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

User macro - Display current calendar week + n


I try to create user macro which display, as a number, current calendar week + n. 

Where "n" is written in the @ param. 

This is my code: 

## @param Nextcw:title=Calendar week +n |type=int|required=true|desc="n" value
#set ($n = $paramNextcw)
#set($Integer = 0)
#set($Integer= $Integer.parseInt($n))

#set($calendar = $action.dateFormatter.calendar)
#set($cweek= $calendar.get(3)+$Integer)

It's working almost good. But the problem is that variable $cweek is an integer. 

I assume that I should convert it to the type "date"? In other way I'll get values above 52.  

But I have no idea how to handle it. I would add that this is my first usermacro. So I'm total newbie. 


1 answer

2 votes
Katerina Rudkovskaya _Stiltsoft_
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.
Mar 21, 2023

Hi @Konrad Gora,

Please check if your company uses our Table Filter and Charts for Confluence app – the case can be accomplished via its Table Transformer macro.

Tell us if you see the Table Transformer macro among the available macros – we’ll be able to help you with the SQL query.


Thank you for answer. I know solution with Table filter macro but I'm not sure if it is for us. With this app I am limited to display CW only in table. I need more flexible way to show CW. That's why I chose the user macro solution.

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events