Hi,
Is there somebody who can tell me why this code is not working? I am trying to activate a daily workflow that fetches from all the projects the aggregated hours total. I wrote a script on my server to do that, but it looks like the delay in serving the results is triggering a null result in Ragic.
If i do a single project with a entry id (function test(id) then it works fine.
Any suggestions?
// filter jira list
var query = db.getAPIQuery("/project-management/1");
// fetch results
var results = query.getAPIResultList();
for (var i = 0; i < results.length; i++) {
var res = 0.00;
response.setMessage( results[i]);
var entry = results[i];
var field1 = entry.getFieldValue('1000071'); // project key
if(field1){
var res = util.getURL("http://someurl/ragic/jira/NC-jira.php?projectID="+field1);
response.setMessage(">> "+res);
entry.setFieldValue('1000150', res);
entry.save();
}
}
}