Forums

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

How to get the values checked in a custom checkbox using JRJC

manas_shukla
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!
July 24, 2020

Hi All, 

I have created a custom check box field (name : fruits) in my issue and I need to get the values of the boxes that are checked. I am using JRJC to query and get the issue. 

I am able to retrieve the field using the API : 

i.getFieldByName("fruits");


However, when I try to get the value for the checked boxes by using the following API : 

i.getFieldByName("fruits").getValue()

I get the json containing the checkbox values like : 

[{"self":"https:\/\/play-jira.atlassian.net\/rest\/api\/2\/customFieldOption\/10020","value":"Apple","id":"10020"},{"self":"https:\/\/play-jira.atlassian.net\/rest\/api\/2\/customFieldOption\/10021","value":"Strawberry","id":"10021"}]

I am interested only in the the value of this json. Is there any way by which I can get only the values of the checked boxes ? 
 

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events