{"id":15754822,"url":"https://github.com/gableroux/toggl-jira","last_synced_at":"2025-04-30T16:09:37.872Z","repository":{"id":145782624,"uuid":"75983030","full_name":"GabLeRoux/toggl-jira","owner":"GabLeRoux","description":"Download time entries from Toggl and use them to log time in Jira","archived":false,"fork":false,"pushed_at":"2021-11-22T14:18:02.000Z","size":37,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-30T16:09:13.411Z","etag":null,"topics":["jira","script","sync","toggl"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GabLeRoux.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-08T23:15:08.000Z","updated_at":"2023-01-23T13:42:04.000Z","dependencies_parsed_at":"2023-07-15T17:00:46.577Z","dependency_job_id":null,"html_url":"https://github.com/GabLeRoux/toggl-jira","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabLeRoux%2Ftoggl-jira","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabLeRoux%2Ftoggl-jira/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabLeRoux%2Ftoggl-jira/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabLeRoux%2Ftoggl-jira/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GabLeRoux","download_url":"https://codeload.github.com/GabLeRoux/toggl-jira/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251739652,"owners_count":21635892,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jira","script","sync","toggl"],"created_at":"2024-10-04T08:05:02.859Z","updated_at":"2025-04-30T16:09:37.816Z","avatar_url":"https://github.com/GabLeRoux.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# toggl-jira\n\nDownload time entries from Toggl and use them to log time in Jira\n\n## Features\n\n* multiple configurations for multiple jira\n* White list project keys for api calls (`PROJECTS` in config file comma separated)\n* Pass the right starting time from Toggl time entry to jira\n* Displays executed commands prior to running them\n* Hides password from the command line\n\n## Setup\n\n```bash\ngit clone git@github.com:gableroux/toggl-jira.git\ncd toggl-jira\ncp config/config.properties.dist config/config.properties\ncp config/.env.example .env.YOUR_CONFIG\ncp docker-compose.example.yml docker-compose.YOUR_CONFIG.yml\n```\n\n## Configure\n\n1. Change values in your `config/config.YOUR_CONFIG.properties`.\n2. Set credentials in `.env.YOUR_CONFIG`\n3. Update config path in `docker-compose.YOUR_CONFIG.yml`\n\n## General usage\n\nRun run.sh with a start and end date, like this:\n\n```bash\ndocker-compose -f docker-compose.yml -f docker-compose.tlm.yml run --rm php /app/run.sh ./run.sh 2015-09-29 2015-09-30\n```\nThis will use `config.properties` by default. You can also do the following:\n\n```bash\ndocker-compose -f docker-compose.yml -f docker-compose.tlm.yml run --rm php 2015-09-29 2015-09-30\n```\n*Running the above command will output something that looks like this:\n\n```\n==== BASH SCRIPT START ============================\n#!/bin/bash\n\necho 'KEY-123 2016-12-07T00:01:00.000-0600 0.50h;'\ncurl -u your_username:$(cat /home/your_user/.jira-pass) -X POST -H \"Content-Type: application/json\" \\\n--data '{\"started\":\"2016-12-07T00:01:00.000-0600\",\"timeSpent\":\"0.50h\",\"author\":{\"self\":\"https:\\/\\/some_client.atlassian.net\\/rest\\/api\\/2\\/user?username=your_username\"}}' \\\nhttps://some_client.atlassian.net/rest/api/2/issue/KEY-123/worklog\necho \"\"\necho \"\"\n==== BASH SCRIPT END ==============================\nScript saved to some_client_2016-12-03_2016-12-07_2016-12-08_17h41m.sh\nPress any key to submit the time to Jira (or Crtl+C to exit) ...\n```\n\nPress any key to submit the time to Jira. *todo: use a (Y/n) instead, it's safer* and use a `--no-input` parameter or something like that to auto accept.\n\nYou will then see something that looks like this:\n\n```\nKEY-456 2016-12-07T00:01:00.000-0600 2.25h;\n{\"self\":\"https://some_client.atlassian.net/rest/api/2/issue/19794/worklog/13715\",\"author\":{\"self\":\"https://some_client.atlassian.net/rest/api/2/user?username=your_username\",\"name\":\"your_username\",\"key\":\"your_username\",\"emailAddress\":\"you@your_email.com\",\"avatarUrls\":{\"48x48\":\"https://some_client.atlassian.net/secure/useravatar?ownerId=your_username\u0026avatarId=xxxxx\",\"24x24\":\"https://some_client.atlassian.net/secure/useravatar?size=small\u0026ownerId=your_username\u0026avatarId=xxxxx\",\"16x16\":\"https://some_client.atlassian.net/secure/useravatar?size=xsmall\u0026ownerId=your_username\u0026avatarId=xxxxx\",\"32x32\":\"https://some_client.atlassian.net/secure/useravatar?size=medium\u0026ownerId=your_username\u0026avatarId=xxxxx\"},\"displayName\":\"Your actual Name\",\"active\":true,\"timeZone\":\"America/Montreal\"},\"updateAuthor\":{\"self\":\"https://some_client.atlassian.net/rest/api/2/user?username=your_username\",\"name\":\"your_username\",\"key\":\"your_username\",\"emailAddress\":\"you@your_email.com\",\"avatarUrls\":{\"48x48\":\"https://some_client.atlassian.net/secure/useravatar?ownerId=your_username\u0026avatarId=xxxxx\",\"24x24\":\"https://some_client.atlassian.net/secure/useravatar?size=small\u0026ownerId=your_username\u0026avatarId=xxxxx\",\"16x16\":\"https://some_client.atlassian.net/secure/useravatar?size=xsmall\u0026ownerId=your_username\u0026avatarId=xxxxx\",\"32x32\":\"https://some_client.atlassian.net/secure/useravatar?size=medium\u0026ownerId=your_username\u0026avatarId=xxxxx\"},\"displayName\":\"Your actual Name\",\"active\":true,\"timeZone\":\"America/Montreal\"},\"created\":\"2016-12-08T14:29:30.204+0000\",\"updated\":\"2016-12-08T14:29:30.204+0000\",\"started\":\"2016-12-07T06:01:00.000+0000\",\"timeSpent\":\"2h 15m\",\"timeSpentSeconds\":8100,\"id\":\"13715\",\"issueId\":\"19794\"}\n\nKEY-123 2016-12-07T00:01:00.000-0600 0.50h;\n{\"errorMessages\":[\"Issue Does Not Exist\"],\"errors\":{}}\n\n[and on and on...]\n```\n\n## Notes\n\nOutput has changed a little, I prefer per line output instead of a big wall of json text on one line.\nkeeping log files with parameters and current time which is quite handy if something went wrong.\n\n### TODO\n\n* Maybe rewrite most of the things here into something a bit more cleaner? Thinking of typescript, making a node module or something like that.\n* Add client name to generated shell and log files\n\n# License\n\nMIT © [Matt Alexander](https://github.com/mattalexx)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgableroux%2Ftoggl-jira","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgableroux%2Ftoggl-jira","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgableroux%2Ftoggl-jira/lists"}