var minMaxResult = ReportingUtil.executeSelectSqlQuery("SELECT MIN(END_TIME_), MAX(END_TIME_) FROM ACT_HI_TASKINST where END_TIME_ is not null and month(END_TIME_) = " + (month + 1) + " and ASSIGNEE_ = '" + employee + "'");
var result = ReportingUtil.executeSelectSqlQuery("SELECT END_TIME_ FROM ACT_HI_TASKINST where END_TIME_ is not null and month(END_TIME_) = " + (month + 1) + " and ASSIGNEE_ = '" + employee + "'");
while (result.next()) { // process results one row at a time
var timestamp = result.getTimestamp(1);
var cal = Calendar.getInstance();
cal.setTime(timestamp);
var day = cal.get(Calendar.DAY_OF_MONTH);
var previousCount = counts[day];
counts[day] = counts[day] + 1;
}
var dataset = reportData.newDataset();
dataset.type = "lineChart";
dataset.description = "Daily productivity overview for " + employee;
var result = ReportingUtil.executeSelectSqlQuery("SELECT END_TIME_ FROM ACT_HI_TASKINST where END_TIME_ is not null and month(END_TIME_) = " + (month + 1) + " and ASSIGNEE_ = '" + employee + "'");
while (result.next()) { // process results one row at a time
var timestamp = result.getTimestamp(1);
var cal = Calendar.getInstance();
cal.setTime(timestamp);
var hour = cal.get(Calendar.HOUR_OF_DAY);
var previousCount = counts[hour];
counts[hour] = counts[hour] + 1;
}
var dataset = reportData.newDataset();
dataset.type = "lineChart";
dataset.description = "Hourly productivity overview for " + employee;