- You can log time on a combination of a company, a project, or a subproject with a task if any (mandatory), or on an absence.
-
You can only log hours on the leaves of the following hierarchical structure:
-
company
-
project
- subproject
-
project
-
company
API
Time
Beebole legacy API — Time operations.
This section deals with the management of timesheet entries.
We will call “entity” a company, project, subproject, task, or absence.
In order to log hours on an entity you should follow those simple rules:
without tasks:
if a company has only projects:
if the company doesn’t have any projects:
if you log hours on an absence (tasks don’t matter in this case):
In summary, you get the entity ids and hierarchy with the service get_entities, you get the tasks associated, if any, using the get_tasks service, and you create or update a time entry following the rules mentioned.
In the case of trying to log hours on inappropriate entities, you will receive an error message.
Response:
We want to log hours on the “Dev” project, which has subprojects. So, again, we call time_entry.get_entities but this time mentioning the project id (think of expanding a tree branch):
Request:
Response:
We pick the “Analyse” subproject and, in order to know if any task is available for this entity, we use the following service with the subproject id:
Response:
We have now collected all the necessary information in order to fill in the create/update service request.
Response:
Response:
Response:
Response:
Response:
Response:
Response:
Response:
Response:
Response: