-
Suggestion
-
Resolution: Unresolved
Issue Summary
When you create the Confluence page in the Jira automation action Create page in Confluence it sets the owner of the page as the person who established the link between Jira and Confluence products instead is using the Actor of the Automation rule.
Steps to Reproduce
- Create Automation with Manual trigger.
- <Action> Create page in Confluence
Expected Results
Ability to set the owner of the page as an Actor in Jira automation or we should be able to use smart value to add a user ( maybe initiator )
Actual Results
The owner of the page is set to the user who was used to setup Jira - Confluence connection.
The below exception is thrown in the xxxxxxx.log file:
...
Workaround
Workaround is sent the web request after the page creation to change the owner of the page in the JSON payload of the REST API to update the page. ownerid property can be used to set the owner
Example:
Confluence REST API : /wiki/api/v2/pages/<page-id>
{ "id": "{{pageID}}", "status": "current", "title": "{{issue.summary}} {{issue.key}}", "ownerId" : "{{initiator}}", "body": { "storage": { "representation": "storage", "value": "{{webResponse.body.body.storage.value}}<p><strong>Description:</strong>{{issue.description.replace("\n", "<br/>")}}<br/></p>"} }, "version": { "number": "{{#=}}{{webResponse.body.version.number}} + 1{{/}}" } }
Refer