Hi,
I trying to see the changes in each date that updated the date custom field “Estimate end date”.
Actually for the defined custom field, only appears the updated last value for all dates. But using the “Hours Spent” Measure show the hours saved for each day.
I tried to obtain the resoult throug this measure:
But for do that is necessary import the custom field like a dimension as a string. If I doing this, is impossible use for calculations or obtain timeline views.
Have you any suggestion to obtain the date custom field change history (keeping the format)?
Date-picker custom fields can not be imported as dimensions in eazyBI.
eazyBI does not allow importing another dimension with date type since there is already one “Time” dimension by default.
A workaround would be using a pre-calculated field (using Javascript in advanced settings) that returns the string output for every issue with all the dates and new timestamp when it was changed (see attachment with table report)
Then using MDX calculated measure this timestamp is converted to Date (see all attached images) and shown for each time period
And then the following code for MDX calculated measure “Estimated end history” (with Month Day Year format) when the pre-calculated field is selected via import options and imported as measures
TimestampToDate(NonZero(Sum(
{PreviousPeriods([Time].CurrentHierarchyMember), [Time].CurrentHierarchyMember},
[Measures].[Estimated end timestamp changes]
)))
I cannot get this code to work. I am striving to create a report that shows Epic due date change history, to include the previous value and the date of the change. I’m trying to use the guidance above, but no luck. Is there an example report I could look at?
When I use the code above, the value in the custom field shows as:
2022-05-26,1672358400
But the history of the field is:
blank - > 09/21/22 on 7/18/22
09/21/22 → 12/30/22 on 9/22/22
Current due date value = 12/30/22
Please advise!
Code used to create the custom field is as follows:
[jira.customfield_ddc]
name = “due date changes”
data_type = “decimal”
measure = true
multiple_dates = true
javascript_code = ‘’’
dateChangeStrings = [];
whenDateChanged = issue.fields.created; //.toString().substr(0,10);
newDateChange = null;
duedateAsTimeChangeStamp = null;
issue.changelog.histories.forEach(function(history){
history.items.forEach(function(historyItem){
if (historyItem.field == “Due Date” ) {
newDateChange = historyItem.from;
if(newDateChange){
duedateAsTimeChangeStamp = Date.parse(newDateChange);
dateChangeStrings.push(whenDateChanged.toString().substr(0,10) + “,” + duedateAsTimeChangeStamp/1000);
dateChangeStrings.push(history.created.toString().substr(0,10) + “,” + -duedateAsTimeChangeStamp/1000);
}
whenDateChanged = history.created;
}
});
});
if (issue.fields.duedate) {
dateChangeStrings.push(whenDateChanged.toString().substr(0,10) + “,” +
Date.parse(issue.fields.duedate)/1000) ;
}
issue.fields.customfield_ddc = dateChangeStrings.join(“\n”);
‘’’