timebot

:robot: Timebot is a Slack bot for helping with everyday timesheet

23
5
Ruby

Slack Time-Tracking Bot

Timebot is a time-tracking system allowing to enter the number of hours spent on a particular project and monitor a development workflow as a whole. The information will reflect in each member’s timesheet, which can be later viewed and edited.

Сore Functionality

1. Time tracking

OR

2. Absences

3. Reports

4. Projects

All available commands

Commands Description
help print help.
projects print all available projects projects.
find project SEARCH_QUERY find specific project.
PROJECT_NAME HOURS:MINUTES COMMENT log time.
/logtime log time via interective dialog.
edit NEW_DATE(OPTIONAL) TIME_ENTRY_ID HOURS:MINUTES COMMENT edit an existing time entry.
update(OPTIONAL) DAY.MONTH.YEAR PROJECT_NAME HOURS:MINUTES COMMENT create an entry for the specific date.
add project PROJECT_NAME add new project.
show day/show week/show month get report for this day/week/month.
show absence/show absence last year display absences.
set REASON DAY.MONTH.YEAR(OPTIONAL) - DAY.MONTH.YEAR(OPTIONAL) COMMENT(OPTIONAL) if you were/will be absent on some days.

API Documentation

The application also provides comprehensive API documentation for integrating client applications. Full docs can be found here

How to install for your team?

Requirements

  • rails 5.0
  • ruby 2.3.3
  • PostgresQL

Getting started

Step 1: Clone the app

 git clone [email protected]:codica2/timebot.git
 cd timebot

Step 2 Add environment variables to .env (create file if don’t exist)

 SECRET_KEY_BASE=`secret_key_base`
 SLACK_TOKEN=`slack_token`
 TIMEBOT_APP_TOKEN=`slack_timebot_app_token`
 TRELLO_MEMBER_TOKEN=`member_token`
  1. How to get secret_key_base
  2. How to get slack_token
  3. How to get slack_timebot_app_token
  4. How to get member_token

Step 3: Add config files:

 mv config/database.yml.example config/database.yml

Step 4: Install the app’s dependencies:

 bundle install && bundle exec rake db:create && bundle exec rake db:migrate

Integrations


Building Slack App

1 Go to Slack API

2 Click Start Building button

3 In the dialog that opens, select the name of your application and the workspace in which your application should work.

4 After successful creation:

  • Go to the slash command tab
  • Press Add new command button
  • Fill Command field with /logtime
  • Fill Request URL with https://your_domain_name.com/api/v1/slack/command
  • Press save

5 Go to Interactive Components tab

  • Fill Request URL field with https://your_domain_name.com/api/v1/slack/submission
  • Press save

6 Add Bot user on Bot users tab

7 Got to OAuth & Permissions tab

  • Press Install App to Workspace button
  • Copy Bot User OAuth Access Token and paste to .env slack_timebot_app_token=

Adding Slack Bot integration

1 Choose your workspace

2 Add configuration

3 Choose a name for your slack bot

4 Get your slack_token

Trello integration

Hot to get trello token read here

Secret key base

Just run rake secret

License

Timebot is Copyright © 2015-2019 Codica. It is released under the MIT License.

About Codica

Codica logo

Timebot is maintained and funded by Codica. The names and logos for Codica are trademarks of Codica.

We love open source software! See our other projects or hire us to design, develop, and grow your product.