Hello,
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)
$cweek
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.
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.
Hello,
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.