Copy attachment from issue to confluence page

Peter Gruber November 22, 2017

Hello,

I wanted to know if it's possible to copy an attachment from an issue to a confluence page. Somebody got an idea for that?

Thanks in advance.

 

1 answer

1 accepted

0 votes
Answer accepted
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 22, 2017

Hello,

It is possible. You could write a post function or service in Jira which would take an attachement from Jira and uploaded it to confluence using REST API.

Peter Gruber November 22, 2017

Hello,

Ok thank you.

Would you be so kind to tell me how?

Do I only need to define the right params, or is it more complicated?

def params = [
type: "page",
title: pageTitle,
space: [
key: "TEST" // set the space key - or calculate it from the project or something
],
// if you want to specify create the page under another, do it like this:
// ancestors: [
// [
// type: "page",
// id: "14123220",
// ]
// ],
body: [
storage: [
value: pageBody,
representation: "storage"
]
]
]
Vamshee Rangu May 20, 2019

Do you have any code snippet I can use? to copy attachments from JIRA to Confluence?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events