Pul Description data without json formatting that uses rich text

Colton.Kosicek
Contributor
April 17, 2024

Hey everyone 

 

I'm struggling to do simplex extracts on the jira description field consistently when my teams use any rich text information.

 

I found the basic help page for json extract on the description field but this immediately breaks when someone uses bolded letters as JSON splits on every rich text edit.

Hoping I can display full description regardless of text style and complete a character count. Looking for potentially poorly written epics, features, and user stories.

1 answer

0 votes
Skyler Ataide
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 19, 2024

Hey @Colton.Kosicek

 

It sounds like you have already referenced our knowledge base article, Extract values from a JSON string. Would it be possible for you to raise a ticket with our support team, and share the rich text JSON that you are looking to extract from one of your Jira issue descriptions. 

Skyler Ataide
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 24, 2024

Hi again @Colton.Kosicek

 

Are you able to try the following SQL mode query to see if this helps to remove any rich text formatting and only extract the text elements from your issue description field: 

SELECT 
issue.issue_key,
issue.description,
description:['content'][*]['content'][*]['text'] as description_text,
concat_ws(' ',flatten(array_except(from_json(description:['content'][*]['content'][*]['text'], 'array<array<string>>'), array(null))))as true_description
FROM `jira_issue` AS issue
ORDER BY `Issue`.`issue_id` ASC
LIMIT 10;

Let me know if the above SQL query helps, or if you are still otherwise experiencing trouble extracting the text from your description field! 

Like Hamid Pajouhandeh likes this
Colton.Kosicek
Contributor
December 5, 2024

i thought this was working until my teams started to use bullet points and now i cannot get appropriate counts - any new thoughts. Appreciate the help!

Hamid Pajouhandeh
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!
December 17, 2024

One issue I found is that once I toggle to Visual, the SQL query above is wiped out. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events