OpenProject integration for Mattermost. Currently, supports following operations using a slash command -
- Create time entry for a work package
- Create work package for a project
- Delete work package
- View time logs
- Delete time log
- Subscribe to OpenProject notifications in Mattermost channel
recorded using Peek.
- OpenProject community edition
- Mattermost preview
- docker
- Node js and npm modules
- Docker
- Download and install instructions
- OpenProject
- Quick install
docker run -it -p 8080:80 -e SECRET_KEY_BASE=secret openproject/community:11or
- Recommended install
sudo mkdir -p /var/lib/openproject/{pgdata, static}docker run -d -p 8080:80 --name openproject -e SECRET_KEY_BASE=secret -v /var/lib/openproject/pgdata:/var/openproject/pgdata -v /var/lib/openproject/static:/var/openproject/assets openproject/community:11docker stop openprojectdocker start openproject
- For up to date info on OpenProject installation refer their official docs.
- Quick install
- Mattermost
docker run --name mattermost-preview -d --publish 8065:8065 --add-host host.docker.internal:host-gateway mattermost/mattermost-preview
- Node js
- Download and install
- Run
npm installto install npm dependencies
You can install and run the project using the provided install.sh script. This script handles configuration and starts the Docker containers.
./install.shThis will start the services with default settings. You will need to update the .env file with your tokens later.
You can pass configuration directly to the script:
./install.sh \
--mm-slash-token "YOUR_SLASH_TOKEN" \
--mm-bot-token "YOUR_BOT_TOKEN" \
--op-token "YOUR_OP_TOKEN"Or use environment variables:
MATTERMOST_SLASH_TOKEN="token" ./install.shSee ./install.sh --help for all options.
- Fork and
git clonethe repo using HTTPS - Install and launch all the dependencies as mentioned above and open the cloned directory in an editor or IDE of your choice
- Run
sh configure.shto create.envusing bash command line. Alternatively, create a.envfile using a text editor with the following entries:OP_URL=http://<your host or ip address>:8080/api/v3/(needed for pointing to OpenProject installation)INT_URL=http://<your host or ip address>:3000/(needed for exposing the integration running on port 3000)MM_URL=http://<your host or ip address>:8065/api/v4/(needed for pointing to Mattermost installation)LOGO_URL=http://<your host or ip address>:8065/api/v4/(needed for getting OpenProject logo in Mattermost)MATTERMOST_SLASH_TOKEN=<use the mattermost slash command token for logtime>- To obtain this token create a custom Mattermost slash command
/opas described here and provide localhost or IP address (with port 3000) as the request URL and method asPOST
- To obtain this token create a custom Mattermost slash command
MATTERMOST_BOT_TOKEN=<use the mattermost bot access token>(needed for validation for posting messages as bot)- To obtain this token create a bot account with System Admin access as described here
OP_ACCESS_TOKEN=<openproject access token (a.k.a apikey) obtained from user account page>
- In the project root directory do
npm initto generate (or update existing)package.jsonfile - Then run
npm installto download and install the node modules from npm - Run op-mattermost in the console using
npm start(usually launches on port 3000) - In OpenProject, create a custom field
billable hoursfor all work packages in a project - Test the integration by trying
/opin the message bar. - In case of error while invoking
/opcommand:- Check the Developer console for errors
- If the error is related
AllowedUntrustedInternalConnectionsfor the integration then- Go to
System Consoleof Mattermost - Provide the integration URL in
Allow untrusted internal connections to - Save it and retry.
- Go to
/op- Displays the general menu/op lt- Log time for a work package/op cwp- Create a work package for a project/op tl- View time logs of the current user/op dwp- Delete work package/op dtl- Delete time log entry/op sub- Subscribe to OpenProject notifications in Mattermost channel
Development wiki is available on SourceHut at https://git.sr.ht/~girishm/op-mattermost.wiki and on GitHub at https://github.com/girish17/op-mattermost/wiki. It contains the workflows, file description and miscellaneous information necessary for development.
A Mattermost plugin with limited features mentioned in this project is available here.
This project is also available on following repositories (as an alternative to GitHub) on:
- SourceHut at https://sr.ht/~girishm/op-mattermost/
This project was sponsored by OpenProject Foundation (OPF) and mentioned in OpenProject integrations.
Copyright (C) 2019 to present, Girish M
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.