You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.