Forums

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

How do I access description on an issue where content type is paragraph and heading with JQL query?

Sina Sultani April 15, 2022

Hello! As my question asks I have been trying to access all the descriptions on a project where the content type is heading or paragraph through a JQL query but I just can't seem to formulate the JQL syntax correct. Has anybody got a pre-written query for this?

Basically I don't want the images in the issue descriptions, just all sorts of texts and writing.

 

I would be most grateful for your help! Thanks. 

1 answer

1 accepted

0 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 15, 2022

Hi @Sina Sultani 

What have you tried to do this?  Please provide your JQL to provide some context.

Given the current Description field markup, it seems you may find heading markup with:

project = myProjectName and description ~ "h1."

You would need to clauses for any of the levels you use, such as:

project = myProjectName and ( description ~ "h1." OR description ~ "h2." OR description ~ "h3." OR description ~ "h4." OR description ~ "h5." OR description ~ "h6." )

 

Kind regards,
Bill

Sina Sultani April 19, 2022

Hi Bill! I tried what you wrote, but unfortunately id didnt work. I'm still getting images in my descriptions. This is the query I wrote to get my response. I guess in some way I'm getting the syntax wrong, right? If you got any pointers I'll be glad to take them! 

 

InkedInkedJQL QUERY POSTMAN_LI.jpg

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 19, 2022

Thanks for clarifying.

Those images are stored as attachments, so the brute-force way to do this is to exclude anything with an attachment:

project = myProjectName and description ~ "h1." AND attachments IS EMPTY

That might include things you want (like non-image attachment issues), so instead once you have the list loaded you could the external tool/language to check the attachments list and remove any items that contain known image names, such as PNG. 

That just is not possible with JQL as the attachments field does not support the Contains ~ operator on the list.

Suggest an answer

Log in or Sign up to answer