I have a groovy script in which I am dynamically creating subtasks based on some conditions. I want each of these subtasks to have a link to a confluence page automatically created, from a template(which I have already created). How do I do that? No other add-on than script runner is allowed. I have seen many such questions online, but none of them provide with a way to do it with scriptrunner and using a confluence template .
Has anyone found a REST or Scriptrunner solution for this yet?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So, it sounds like you need to do two things when the sub-task is created:
1) Create a new page from a template in Confluence
There does appear to be a REST endpoint in Confluence's API that lets you create an instance of a template with a POST request. You can call it using the app link configuration; see the documentation on interacting with other Atlassian apps.
If Confluence's current REST endpoint doesn't cut it, you could use ScriptRunner for Confluence to add a scripted REST Endpoint that you can call from JIRA.
2) Link the sub-task to the newly created Confluence page
You could simply embed a JIRA macro in the new Confluence page. Assuming JIRA and Confluence are linked, this should create a remote link in JIRA as well. See the docs on interacting with confluence from JIRA.
You could also create the remote link inside JIRA using the Java API for it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey sweet! That Template API is new!
Edit: Oh BOO it's Cloud-only for now.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Bummer! Just to clarify, do you have ScriptRunner for Confluence, or just ScriptRunner for JIRA? Because if you've got SR for confluence, I believe you can create a page from a template via the Java API using the CreatePageFromTemplateAction class... don't have an example handy, but I can cook one up if SR for Conf is an option for you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'd love to explain my use-case if you have some time, even just to share. If, of course, you talking to me?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Steven Behnke - sure, I'll talk. Though maybe you should open your own question with your particular details, so we don't distract from Shagufta's need?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shagufta
We launched a new app that allows you to create pages from templates through Jira Workflow post-function and store the Confluence page in a Jira customfield to apply more actions like:
Workflow postfuntions
Workflow conditions
And so much more.
Please give it a try, I believe it would streamline alot of repeated effort on your team
Jira Confluence Workflow Extensions (JCWE)
Give it a try I am confident you'll love it.
If you have any inquires or requests please drop me an email at admin@innovura.io
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I believe if Jenkins is being used via some integration Jenkins can be used to trigger a page from template.. I don't have the details to hand. Though know it's possible..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Confluence still hasn't exposed the Template feature to the REST API - This is probably why you don't see any documentation on this topic.
This leaves a few options –
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you please give an example of how the 3rd option can be done?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.