Technical Scenario
- Logic for the TimeTracking Import is pulled to ways:
- manually from CLI
- via CRON
- In both cases, the Application pulls a single point entry - app/Console/Commands/LogTime.php
- Application authenticates in Harvest using REST API V2
- Application fetches all Users with Development role (can be configured) - \App\Model\Harvest::getUsersIdsByRole()
- For each User-Developer Application fetches the Time Entries for the specific Date (it is a param for CLI. Default - previous day) - \App\Model\Harvest::getTimeLogs()
- To fetch the Time Entry the Application check that it has a note with IssueId
preg_match('/^[A-Z]{1,7}\-\d{1,5}/', trim($timeEntry['notes']), $matches);and hours field is not empty
- After building an array of Issues with time for the Users with Development Role, Application sends each entry to Jira Cloud
- If some Error occurred during a scenario that prevents all process to be executed, Application sends a Notification to Slack and logs the error
- example - [TimeLogExport] Failed export of TimeLogs for Date:22.01.2021
- If Application wasn't able to send some specific Time Entry to Jira, it sends a Notification to Slack and logs the error
- example - [TimeLogExport] Error during adding Worklog for issue IP-139. Time: 258 minutes
No comments to display
No comments to display