How to get checklist value via rest api

winter wong October 25, 2019

Now I am writing a Confluence plugin, it needs Jira issue data such as a custom field value which is a checklist. For now I can use Jira rest api /rest/api/latest/issue/(issueID) to get all the other data. but for the checklist it only shows all value without check status. 

"customfield_*":["US-English","Arabic","Arabic/English","B-Portuguese","Benelux","Bulgarian","Bulgarian/English","C&L Croatian"]

1 answer

1 accepted

0 votes
Answer accepted
Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 28, 2019

Hello @winter wong

Thank you for reaching out.

I understand that you have a Checkbox custom field configured in your Jira instance and you would like to return all the values flagged in this field for a specific Issue. Is it correct?

Could you please provide us which is the version of JIRA you are currently using?

Supposing you are using one of the latest version of JIRA (8.2 or above), the following REST API should return you the issue together with ONLY the flagged options of the custom field for that specific issue:

GET https://yourdomain.jira.com/rest/api/2/issue/{issueIdOrKey}

You can use the following documentation for reference, selecting the version of your JIRA Application:

GET issue REST API 

Let me know if it works for you.

winter wong October 28, 2019

Hello @Petter Gonçalves ,

thanks for your support, our Jira version is 7.6.3. I am using /rest/api/2/search?jql=type=Initiative&fields=customfield_id, from this I get all checklist value instead of only the flagged value or all value with check status. It just shows all the value even no value is flagged.

So the only way to get checklist flagged value is to upgrade our Jira to 8.2 and above, right?

Thanks.

Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 29, 2019

Hello, @winter wong

Thank you for your reply.

I have installed in my machine the JIRA application 7.6.3, however, running the same call as you did, I'm still getting only the selected options for my Checkbox custom field.

I see that you are using Initiative issue types, that are related to Portfolio app. Is it correct?

In order to troubleshoot your issue, can you please provide us a screenshot displaying the type of custom field configured for your task and check if the same problem occurs for JIRA default issues (Tasks, bugs, etc)?

winter wong October 29, 2019

Hello, @Petter Gonçalves ,

Thanks for your support.

The custom field is checklist not checkbox, I can get only the selected options about checkbox field. This is the type of the custom field.

20191030091122.png

we installed a plugin named checklist, maybe it is a bug of checklist?

Thanks.

Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 30, 2019

Hello @winter wong

Thank you for the clarification.

Indeed, I believe this is a specific behavior from the app you have installed. Can you please contact them with the issue you are having?

You can find their support channel in the Atlassian Marketplace on the app page.

winter wong October 30, 2019

Hello @Petter Gonçalves ,

Thanks for all your help.  

Thanks.

Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 31, 2019

You are welcome, @winter wong

Please, let us know the feedback from the plugin vendor about this.

winter wong November 4, 2019

Hi @Petter Gonçalves ,

they said that the REST API has been integrated since Version 4. Previous versions returns very basic information. Version 4 also has custom configurable Statuses, better workflow post-function, etc.

So upgrade the version to 4. or later, this issue would not exist.

Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 5, 2019

Thank you very much for letting us know this, @winter wong

Have a nice day! If there's anything else we can help with, please let us know. :)

Like Tural Aliyev likes this
Tural Aliyev April 8, 2020

Hi Petter,

Could you please check my question?

https://community.atlassian.com/t5/Jira-questions/Automation-of-Definition-of-Done-custom-field/qaq-p/1344685

I want with Jira Automation fulfill custom field.

Thank you in advance

Suggest an answer

Log in or Sign up to answer