Skip to main content

TimeTracking Harvest to Jira Cloud

Technical stack:

  1. Laravel 5 (see parent page)
  2. Harves REST API V2 - https://help.getharvest.com/api-v2/
  3. Harvest API PHP Client (with support of V2) - https://github.com/wearerequired/harvest-api-php-client
  4. Jira Cloud API V3 - https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/
  5. Jira API PHP Client (with support of V3) -  https://github.com/lesstif/php-jira-rest-client
  6. Slack Webhooks - https://api.slack.com/messaging/webhooks

Supported scenarios:

  1. Transfer Time Logs for Specified Day from Harvest to Jira manually
  2. Transfer Time Logs for Previous Day from Harvest to Jira via Cron

Transfer Time Logs for Specified Day from Harvest to Jira manually

  1. SSH to the server with the app (dev server)
    1. see BW entry rackspace devnginx rocketweb ssh
  2. Navigate to TimeTracking App root folder 

    1. cd timetracking.rocketweb.com/
      
  3. Execute CLI command to import time logs to Jira for Specific day
    1. php artisan jira:logtime -d "2021-02-03"
  4. If you require the time logs for the Previous Day that were sent to Jira - execute the same command without options. As default value, it takes the previous day.

Transfer Time Logs for Previous Day from Harvest to Jira via Cron

  1. SSH to the server with the app (dev server)
    1. see BW entry rackspace devnginx rocketweb ssh
  2. Add to CRON next string - 

    1. * * * * * php /path/to/project/artisan schedule:run >> /dev/null 2>&1

  3. It makes all CRONS from TimeTracking App work.
  4. Time Logs import to Jira will be done each day at 4.39 Server Time
  5. To change this time:

    1. update app/Console/Kernel.php
    2. $schedule->command('jira:logtime')->dailyAt('04:39');