Skip to content

Commit b6f7137

Browse files
committed
[ISSUE-1] Add readme
Signed-off-by: Jacek Ciwiś <jacek.ciwis@gmail.com>
1 parent 2a0e7be commit b6f7137

File tree

1 file changed

+106
-0
lines changed

1 file changed

+106
-0
lines changed

README.md

+106
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# toggle-to-jira
2+
3+
### What is toggle-to-jira?
4+
Toggl-to-jira is an application which allows you to migrate toggle time entries into multiple jira instances.
5+
6+
### How it works?
7+
Toggl-to-jira takes toggle time entries from the given time period and it creates workloads in related jira issues. To work properly each toogle timeentry has to be assigned to the client. Base on this assignment and app configuration, application recognize in which jira instance should create workloads.
8+
9+
### Installation
10+
11+
MacOS Homebrew:
12+
```
13+
brew install kruc/homebrew-tap/toggl-to-jira
14+
```
15+
16+
Linux
17+
```
18+
wget -qO- https://github.com/kruc/toggl-to-jira/releases/download/v0.7.1/toggl-to-jira_0.7.1_Linux_x86_64.tar.gz | tar -xvz -C /usr/local/bin && chmod +x /usr/local/bin/toggl-to-jira
19+
```
20+
21+
### Requirements
22+
1. Toggl time entries naming convention
23+
```
24+
[JIRA-ISSUE-ID] [WORKLOAD DESCRIPTION]
25+
e.g. ISSUE-123 Description of what has been done
26+
27+
https://jira.atlassian.net/browse/ISSUE-123
28+
```
29+
[JIRA-ISSUE-ID] - issue matching
30+
31+
[WORKLOAD DESCRIPTION] - jira workload description
32+
2. Assign client to every time entry you want to migrate
33+
34+
jira instance matching is based on client
35+
36+
### First run
37+
1. Run toggl-to-jira without parameters
38+
```
39+
toggl-to-jira
40+
```
41+
it will generate configuration at `$HOME/.toggl-to-jira/config.yaml`
42+
```
43+
default_client:
44+
jira_client_user: firstname.lastname
45+
jira_host: https://jira.atlassian.net
46+
jira_password: (visit https://id.atlassian.com/manage/api-tokens)
47+
jira_username: firstname.lastname@domain.com
48+
stachursky_mode: 1
49+
jira_migration_failed_tag: jira-migration-failed
50+
jira_migration_skip_tag: jira-migration-skip
51+
jira_migration_success_tag: logged
52+
log_format: text
53+
log_output: stdout
54+
period: 1
55+
toggl_token: (visit https://www.toggl.com/app/profile)
56+
```
57+
2. Adjust following keys
58+
- default_client.jira_client_user
59+
- default_client.jira_host
60+
- default_client.jira_password
61+
- default_client.jira_username
62+
- toggl_token
63+
64+
3. Run again to check what time entries will be considered
65+
```
66+
toggl-to-jira
67+
68+
INFO[0000] Checking configuration...
69+
INFO[0000] Customize configuration in file: /Users/jacekciwis/.toggl-to-jira/config.yaml
70+
INFO[0000] Start processing 1478671803: ISSUE-123 Work description
71+
51m32s - toggl value
72+
52m0s - stachursky mode (m)
73+
74+
Workload details:
75+
Time spent: 50m0s
76+
Comment: ISSUE-123 Work description
77+
Issue url: https://jira.atlassian.net/browse/ISSUE-123
78+
```
79+
4. Configuration for missing clients will be autogenerated
80+
```
81+
client:
82+
client_foo:
83+
enabled: true
84+
jira_host: https://foo.atlassian.net
85+
client_bar:
86+
enabled: true
87+
centraleyes:
88+
```
89+
You can overwrite default_client configuration here
90+
91+
5. If everything is correct, run with the `--apply` flag
92+
```
93+
toggl-to-jira --apply
94+
```
95+
```
96+
INFO[0000] Checking configuration...
97+
INFO[0000] Customize configuration in file: $HOME/.toggl-to-jira/config.yaml
98+
INFO[0000] Start processing 1478671803: ISSUE-123 Work description
99+
INFO[0001] Jira workload added
100+
INFO[0001] Add logged tag
101+
INFO[0001] Issue url: https://jira.atlassian.net/browse/ISSUE-123
102+
INFO[0002] Finish processing 1478671803: ISSUE-123 Work description
103+
```
104+
6. After migration success toggle time entry will be tag with `jira_migration_success_tag` configuration key value (default: `logged`) - this tag causes skip on next migration
105+
7. If you want to skip some time entry migration, tag it with `jira_migration_skip_tag` configuration key value (default: `jira-migration-skip`)
106+
8. After migration fail toggle time entry will be tag with `jira_migration_failed_tag` configuration key value (default: `jira-migration-failed`) - this tag will be remove after migration success

0 commit comments

Comments
 (0)