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
NewParentPage.setBodyAsString(tamplateAsString.replaceAll("issuekey","${issue.key}"))
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 ->
t.setValue(issuekey)
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
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: https://developer.atlassian.com/server/confluence/get-help/
Specifically:
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.
Cheers,
Dario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are very welcome. You should be able to get assistance in there :)
Cheers,
Dario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.