Skip to content

Instantly share code, notes, and snippets.

@herbdool
Created June 16, 2014 14:52
Show Gist options
  • Save herbdool/e2253c284422f205397f to your computer and use it in GitHub Desktop.
Save herbdool/e2253c284422f205397f to your computer and use it in GitHub Desktop.
Crappy time entry list
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta name="Name" content="App Example: Time Logs"/>
<title>Time logs</title>
<script type="text/javascript" src="/apps/1.26/sdk.js"></script>
<script type="text/javascript">
function timeLogs() {
var showTimeLogs = function(results) {
var time;
var aDiv = document.getElementById("aDiv");
aDiv.innerHTML += ' Project - Task - User<br/>';
for (var i=0 ; i < results.times.length ; i++) {
time = results.times[i];
console.log(time.TimeEntryValue);
user = time.User === null ? '' : time.User._refObjectName;
aDiv.innerHTML += time.ProjectDisplayString + ': ' + time.WorkProductDisplayString + ': ' + time.TaskDisplayString + ': ' + user + '<br>';
}
};
queryConfig = {
type : 'TimeEntryItem',
key : 'times',
query: '',
fetch: 'TaskDisplayString,ProjectDisplayString,WorkProductDisplayString,User'
};
var rallyDataSource;
rallyDataSource = new rally.sdk.data.RallyDataSource('18360738514',
'18360914286',
'false',
'true');
rallyDataSource.findAll(queryConfig, showTimeLogs);
}
rally.addOnLoad(timeLogs);
</script>
</head>
<body>
<div id="aDiv"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment