Question

I am new to the AtTask REST API. I have authenticated and searched successfully for time sheets in the system. When searching for time sheets, they all get returned but always with zero Total Hours (for all time sheets regardless of the fact that they have hours added to them and whether or not the tine sheets are approved).

I'm not sure how to proceed at this point. If anyone has run across this issue before, please let me know. If you are pulling down hours just fine, please let me know that too.

Thanks much,

-Curt

Était-ce utile?

La solution

The reason for this is that you must request that specific field. The url will actually be something like:

http://.attask-ondemand.com/attask/api/tshet/&fields=hours:*

The reason for this is because the "hours" column is actually a collection of hours entries. You must specifically request that field in order for it to be populated. You can also see more information by going to: http://developers.attask.com/api-docs/

Autres conseils

What is the actual call you a making to do your search?

https://outbox.attask-ondemand.com/attask/api/v4.0/timesheet/search?status=C&status_Mod=eq&fields=totalHours

Something to keep in mind is that a timesheet does not have hours until the first time it is opened and then saved by the user. This means all the future ones will not have hours. You mentioned that even closed ones aren't returning hours, so this is odd. I have confirmed that the above code works.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top