Handling Attachments in Description While Syncing Issues Between Source and Target Projects

I am currently working on syncing issues between a source project and a target project. During the issue creation process in the target project, I need to include attachments in the description.

The current process requires multiple API calls to achieve this:

  1. Create the issue - Initial API call to create the target issue.
  2. Add the attachments - Another API call to upload the attachments and retrieve their media-id.
  3. Update the issue - Final API call to update the description with the media-id of the uploaded attachments.

This approach requires multiple API calls, which increases complexity and latency.
Is there a way to simplify this process and handle attachments in the description in a single API call?

Ideally, I would like to create the issue with the description containing attachments directly, avoiding the need to separately upload attachments and then update the issue.

Any guidance or best practices for handling this scenario efficiently would be greatly appreciated!

Nope. The way you’re doing it is the way to do it :slight_smile:

If the two projects are in the same Jira Cloud instance, you need to ask yourself the bigger picture question… what problem are you trying to solve by essentially DUPLICATING the same data in two places? Which of Jira’s native capabilities could solve the problem more easily… like a board with a filter that encompasses the required issues in the two projects and ‘joins’ the two datasets from the user’s perspective.

Hi, there is a Atlassian App Elements Copy & Sync that also has a feature to synchronise attachments (locally and between remote instances if needed). It looks exactly like what you are trying to achieve. And it is simple to configure.
Here is the app documentation.
hope this will help you

The problem is I am trying to sync attachments between two different Jira Cloud instances.

Ahh, well, there’s nothing you can do in that case, except to keep on doing what you’re already doing.

Ok Thank you.