Within the 'Create page in Confluence' action, I see no field to set the contents.
Must this all be done via a template?
If so how would I go about setting up a template that would set its content's to be equal to a Jira ticket's custom field contents?
Hi @Ben Greene
At this time, the content must be set via a template. This restricts how much information can be inserted into the page at creation.
If you are wanting to have more configurable options of content, there are other approaches using web requests to create content in Confluence.
Have a look at this community post, hopefully it can help you build the rule are wanting
Cheers
Sam
Hi @Sam Harding
Thanks for the reply.
I essentially want to copy the contents of a select few Jira Custom Fields as the contents for the Confluence page I would create.
Is that something that Templates can achieve, or would I need to use a web request?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Sam Harding I went with the linked post, but am getting this 500 Internal Server Error when attempting to validate my web request.
The full payload message:
{
"statusCode": 500,
"message": "org.codehaus.jackson.JsonParseException: Unexpected character ('H' (code 72)): was expecting comma to separate OBJECT entries\n at [Source: com.atlassian.plugins.rest.common.limitrequest.jersey.LimitingRequestFilter$1@794c9cbb; line: 3, column: 18]"
}
Also my Custom Data in case that helps:
{
"type":"page",
"title":"{{issue.Issue Title (Short description + Error text)}}",
"space":{"key":"DOC"},
"body":{
"storage":{
"value":"{{issue.Issue Reason + Screenshot(s)}} {{issue.Issue Solution + Screenshot(s)}}"}
}
}
I'd appreciate if you could help me spot what I might need to change to get this working 🙏
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Sam Harding this issue is a decently big blocker for us, would you be able to loop in someone who can help with this if you are not able to?
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.
Hi @Ben Greene
Apologies for the delayed response. To answer your questions:
Is that something that Templates can achieve, or would I need to use a web request?
This is something you would need to use a web request for, as you are doing.
am getting this 500 Internal Server Error
It would appear that the JSON data being sent to the API is considered invalid JSON (despite what you have pasted being valid). I suspect this is due to the values being injected by the smart values. Can you print out what this smart value is in the audit log
"title":"{{issue.Issue Title (Short description + Error text)}}"
If I am reading the error correctly, I would suspect the title contains text with a quote character followed by an H like so
"H...."
When smart values prints it out, it will cause the json block to incorrectly formatted. You can try to fix that by using `asJsonString` on your smart value, like so:
{{issue.Issue Title (Short description + Error text).asJsonString}}
Hope that helps,
Sam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the reply @Sam Harding , sadly it still seems to break.
Result from logging that value prior to adding .asJsonString:
Result from logging that value after adding .asJsonString:
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.