Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

I have developed a python script to integrate with Jira Cloud API & read the issues

Josu Jacob
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!
June 27, 2023

I am facing an issue with one of the custom fields within Jira. I am reading the response from the Jira and storing them into a new variable as follows:Jira_Issue_1.PNG

While parsing the customfield_10092 and customfield_10049 (description & release note resp.) am getting a dictionary as a response in python and when directly hitting the api from postman.

Jira_Issue_5.PNG
Jira_Issue_3.PNG

Also attaching the actual value for both the fields from Jira UI

Jira_Issue_4.PNG

Since the value type is paragraph each new line in the paragraph is a separate list.
Looking for a workaround to read the entire value as a whole.

"row['fields']['customfield_10049']['content'][0]['content'][0]['text']" ----> this only extracts the first paragraph of each issue.

1 answer

0 votes
Evgenii
Community Champion
June 27, 2023

Hi, @Josu Jacob 

What a weird field...  Haven't seen such bug. It's plugin custom field?

As for workaround - it will be weird too. Use concatenation in python. Concatenate dictionary values, and you will receive string, that you need. But you'll have to replace "hardbreak" in values with "\r\n"

Here you can see examples of concatenation:

https://www.geeksforgeeks.org/python-concatenate-dictionary-string-values/

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events