Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a Confluence Page from a Global Template utilizing Scriptrunner Post Function

Zachary Singh January 4, 2023

Hi There-

 

I have a post function created in my workflow that will create a page in our linked confluence space while copying over the description and the summary from the jira ticket. We are utilizing the script from this blog post : https://www.adaptavist.com/blog/how-to-create-a-confluence-page-from-a-jira-post-function

What we are hoping to do is take it a step further, by having the page be created based off of a global template from a value in a custom field. 

1. Custom Field Value = A on Jira Ticket Template A is used in Confluence to create the page

2.Custom Field Value = B on Jira Ticket Template B is used in Confluence to create the page

Any guidance is appreciated! 

Zach

 

1 answer

0 votes
Tessa Tuteleers
Community Champion
January 10, 2023

Hi @Zachary Singh , 

an older thread has a lot of information about creating pages from a template with a script, if you follow the steps there, and combine it with a simple if-else to account for your custom field, it could work. 

If you want an easier solution (less scripted), you could look into an app like Elements Copy & Sync, with that you can easily create pages from a post function, and base that page on another page (not an actual template, but you could create an actual page and hide them from the users), and fill out the information with macro's in confluence. 

That way of working can be found here. (disclosure, I do not work for Elements, but I use the app a lot.)

Hope this helps! 

- Tessa

Julie d_Antin _Elements_
Atlassian Partner
January 11, 2023

Thanks for the mention @Tessa Tuteleers 

@Zachary Singh If you decide to try Elements Copy & Sync and run into any problems, don't hesitate to contact our support team.

Suggest an answer

Log in or Sign up to answer