Closed GoogleCodeExporter closed 9 years ago
[deleted comment]
If anyone else runs into this, the following seems to be a work-around:
List<Project> projectList = toggl.getProjects();
Map<Long, Project> projects = new HashMap<Long, Project>();
for(Project project : projectList) {
projects.put(project.getId(), project);
}
List<TimeEntry> entries = toggl.getTimeEntries();
for(TimeEntry e : entries) {
e.setProject(projects.get(e.getPid()));
System.out.println(e);
}
Original comment by fredr...@gmail.com
on 3 Sep 2013 at 8:09
Thanks for the bug report. There is not much we can do about this on our side,
the call to https://www.toggl.com/api/v8/time_entries only returns the wid
(workspace id) and pid (project id) for each entry and not the resolved
workspace and project (I think in v6 that was different). Hence when calling
getTimeEntries() pid/wid is set but project/workspace is null. To resolve the
project/workspace your workaround is the new way to go.
I'm closing this as "works as specified", ok?
Original comment by hisduden...@comerge.net
on 3 Oct 2013 at 8:40
Sure. I have worked around it.
Original comment by fredr...@gmail.com
on 3 Oct 2013 at 9:57
Original issue reported on code.google.com by
fredr...@gmail.com
on 3 Sep 2013 at 7:54