-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
postAssignment() #1
Comments
Hi @sviriden - I will provide an example tomorrow morning |
Actually @sviriden I have a code sample I used in another project that I can post here... protected function createAssignment($userId, $projectId, $startDate, $endDate, $allocation)
{
$data = array(
'assignment' => array(
'allocation' => $allocation, // Harvest is in hours, forecast requires seconds.
'end_date' => $endDate,
'person_id' => (string) $userId,
'project_id' => (string) $projectId,
'repeated_assignment_set_id' => null,
'start_date' => $startDate,
),
);
echo "\nCreate assignment";
$response = $this->forecast->postAssignment($data);
$assignment = $response['assignment'];
return $assignment;
} |
I'll leave this issue open until we have documentation written that covers this |
Oh, that project that uses this is public, too - if you want some additional examples https://github.com/caxy/harvest-forecast-sync/blob/master/src/Service/SyncService.php |
Thanks a lot! Now everything works. |
Hi,
Do you have any code example how to get work
postAssignment()
method?What should I pass as
$data
parameter?The text was updated successfully, but these errors were encountered: