Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira macros in Confluence do not auto adjust height

Kevin_Draggoo
October 8, 2019

I've tried this with the "Created vs Resolved" macro and the "Jira Roadmap" macro. I have not performed extensive testing, but it seems when I first add the macro, the height adjusts fine. After I edit the macro, though, the height of the widget is set to a static, smaller value. 

I've tried editing various fields for the macro, changing the width as both pixels and percentages. Moving the macro around to different areas of the page. Moving the macro into columns. And other random things. 

I'm using Safari on MacOS. This happened before and after I updated MacOS to Catalina. 

I just tried it using Chrome on the same Mac. I used the same page where 2 macros of the same type were both too short. Editing the first gadget made the height correct. Editing the second gadget had no change and was still short.

 

I tempted fate and edited the first macro again. It stayed the same, correct height. 

5 answers

1 accepted

6 votes
Answer accepted
Stephen Deutsch
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 Champions.
November 11, 2014

Hi Robert,

I was bored, so I decided to try it out.  It's a bit of a hack and it's maybe not the easiest way to do it, but at least it works smile

## @param Timezone:title=Time Zone|required=true|type=enum|enumValues=time.zone.user_time_zone,time.zone.HST,time.zone.AST,time.zone.America.Los.Angeles,time.zone.America.Denver,time.zone.America.Mazatlan,time.zone.America.Phoenix,time.zone.America.Belize,time.zone.America.Chicago,time.zone.America.Mexico.City,time.zone.America.Regina,time.zone.America.Bogota,time.zone.America.Indianapolis,time.zone.America.New.York,time.zone.America.Caracas,time.zone.America.Halifax,time.zone.America.Santiago,time.zone.America.St.Johns,time.zone.America.Buenos.Aires,time.zone.America.Godthab,time.zone.America.Sao.Paulo,time.zone.Atlantic.South.Georgia,time.zone.Atlantic.Azores,time.zone.Atlantic.Cape.Verde,time.zone.Africa.Casablanca,time.zone.Europe.Dublin,time.zone.GMT,time.zone.ECT,time.zone.Europe.Belgrade,time.zone.Europe.Berlin,time.zone.Europe.Paris,time.zone.Europe.Warsaw,time.zone.Africa.Cairo,time.zone.Africa.Harare,time.zone.Asia.Jerusalem,time.zone.Europe.Athens,time.zone.Europe.Bucharest,time.zone.Europe.Helsinki,time.zone.Africa.Nairobi,time.zone.Asia.Baghdad,time.zone.Asia.Kuwait,time.zone.Asia.Tehran,time.zone.Asia.Baku,time.zone.Asia.Muscat,time.zone.Europe.Moscow,time.zone.Asia.Kabul,time.zone.Asia.Karachi,time.zone.Asia.Calcutta,time.zone.Asia.Colombo,time.zone.Asia.Katmandu,time.zone.Asia.Almaty,time.zone.Asia.Dhaka,time.zone.Asia.Yekaterinburg,time.zone.Asia.Rangoon,time.zone.Asia.Bangkok,time.zone.Asia.Hong.Kong,time.zone.Asia.Krasnoyarsk,time.zone.Asia.Kuala.Lumpur,time.zone.Asia.Taipei,time.zone.Australia.Perth,time.zone.Asia.Irkutsk,time.zone.Asia.Seoul,time.zone.Asia.Tokyo,time.zone.Australia.Adelaide,time.zone.Australia.Darwin,time.zone.Asia.Yakutsk,time.zone.Australia.Brisbane,time.zone.Australia.Hobart,time.zone.Australia.Sydney,time.zone.Pacific.Guam,time.zone.Asia.Vladivostok,time.zone.Pacific.Noumea,time.zone.Pacific.Auckland,time.zone.Pacific.Fiji,time.zone.Pacific.Apia,time.zone.Pacific.Tongatapu
#set ( $timezones = $action.dateFormatter.timeZone.sortedTimeZones )
#set ( $selectedTimezone = $action.dateFormatter.timeZone.default.wrappedTimeZone )
#foreach ( $timezone in $timezones )
  #if ( $timezone == $paramTimezone )
    #set ( $selectedTimezone = $timezone.wrappedTimeZone )
  #end
#end
#set ( $calendar = $action.dateFormatter.calendar.getInstance($selectedTimezone) )
#set ( $hour = $calendar.get(10) )
#set ( $minute = $calendar.get(12) )
#if ( $hour < 10 )
  #set ( $hour = "0" + $hour )
#end
#if ( $minute < 10 )
  #set ( $minute = "0" + $minute )
#end
<p>$selectedTimezone.getDisplayName(false, 0): $hour:$minute</p>

 

Paul DeSousa
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 Champions.
November 11, 2014

This works like a champ! Thank you.

tinyCabbage
Contributor
July 3, 2015

Sorry where do you apply this? Do you need to create a new macro? edit the page in source editor? Sorry for the basic question, i'm pretty new to confluence.

Stephen Deutsch
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 Champions.
July 3, 2015

Yes, you need to create a new user macro (You must be an administrator; click the Gear icon at the top of the screen, then General Configuration, enter your password, and find "User Macros" on the left side of the screen). You just give the user macro any name you want (no spaces) and a title (what will be displayed in the macro editor). If you want so that not everybody can see it, choose the visibility under the name. Everything else can stay blank/as it is. Once you save it, the macro should be available to insert on a page.

0 votes
Paul DeSousa
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 Champions.
November 11, 2014

What portions? Not sure I understand the question. Ideally I would want a macro that takes as a single parameter a time zone, and outputs the current time in that time zone. I have that all but I cannot find a good example of setting the timezone in dateFormatter.

0 votes
Davin Studer
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 Champions.
November 10, 2014

For what portions of the page are you wanting this multiple time zone stuff on?

0 votes
Paul DeSousa
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 Champions.
November 10, 2014

Good point David! I guess I need to be more clear. I want to display the time. E.G.: CST: 13:45 EST: 14:45 CEST: 20:45 KST: 04:48 ...

hemant_khanna
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!
January 7, 2019

Almost 4 years late :) But change the $hour line as:

#set ( $hour = $calendar.get(11) )

0 votes
Davin Studer
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 Champions.
November 10, 2014

What do you want to display in multiple times zones? Is it the create and modified date? Comments? Something within the page body? All of the above?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events