Getting the date in the title

Christina Gheorghe July 31, 2018

The Retrospective template has a nice feature where. when you click on the template it automatically opens a window with the current date in a title box. You can edit and add to the title as you wish.  I would like to duplicate this feature in a template I'm creating but I don't know how to do it. The Retrospective template has no macro or anything to indicate what this feature is. Does anyone know how to do it?

1 answer

4 votes
AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 1, 2018

Hi Christina,

I don't know a way to insert the date into the title as a variable using a page template but I have a workaround to offer.

You can put the Create From Template Macro on a page and use @currentDate in the title field, specifying your custom template as the template to be used. That will create a page using your template and inserting the date as the title.

Thanks,

Ann

Christina Gheorghe August 3, 2018

Thanks Ann. I tried out your solution and it does work if I want to create a template in a specific Space. I am creating a global template and the Create From Template macro doesn't seem to work for that. If I missed something, let me know.

David Pressley October 1, 2020

What if you need to have the datetime inserted into the page title, so that it can be uniquely named within the space? Or, what if you need to insert pageID into the title upon creation for the same requirement of uniqueness in page title? How can you create the same functionality of the create from template macro with @currentDate, @spaceKey? 

Denis Reznikov February 20, 2022

Hi @AnnWorley , same issues, adding macro not always respond to the use cases, for example, if I use main page as summary with "Page report" but all presented reports is a part of other sub-page (child) => Creating from template cause the page to be under the main page and not where from data reported. 

Is it possible to integrate @currentDate, @spaceKey as a part of template title creation? 

Kind of variable?  

 

Thank you

Edd Tillen November 20, 2022

I've been using this feature to create minutes etc. in certain spaces. But, I'd also find it useful if there was an @currentYear option, that obviously just shows the year. Is there such a thing as this, and I'm just using the wrong syntax?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events