Copy attachment from issue to confluence page

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 vote
Alexey Matveev Community Champion Nov 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.

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"
]
]
]

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 30, 2018 in Marketplace Apps

Three tips for boosting your board's efficiency with Story Maps

Trello is one of the most effective tools for driving your sprints. It's customizable for every Agile team and product owners and Scrum masters (SM) love it. However, Agile teams often struggle with:...

849 views 2 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you