We use Checklist for Jira (DataCenter) and I was hoping to display checked AC’s through EazyBI. We’re using EazyBI version 8.0.2.
Initially I created a JavaScript Calculated custom field to fetch the data. The script used
GetDocument(“/rest/api/katest/issue/“ + “issue_key +”?fields=customfield_17xxx”). That is the ID of the AcceptanceCriteria custom field.
This led to an HTTP 429 error because it was making a separate call for each issue.
I attempted to use the field using field_options without JavaScript, but the Acceptance Criteria does not return as checked or unchecked.
Is there a recommended method to get the acceptance criteria into EazyBI with the additional information of whether it is checked (completed) or not?
Hi @janedoe2
Thank you for posting your question!
The HTTP 429 error you’re encountering is due to rate limiting in Jira when making multiple REST API calls using the getDocument()
function. This is a common issue when importing checklist data, as each issue requires a separate API call to retrieve the checklist details.
Here are some options you may try:
If you have multiple JavaScript calculated fields that each use getDocument()
for the same checklist field, you can consolidate them into a single field to reduce API calls. For example, replacing parts a custom field ID with the correct ID of your field:
[jira.customfield_chlnames]
name = "Checked AC item list"
data_type = "text"
javascript_code = '''
if( issue.fields. customfield_17xxx){
var result =
getDocument("/rest/api/latest/issue/" + issue.key +"?fields= customfield_17xxx");
var resultArray = [];
if (result){
for(x of result.fields. customfield_17xxx){ //generate value list
if(x.checked)
{
resultArray.push(x.name)
}
}
issue.fields.customfield_chlnames = resultArray.join(",");
var counter = 0;
for(x of result.fields. customfield_17xxx){ //count checked items
if(x.checked)
{
counter++;
}
}
if(counter>0) {
issue.fields.customfield_chlcheckedcount = counter;
}
}
}
'''
#counts only checked items and imports as measure
[jira.customfield_chlcheckedcount]
name = "Checked AC item count"
data_type = "integer"
measure = true
As a last resort, you can ask your Jira administrator to adjust the rate limiting settings in Jira System settings → Rate limit configuration
You may check more on this topic here: https://developer.atlassian.com/cloud/jira/platform/rate-limiting/ and ask your Jira admin if the error could be avoided with Rate limit configuration on the Jira side (System settings->Rate limit):
Best wishes,
Elita from support@eazybi.com
Thank you. I tried this, and I received an error message:
“Cannot import ‘text/data/datetime’ type custom field ‘customfield_check_ac’ as dimension.
When I changed the data type to string, I can see that the Dimension checkbox is not checked. I also tried making it an integer and it returned the same error
@Elita.Kalane - Any update here?