I've setup a new Confluence Automation Rule which calls an API, and gets back a list of items.
I've got an 'Edit Page' action which is editing an existing page to append the results. The results are in a 'Smart values code snippet' as below:
{{#webResponse.body.issues}}
{{fields.duedate}} {{key}} {{fields.summary}} {{fields.status.name}}
{{/}}
This is working fine, with the results being appended to the page. However I'd like the results to be displayed as a table. I've not been able to work out how to do this.
Hi @Brian King -- Welcome to the Atlassian Community!
Please review this article from Atlassian describing how to use the Confluence page actions with a list of items to add a table:
The steps to create a table are specific and a bit hidden in the examples:
```
For the list iterator you show, that could be this:
| Due Date | Key | Summary | Status |
| --- | --- | --- | --- |
{{#webResponse.body.issues}}
| {{fields.duedate.jiraDate}} | {{key}} | {{fields.summary}} | {{fields.status.name}} |
{{/}}
Also, I recommend writing that expression to the audit log to confirm it contains what you expect. This will help with debugging any page updates.
Kind regards,
Bill
Thank you Bill, that formatting did the trick and its working as hoped.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This looks like Work Item data, which, you could use a Filter Results Widget on the confluence page to display. Instead of creating the displayed results, use your automation to flag the results in JIRA (perhaps with a label or dedicated checkbox). then all the basic tools (FIlter, Confluence widget) will do all the heavy lifting for you. In addition, your flag (or filter) can be used to drive other reporting or meeting discussions.
One other thing -- be sure you know how long you want the results included on your page.
I'm guessing by the time you've read this sentence you've already coded a workable solution :-). Hope this helps
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.