Scripts querying Toggl and applying certain custom rules on Praqma's workspace
Read more about the project seed provided by `stdlib` [here](stdlib.md)
The following functions can be invoked in a number of ways.
This function fetches all time entries for the day before and runs a check on them to see if they have a task and project properely assigned. The users who did not enter their time registration correctly will be mentioned the next morning in a Slack post in the timelogging channel. Later the day, an evening check will follow up to make sure people fixed thier registrations.
✔ No time entry without a Praqma client -> post to Slack
✔ No time entry without a task -> post to Slack
✖ No project without client -> notify project manager
## Getting started
### Getting a running project on your computer
1. Clone this repository
1. Install project dependenciec - inside the project run the command:
3. Duplicate the file `credentials.example.json` and fill in the credentials from a pinned post in the Slack channel called `#toggl-rules`
1. Rename the file to `credentials.json` to make it work
### Deploying the changes
This project is deployed to `StdLib.com`, a funcion as service platform becoming popular after Amazons's Lambda service.
First make sure you have the npm package `lib` installed globally
sudo npm install -g lib
#### Running the function locally
To test the `daily_checkup` function, run this command in your terminal in the root of your project:
If the execution was successful it will return the following message potentially with some logs on top
"message": "Message delivered to Slack channel."
#### Deploying for testing in the cloud
lib up dev
#### Releasing a production version
- First, up the version number in `package.json`
- Publish to stdlib with the command:
The roadmap for this project is simple:
> Make checks for what-ever internal time logging rules we have and we want to verify automatically
And yes, some of the things we check and automate is paid features in Toggl, but we have a pretty good business case in saved license costs by implementing them ourselves.
We have a few design changes we want to do later, that was not done in this first MVP November 2017:
* A general rule engine so we can easily describe time logging rules in a common language so the serve both and input to our automated verification but also as documentation in easy human readable format on how we log time in Praqma. See [`#33`](https://github.com/Praqma/toggl-rules/issues/33)
* Yes, there is currently not that much testing, and we discussed that logging might as well be a good thing to have first as this will reveal what fails in case we need to debug.