clockify / browser-extension

Clockify Browser Extension
https://clockify.me/chrome-time-tracking
BSD 3-Clause "New" or "Revised" License
185 stars 172 forks source link

Automatic assignment to tasks #80

Closed dpoetzsch closed 4 years ago

dpoetzsch commented 4 years ago

Hi,

in our company we have an extensive use of gitlab issues. For our customers, we need to be able to easily calculate the number of hours spent on each issue.

Thus, we thought it would be best, if each issue in a project A matches a clockify task ind project A.

For now, the clockify browser plugin already matches the projects. We extended it, so that time is always tracked on a matching task.

Maybe this is something the community is interested in as well, so we created this PR to share it. If this does not find the way into master it is fine as well, we'd just use our own fork then.

PS: Thanks for creating such awesome software btw, it was really fun to extend.

PPS: We even did some more extensions (tag transfer from gitlab, billable settings), if this would be something you're interested in I'm happy to create another PR or extend this one.

aleksandar-olic commented 4 years ago

Hi David,

Wow, this is great! Thanks for the PR, we'd love to add it.

I've tested it a bit and there are a couple of issues that need to be fixed before we can merge:

Hope this helps. Again, thanks for the PR, it's awesome!

dpoetzsch commented 4 years ago

Thanks for the extensive review.

I fixed both bugs and added the nice-to-have features project creation and tags. The tags are implemented for gitlab only, the project creation is enabled for all integrations that set a project name.

I also added a setting to enable/disable creation of projects/tasks/tags. So far this is only a single setting for all of them, as I thought it's probably better to not make this too complicated. This could obviously be changed.

However, I was not able to test the updated settings page, as it does not render in dev mode in chrome (also not in firefox as it seems). I did test the setting by manually changing the local storage, which works fine.

aleksandar-olic commented 4 years ago

Awesome! I've tried to add the new code to my local version and for some reason the Settings page is blank. I've tried to compile from your repo but got the same issue. I've also tried in another version, and there it can open the Settings and I see the option, but the Start button won't work (neither in Gitlab nor in other apps, like Asana or Trello). That's really strange.

Let me know if you manage to find what could be the issue. In the meantime, I'll invite someone from my team to take a look.

aleksandar-olic commented 4 years ago

There was an issue with Settings page, but we've fixed it and merged it. Everything seems to work fine (yay!), except the createSmallButton. All timers for integrations that use the small button can't be started at all.

dpoetzsch commented 4 years ago

Oh that might be my bad, :-/

I'll open a PR to fix that