I am using JIRA REST service to return all issues based on a JQL, which works fine. However I am also using expand=renderedFields to retrieve a particular customfield_xxxx in HTML format however it is not converting into HTML format.
The REST CALL format:
https://domain.com/jira/rest/api/3/search?jql=project=[projectId]&expand=renderedFields
Any description field in my renderedFields always comes out in HTML format however not my customfield_xxx, even if I use the same exact editing.
Output I'm receiving:
"renderedFields": {
"customfield_xxxx": "Some text *bold word*",
"description": "<p>Some text <b>bold word</b></p>"
}
On top of everything, what makes it more weird is if in my REST CALL format I add maxResults=11 (or less) then it works fine. Therefore requiring me to loop and modify startAt variables to avoid the issue I'm currently facing.
Modified REST CALL format:
https://domain.com/jira/rest/api/3/search?jql=project=[projectId]&expand=renderedFields&maxResults=11
Modified Output:
"renderedFields": {
"customfield_xxxx": "<p>Some text <b>bold word</b></p>",
"description": "<p>Some text <b>bold word</b></p>"
}
Most issues with my JQL I am retrieving minimally retrieves at least 20+ issues, so if there is any way to retrieve my customfields_xxxx HTML format without having to manipulate and loop through the API results, I would greatly appreciate. Also an understand of why this occurs helps as well.
Hi @Liam De Gray Curmi ,
Welcome to the Atlassian Community.
The behavior you are reporting seems very similar to the one described in the below bug ticket:
Can you kindly verify whether or not the issue is present using the REST API endpoint version 2 (rest/api/2/search)?
This is because, as mentioned int the Jira Cloud platform REST API documentation page, v3 endpoints are still a beta version and under heavy development:
Note that version 3 of the Jira Cloud platform REST API is in beta. All the endpoints from the version 2 API are available. However, they are under development and may change.
Also, if the behavior is the same of the bug ticket please provide more details so that I can update the bug ticket description.
Cheers,
Dario
@Liam De Gray Curmi I am actually unable to reproduce the issue in my instance. I always get the custom field (multi-line text) returned as HTML in the 'renderedFields'.
Can you kindly provide more details on your scenario (type and number of custom fields, type of project, etc).
Thanks,
Dario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Dario B , thanks for replying.
I've double checked the API version both for 2 & 3 and I am still retrieving the same bug. If I don't set the maxResults = 11 or lower then the custom_field in full actual HTML format.
The customfield_10073 is the one I use.
Correction:
Bits of the HTML format does indeed render but these are \n<br/> as shown here:
However all the different styles of text, does not get rendered in HTML format.
The correct version I want to retrieve:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Liam De Gray Curmi ,
I can see that you have some formatted text in your custom field, while I have just used a multi-line text field that does not support any kind of rendered text.
The issue here might be that in some cases you get back just some wiki-markup instead of the HTML, however, I will need to further look into this before jumping to any conclusion.
Can you kindly let me know what kind of custom field you are using so that I can try to reproduce the issue again?
Cheers,
Dario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The custom field I am using is: customfield_10073
Cheers,
Liam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Liam De Gray Curmi ,
Please notice that customfield_10073 is just the name of the custom field in your Jira instance but this does not give any information on the type of field.
I need to know what kind of field you are using since I tried to reproduce the issue using a multi-line text field but that's for sure not the same kind of field since it only accept plain text with no formatting, while your field is having formatted text.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello all,
is it possible to know if a field is in wiki rendered format or text rendered format through rest API?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.