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

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

What triggers a user macro to be recalculated?

N.B. The question as formulated above is probably a great example of the XY Problem, so please forgive the long-winded explanation below as to why I'm asking. If you have advice on better ways to approach the wider problem, I'm very open to hearing it! Also, not sure if it matters or not, but I thought I'd mention that although we're currently using Server 6.4.0 (I know, it's at end of life – very long story) at the moment, we'll likely be moving to Cloud in the coming months, so if the hosting type or version affect any of this, I'm eager to learn more about that too.

So, this question is prompted by an idea I had to use the Page Properties Report macro to highlight ongoing and upcoming events that everyone in our company should be acutely aware of. I'm talking about all- or multi-day events – e.g. a week reserved for a company-wide feedback round, or Cyber Weekend, which is a major business event for our customers.

I figured that if we made a page template, and used it to make one page per event, we could include a Page Properties macro that would for example record the type of event, a description, the start and end dates, like this:

Screenshot 2019-10-11 at 18.27.36.png

There'd also be a separate set of dates to determine when this event should be 'flagged', e.g. this year the event is from 29 November to 2 December, but for our customers the build-up to this period is just as critical, so maybe we'd start flagging the event at the beginning of November, to remind everyone of the stakes involved. Starting 1 November, the idea would be for everyone to see something like this:

Screenshot 2019-10-11 at 18.35.33.png

I even wrote my first user macro to parse the start- and end-dates for flagging the event, compare them to the current date, and then output a status like 'Live', 'Pending', or 'Completed'. Because once the event is over, it shouldn't be featured in the Page Properties Report anymore – it's intended to be a heads-up dashboard, not a rear-view mirror.

But this is where I run into problems. It seems that the Page Properties Report macro does not let you filter based on the Page Properties themselves. The 'Including text' filter does work with the values for the keys, but it doesn't seem to play nicely with macros. For example, Including text: sale finds no content, whereas Including text: description finds the Cyber Weekend page. Of course this means I can't filter for 'Live'.

So, now I'm wondering if I can modify my macro to actually add and remove labels to the page based on the dates. But before I even try to figure this one out, I want to check whether macros update in the background, or if they only run when a page is loaded, for example. The Page Properties Report macro might exist on the main landing page of our company-wide Confluence space. But this hypothetical label-adding macro would exist on a page that would get much less traffic, especially before it has been featured on the landing page…

So with the Cyber Weekend example – imagine 1 November arrives, and nobody goes to the Cyber Weekend page itself. Does that matter? Would the macro continue to execute based on a date change alone, such that the label gets applied and the Page Properties Report macro updates on the landing page, or would somebody have to load the Cyber Weekend page first?

Thank you very much for your attention and any advice you can offer.

1 answer

1 accepted

1 vote
Answer accepted

Hi Ian,

As far as user macros go, your suspicion is correct: they are only run when loading a page.

Thanks for confirming, Stephen, that makes sense.

Might have to go back to the drawing board on this one.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Confluence

What do you think is the most *delightful* Confluence feature? Comment for a prize!

- Create your own custom emoji 🔥 - "Shake for Feedback" on mobile 📱 - An endless supply of GIFs via GIPHY 🤩 Is there anything quite as nice as a pleasant surprise? Comment below with what...

342 views 23 8
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you