Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

To get the plain text of description field without HTML CSS style

Rajagopal January 5, 2017

I am trying to generate a table to list out the project tasks and fields as mentioned in the documentation.
(https://developer.atlassian.com/static/connect/docs/latest/tutorials/project-activity-tutorial.html).

 The following text is generated when i tried to get the task description field in my table: 

RQKEY-3Description {color:red}of{color} the *task*

(*above shows task key and its description) 

 

How do i get only the plain text of the task description field in table without getting the HTML tag and css like      "{color:red}"? (*even when style is applied i need to get only the text)

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
Volodymyr Krupach
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.
January 6, 2017

What you get for the description is not HTML or CSS but JIRA wiki syntax. AFAIK there is no option to get issue description as plain text through JIRA REST API. One thing that you can try is to actually get rendered HTML instead of wiki markup by adding ?expand=renderedFields to the issue rest call. This will bring you description in HTML format and you can strip it from the tags: http://stackoverflow.com/questions/822452/strip-html-from-text-javascript

TAGS
AUG Leaders

Atlassian Community Events