Need a unique number to be added to page being created out of template

avinsinghal89 February 22, 2018

I have created a user template . I need to use this template to create new project architecture as reusable asset. While creating new project architecture it should create with some unique number of 5-7 digit as a document identifier along with some user input of project name. This identifier should be visible in Page title and page link.

2 answers

0 votes
Markus Pöhler
Contributor
August 3, 2020

Hi, have you found a solution for your requirement? I am looking for the same. 

0 votes
Nic Brough -Adaptavist-
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 Leaders.
February 22, 2018

Ugh, a desire for a unique id in the page title implies a broken process to me.

It's a reason Confluence does not have that function - because you should not need it.

I would strongly recommend you revisit the requirement, as it's a poorly thought out one.

But there are some things you should think about too:

  • Every page has a tiny url which is more useful than an id - look in the page properties
  • Every page has an id in the database, which is not a great way to find a page, but you can expose it on pages with a user macro (or look in the properties), and you can build a long url from it (pages/viewpage.action?pageId=104076682)
  • If you have script runner, you could catch page create and stick an id into the page name
avinsinghal89 February 22, 2018

Than you for your response 

Possible solution i thought

1) We tried implementing the Create Page Macro which did the job 80% got DD/MM/YYYY  and $ident  but additionally we need the name of the title be inputted from user , can we achieve this somehow

2) Better  solution would be appending the id to the page name/title on create page event through script runner as we have licenses for the same, Can you please guide with the code if possible ?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events