How to generate report in EazyBi based on how many time a due date has been changed in an issue type.
Say i have an issue type, defect and the defect would be set with a due date and a fix version. But the due date changes due to some dependency. In this case how can i list all the issues with the history of the due date change.
Currently, only able to get the current due date set, not the history of it.
There are two ways how to approach this depending on your platform:
Only for eazyBI for Jira Cloud
You can define a new Javascript calculated custom field that will return all the due dates of the Issue and then count the number of due dates in the report: JavaScript calculated custom fields
Thank you, If we add the javascript custom field then would it affect all the data and all the accounts?
What are the expected issues that might come up after this settings update?
Only for eazyBI for Jira Cloud:
If you add the code to the global Advanced settings, then there will be an additional custom field available for selection in all your accounts. Nothing will change in the accounts until you select to import this new custom field into all of them.
You can add a new calculated field that will be available only to this one account.
In this case, you can create the field with the following settings:
The JavaScript code adjusted for the new calculated field:
var previousDuedate = new Array();
if (issue.changelog && issue.changelog.histories) {
for (var i=0; i < issue.changelog.histories.length; i++){
var history = issue.changelog.histories[i];
for (var a=0; a < history.items.length; a++) {
var item = history.items[a];
if (item.field == "duedate" && item.from) {
previousDuedate.push(item.from);
}
}
}
}
if (previousDuedate) {
return previousDuedate.join(",");
}
Save the field, select it to be imported as a property, and start the import.
After the import finishes, a property “Issue Previous Due dates” should be available in the Measures dimension that will return the due dates for individual issues in the Rows section.
​Let me know if this fits your use case or if you have any additional questions on this!
​Best regards,
​Nauris
We are using version 6.6.0.
So, i was able to add a new calculated field as mentioned in the new calculated field technote.
Post import i get the new property and custom field
But when i user the property, in the measures it shows a blank column for all the issues even though few issues has changed the due dates multiple times.
HI There, I’m trying to use the provided code but when I add to the Jira Advanced settings screen, the code gets reformatted with red strikethrough. Suggestions?
Define a global calculated field. You’re already in the correct place to do it- Advnaced settings. However, you’ll need to add some more parameters to define the field:
[jira.customfield_prevdd]
name = "Previous Due dates"
data_type = "text"
javascript_code = '''
var previousDuedate = new Array();
if (issue.changelog && issue.changelog.histories) {
for (var i=0; i < issue.changelog.histories.length; i++){
var history = issue.changelog.histories[i];
for (var a=0; a < history.items.length; a++) {
var item = history.items[a];
if (item.field == "duedate" && item.from) {
previousDuedate.push(item.from);
}
}
}
}
if (previousDuedate) {
return previousDuedate.join(",");
}
'''
Let me know if this works as expected!
​Best regards,
​Nauris
HI There - Yes, I did get the code to work as a account-specific custom field. Thank you for the additional parameters to use the code as a global calculated fields. Regards, Ann
HI There,
So I tried to add the code to Advanced settings for a global calculated field which resulted in a 500 error. Our organization already had code in advanced settings for a custom hierarchy. Now the code for the custom hierarchy no longer works without the added code you’ve provided. Help Please
Regards, Ann