Creating a Measure from Checklists

Hi,

I need to calculate a Measure based on the number of Checklist items that have been ticked.

For our project configuration, the checklist is configured as customfield_10335, which is implemented as an array of structures. In order to import this, my first attempt was to request it through the REST API, which worked like a charme for a single JIRA issue, but I ran into frequent “429: rate limit exceeded” errors during import.

Digging further into available import options, I came across the parameter json_fields in the advanced configuration settings.

json_fields = [“customfield_10335” ]

After the first import, the customfield was showing up as part of the issue data. Unfortunately, it only provides an array of “name” members, instead of an array of structures, which would allow me to access the boolean type “checked” member.

Does anyone have an idea/experience, how I can solve this please?

Best regards
Christoph

Hi @christoph.rilke,

Please tell me if you are referring to the Checklist app - Checklist for Jira | Enterprise | Atlassian Marketplace
In that case, the solution of getting data via the REST API endpoint is the best one available for now.

Depending on the format of data retrieved for the issue, there might be some options for a custom JS script to process the array of entries into a useful dataset. Please contact the support directly over the e-mail with the JSON data of your issue to see the possibilities.

Regards,
Oskars / support@eazyBI.com

Hi @oskars.laganovskis ,

thanks for coming back to my inquiry!

I wasn’t aware that these checklists only work through an additional App.

Regarding the data retrieval, I had already tried using the REST API, but ran into access rate limitations. This is why I need to look for a different method.

Are you aware of any further configuration settings for the json_fields parameter, that would allow importing the required data from the customfield?

Best,
Christoph

Hi @christoph.rilke,

The checklist has both he status of item being checked and also the checklist value.
Seeing the JSON structure of the returned field is essential to build the proper JavaScript code to process the field.

Please contact support directly over e-mail with the JSON data of your issue to see the options for your case.
You might get the JSON data in the following way - open an issue in Jira. Modify the URL of the issue replacing browse with rest/api/latest/issue and then add ?expand=changelog at the end of the URL.

Regards,
Oskars / support@eazyBI.com

Hi @oskars.laganovskis ,

I extracted the relevant customfield’s JSON structure, which looks like this

“customfield_10335”:[
{“name”:“checklist item #1”,“checked”:false,“mandatory”:true,“id”:4,“rank”:0,“assigneeIds”:,“isHeader”:true,“status”:null},
{“name”:“checklist item #2”,“checked”:true,“mandatory”:true,“id”:5,“rank”:1,“assigneeIds”:,“isHeader”:false,“status”:null}
]

Can you please let me know, what are possible configuration options for the json_fields parameter, that would enable access to these members?

Best,
Christoph

Hi @christoph.rilke ,
the json_fields settings allow JavaScript code to use the customfields that are not imported into the data cube.
In this case, you need to create a JavaScript code that would use JSON.parse() function to convert the string data into a useful JSON object that could be later processed by JavaScript to calculate values.

regards,
Oskars / support@eazyBI.com