Hello. I'd like an automation rule to set up a new page in Confluence based on all the tickets set to a specific status that day.
So, I'd like a page created today that shows all the tickets that have been set to "Released to Production" today only. And then tomorrow I'd like a new page created, that shows all the tickets that have been set to "Released to Production" tomorrow only (so no inclusions of today's tickets).
I know how to create a new page in Confluence, but I'm stuck on how to configure it so it shows the tickets for the relevant day only.
Any help would be appreciated.
Hey @James Wardle !
You can use a Scheduled Trigger to run every day at say, 11:59PM, and then I would use the Lookup Issues action to search for issues matching something like this JQL:
project=YOURPROJECT and Status changed TO "Released to Production" ON {{now.convertToTimeZone("America/Los_Angeles").jiraDate}}
(You would want to use your time zone. More details on Jira smart values - date and time.)
You would then Create a Confluence Page with the issues that were found, using List functions to iterate through the {{lookupIssues}} smart value.
In it's most simple form this would give you linked issues and summaries:
Here's a list of issues released on {{now.convertToTimeZone("America/Los_Angeles").jiraDate}}
{{#lookupIssues}}
* {{key}} - {{summary}}
{{/}}
But there's a more elaborate example with a table here:
Please let me know if this works!
OOOOF, it looks like this only creates a page, but without content. I need to read up on the new Confluence automation feature to see if we can then figure out how to populate the content on the new page we just created.
Originally I was going to do this with an incoming webhook trigger in Confluence that would be called from a web request from Jira (which would be sent in automation format), but I was hoping to avoid that extra complication.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Humph. It looks like Automation doesn't currently support the adding/replacing the actual body of a Confluence page.
I found this add-on:
And this article that uses web requests from Jira to talk to the Confluence REST API directly for publishing page content:
I guess until Atlassian adds support for adding/editing Confluence the page body, those are your only options. Bummer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Darryl Lee - thanks so much for the effort you've put into this. I really appreciate it.
I'll have a look at the suggestions you've made and see if I can make it work for us.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hey there @James Wardle and @Darryl Lee
I saw this thread and wanted to jump in and give you a few pointers as I have recently helped a customer with a very similar request.
I wrote this article on how to use the 'send web request' action to create a page with content in it, this is specifically on using the lookup object condition to pull data from Jira insights into a confluence page.
However, my colleague and I also helped a customer create a page in confluence using a template and smart values to populate Jira fields into a table.
We took the storage format of a page already created in Confluence (in the format that we want) and then added the smart values into the fields as shown in the storage format.
Looking at your request @James Wardle I reckon the solution outlined in my article might help to create a page with a list of tickets that have been released.
I hope this helps and happy new year!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Elelta D - thanks for this! I'm stuck on the authorisation part though, what is needed after "Basic"? I get the following error when I run the rule.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey there @James Wardle
What you need is an encoded string of your_email and your_user_api_token and this is what you will put next to Basic, see below on how to to get your string.
Authorization: Basic <your_encoded_string>
To get your encoded string you do the following steps:
That should sort out your authentication issue :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Elelta D - thanks a lot for the help, I was able to configure what I needed.
When: Scheduled
Then: Lookup issues (search for issues using JQL)
If: Advanced compare condition (checks if {{lookupIssues.size}} is greater than 0)
Then: Send web request
In the Custom data field I have this:
{
"id": null,
"type": "page",
"title": "Release Notes {{now.convertToTimeZone("Europe/London").jiraDate}}",
"space": { "key": "TEST" },
"body":{"storage":{"value":
"||Key||Summary||Type||Created||Assignee||Reporter||\n{{#lookupIssues}}|{{Tier}}|{{key}}|{{summary}}|{{issuetype.name}}|{{created.jiraDate}}|{{assignee.displayName}}|{{reporter.displayName}}|\n{{/}}","representation":"wiki"}}
}
Works a treat!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
that is GREAT news. Glad to have been of help :-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey folks
Sorting through a similar issue. I have a page being created through an automation for jira webhook just fine, but im struggling to figure out how to include a label on the page that gets created.
Any idea how to accomplish that?
Thanks!
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.