Forums

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

Script or JQL query for checkbox custom field values

Christos Moysiadis
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 31, 2019

Hello everyone,

The situation: I have a project with ~2500 issues , which use a checkbox custom field for customers and some issues have more than one checkbox checked. I want all the issues to be moved to the tempo account plugin, but the Account field accepts only one value. 

Is there any script or a JQL query which calculates which issues have more than one checkbox checked???

Thnx in advance

CM

1 answer

1 accepted

0 votes
Answer accepted
Tarun Sapra
Community Champion
January 31, 2019

Hello @Christos Moysiadis

With Script runner plugin it's pretty easy to find this out.

Just write a script in script console, the scrip executes JQL query for the issues in the project.

For each issue just check the value of the custom field (checkbox) , if the custom field has a value and the size of the returned value is more than one then it means more than one value is checked. The custom field(checkbox type) value will return ArrayList hence you can check the size if it's more than 1 or not.

Suggest an answer

Log in or Sign up to answer