Hello All,
I am using jira cloud and scriptrunner for jira cloud and I want to copy the jira issue attachment add that attachment to the confluence page on the post function.
I am able to get the issues attachment and also able to create the new page on the confluence.
But Im not able to add that attachment to the confluence.
How can I do that?
Thanks ,
Chinmay
Hi,
I'm with Elements, and we just released a new app Elements Publish to Confluence that might meet your needs. The app allows you to create pages from Jira with issue data.
If you want to learn more, check out this article that explains how to create Confluence pages linked to Jira issues with the app.
Let me know if you have any questions!
Julie :)
Hi @Julie d_Antin _Elements_ ,
Thanks for your reply. As per your suggestion, I took a trail version of Elements Publish to Confluence plugin and tested a lot to copy attachments from current issue to confluence. It is creating a page in confluence on workflow post function with all mentioned data EXCEPT attachments.
I checked that I have enabled attachment option in the content module.
If you solved this, nothing like it for me.
Looking for your response.
Regards,
Chinmay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can add attachment to a confluence page by sending a POST request to the /rest/api/content/<pageID>/child/attachment API method.
Example Curl Command -
curl -u $USER_NAME:$USER_PASSWORD -X POST -H "X-Atlassian-Token: nocheck" -F "file=@${ATTACHMENT_FILE_NAME}" -F "comment=File attached via REST API" ${CONFLUENCE_BASE_URL}/rest/api/content/${PAGE_ID}/child/attachment
Please change USER_NAME/USER_PASSWORD/ATTACHMENT_FILE_NAME/CONFLUENCE_BASE_URL/PAGE_ID as necessary in the above command.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Kishan Sharma ,
Thanks for the reply.
I am using scritrunner for jira cloud so that I want groovy script to add attachment. curl code will not work in this case.
Can you please suggest any other groovy script to run using scriptrunner ?
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.