Every Friday I write a weekly report in our Confluence.
To do it, I create a new page, entitled "Week 2 (10.01.2022 - 14.01.2022)", then I fill a week summary. Dates are Monday and Friday of the respective week.
I am looking for a way to automatically insert a text containing week number and dates of Monday and Friday.
Our Confluence admin has created user macros for me, that calculate these values. And I have created a page template with them.
I have sent links to JS code snippets to our admin.
I can also access these macros from the page editor menu by clicking Plus sign -> Macro.
However, there are two issues
1. It is not possible to insert them into page title, only in the body.
2. These macros are always invoked, changing content of pages. If I visit some past report, I see current week number and dates of Monday and Friday on current week, not from the past.
Did you write the macros? Because it is possible to query the creation date of the page, and then use that value to calculate what you need, rather than from OS. Since you create the page every Friday, you can use that as a static point in time that never changes.
For example, something like
#set($currentPage = $pageManager.getPage($content.id))
No, I don't have admin privileges. I only have access to content tools of one space.
I have sent our admin following link and asked if it is possible to have similar function in the Confluence.
After some time he has created macros that I can see as "Get current Monday" and "Get current Friday."
He has also said that it is not possible to put these macros into the page title. Now I see. This because they are invoked always, and page title will always change making impossible getting pages by title.
So, I have created a page template, containing these macros in the body.
When I create a new page from that template, I click on "Preview", copy generated text, then click on "Edit", remove macros and paste that text instead.
That's tedious and unprofessional.
And I don't always create reports on Fridays. Yes, most of weekly reports are created on Fridays, but not always.
Indeed, using page creation date is a way to go, if it doesn't change after modifications.
The question with automatic filling of the title still remains.
The auto title creation would be hard, but the creation date remains the creation date. So that change they can make.
Have you looked at either of these two templates:
I know the first one can be modified. Maybe the second can as well?
Hi Atlassian Community, My name is DJ Chung, and I’m a Product Manager on the Confluence Cloud team. Today, I’m excited to share a new and improved version of Home. The new Home helps you ...
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