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

Set value to the Page Template Variable in Confluence Edited

Hi All,

I am creating a page in confluence with User Template  using confluence REST END point.

In the Template I created one Template Variable called "$issuekey".

I want to pass jira issuekey value to the $issuekey".

Currently I am doing using the following line of  code 


I am replacing the variable with issuekey value.


is there any way to set the variable value in confluence?

Also I tried with below code

def pageTemplate = pageTemplateManager.getPageTemplate(params.tamplateid as Long)
String tamplateAsString = pageTemplate.getContent()
String issuekey = params.key
List<Variable> tempvar = pageTemplateManager.getTemplateVariables(pageTemplate)
log.debug("Number of variables in template"+tempvar)
tempvar.each { t ->
log.debug("Value of variable before"+t.getValue().toString())

I am able to set the value with the above code.But unfortunately while creation of the page the value is displaying in the created page.

Please help to resolve this

4 answers

1 vote
Dario B Atlassian Team Aug 16, 2019

Hi  @Sushma ,

Kindly notice that this is not the best place to get help on development related questions.

The right resources are the ones listed in:



Please go to above resources, search for already existing threads/requests on the same topics and in case of no luck start a new thread or open a new request. 



any workaround for this??

Can anyone help me to resolve this please..

Hi @Dario B 

I have raised a request in both community and service desk.Thanks for the information.

Kind Regards


Dario B Atlassian Team Aug 22, 2019

You are very welcome. You should be able to get assistance in there :) 


Like Sushma likes this

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...

494 views 24 9
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