Unable to update the description field in Jira having existing multimedia in the field

Adithya Gaurav
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 28, 2024

Hello Community,

I’m currently working on a project where I need to update the description field of a Jira issue using an API. This is part of a synchronization tool I’m developing for Azure DevOps Work Items. However, I’ve encountered a problem when the description field contains an image that was added using the description text editor. When I attempt to update this description via the API, the image is removed from the issue and the description displays “Preview not available” in place of the image.

Here’s the process I’ve been following:

  1. I used the API to gather attachment details from both Jira and Azure DevOps, and then mapped the URLs of each according to their filenames. I used the jira api to get attachments from this link https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments/#api-rest-api-3-attachment-id-get
  2. I used the API to obtain the rendered body of the description from Azure DevOps.
  3. I replaced the Azure DevOps attachment URL with the corresponding Jira attachment URL using a Regular Expression.
  4. I updated the Jira issue using the Jira Issue Update API found from this link https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-put 

After completing these steps, I noticed that the image was missing from the description in Jira and the attachment was lost.

I’ve attached relevant screenshots for reference:

Before Updating the Description in Jira




After Updating the Description using API in JiraafterUpdateDesc.PNGafterUpdateAttach.PNG



I would greatly appreciate any solutions or suggestions for this issue.

Thank you in advance for your help.


1 answer

0 votes
motherg March 28, 2024

Can I ask why you're using ADO and Jira to track work items?

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events