Giter Site home page Giter Site logo

plugin-slack's Introduction

Slack plugin for Kanboard

Receive Kanboard notifications on Slack.

Author

  • Frederic Guillot
  • License MIT

Requirements

  • Kanboard >= 1.0.37

Installation

You have the choice between 3 methods:

  1. Install the plugin from the Kanboard plugin manager in one click
  2. Download the zip file and decompress everything under the directory plugins/Slack
  3. Clone this repository into the folder plugins/Slack

Note: Plugin folder is case-sensitive.

Configuration

Firstly, you have to generate a new webhook url in Slack (Configured Integrations > Incoming Webhook) from here.

You can define only one webhook url (Settings > Integrations > Slack) and override the channel for each project and user.

Receive individual user notifications

  • Go to your user profile then choose Integrations > Slack
  • Copy and paste the webhook url from Slack or leave it blank if you want to use the global webhook url
  • Use @username to receive direct message to your user
  • Enable Slack in your user notifications Notifications > Slack

Receive project notifications to a room

  • Go to the project settings then choose Integrations > Slack
  • Copy and paste the webhook url from Slack or leave it blank if you want to use the global webhook url
  • Use #channel to receive messages in a specific channel
  • Enable Slack in your project notifications Notifications > Slack

Troubleshooting

  • Enable the debug mode
  • All connection errors with the Slack API are recorded in the log files data/debug.log or syslog

plugin-slack's People

Contributors

fguillot avatar majidalavizadeh avatar tbs-arpit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

plugin-slack's Issues

Discord Integration

I just wanted to point out that this plugin also works with Discord!
The setup is the same, but you have to append "slack" to your Discord webhook and voila you get messages to Discord using this plugin - awesome!
Would be nice to mention this in the documentation.

How to debug slack

Thanks so much for this integration.
We just upgraded kanboard from 1.0.27 to 1.0.31 and installed Slack through the interface

We haven't been able to get slack working again, even after regenerating webhook url.
And we are now wondering how to enable debug mode.

Thanks so much

Internal error of Slack plugin

Expected behaviour

I have added the slack plugin folder to my plugins directory. I have a custom plugin folder, not the default. Slack plugin should load.

Actual behaviour

I receive an error
"Internal Error: Unable to load this plugin class \Kanboard\Plugin\Slack\Plugin"

Steps to reproduce

  1. Copy slack plugin in to Kanboard
  2. Go to kanboard
  3. Have error

Configuration

Application version: 1.0.27
PHP version: 7.0.2
PHP SAPI: apache2handler
OS version: Windows NT 6.0
Database driver: postgres
Database version: 9.4.0
Browser: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0

Plugin version 1.0.2
Plugin folder changed location.

Slack Integration not working alongide BeanStalk plugin.

Please, do not create duplicate issues

Actual behaviour

I have been using the slack integration to receive notifications on discord. Once I installed Beanstalk this function seized to work.
Simply put the web hook does not post any notifications.

Expected behaviour

To have Beanstalk installed alongside the slack integration whilst providing the beanstalk performance improvement and recieving notifications through the slack integration.

Steps to reproduce

  1. Install Beanstalk using the following guide: https://github.com/kanboard/plugin-beanstalk (No Docker)
  2. Install Slack using the following guide: https://github.com/kanboard/plugin-slack
  3. add a /slack suffix to the webhook so to make slack compatibel with discord.

Configuration

  • Plugin version: Slack: V1.0.7. BeanStalk: V1.0.0
  • Kanboard version: V1.2.22
  • Database type and version: mysql ver 15.1 Distrib 10.3.28-MariaDB
  • PHP version: 8.0.17
  • OS: CentOS-8
  • Browser: Firefox

Feature Request

Hi

Would be great if the messages send to the slackbot would inlcude a direct link to the task:
Currently it comes as pure text amd it would be very helpful if its possible to click a link in the message to jump directly to the task.
here a example:
Current:
admin changed the assignee of the task #20 to username (teasd)

with link:
admin changed the assignee of the task #20(<-link) to Sebastian Mutti (teasd)

Feature request: Tag-dependent channel notifications

Feature would send messages to specific #channel(s) based on tags.

Rules would be defined similar to:

If tag X, then send to #channel on (change|delete|close|etc)

In some cases, multiple rules would be nice such that several channels could receive the same notifications.

This is a rough idea atm - we use Tags in a way that lets us unify projects under one project but still distinguish between them - in this way pertinent changes get to the appropriate team's #channel(s)

Slack doesn't work unless run from Base Dir

So,

It's taken me ages to narrow this down and it still doesn't make sense, but I'm no PHP Programmer so hopefully someone can make sense of this.

If I do this:

cd /var/www/kanboard
./cli cronjob

I will get

  1. An email notification of my overdue task
  2. A Slack notification of my overdue task.
  3. A web interface notification (in the Kanboard interface bell icon)

But if I do this:

cd /tmp
/var/www/kanboard/cli cronjob

I only get

  1. An email notification of my overdue task
  2. A web interface notification (in the Kanboard interface bell icon)

I don't get a slack notification when I run cli from outside the root kanboard directory

I have attached:
1.log of running cli cronjob from the kanboard directory
2.log of running cli cronjob from the /tmp directory

These logs are with debug=true in the config.php
All I can see different is that there's no HttpClient call at all in 2.log

Therefore I can't get slack integration to work, because I call my cronjob looks like so:

su - www-data -s /bin/bash -c 'php /var/www/kanboard/cli cronjob' >/dev/null 2>&1

And that doesn't work. Only running cli from within the base kanboard directory gives me slack notifications.

2.log
1.log

Install Details:

PHP 7.0.33-0+deb9u3 (cli) (built: Mar  8 2019 10:01:24) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.33-0+deb9u3, Copyright (c) 1999-2017, by Zend Technologies

[15:58:06] root :: micro  ➜  /var/www/kanboard » ./cli version
1.2.10

[15:59:21] root :: micro  ➜  /var/www/kanboard » ./cli plugin:upgrade
* Plugin up to date: SoundNotification (Version 1.1.0)
* Plugin up to date: Calendar (1.1.0)
* Plugin up to date: Customizer (1.12.1)
* Plugin up to date: Slack (Version 1.0.7)
* Plugin up to date: UpdateNotifier (1.4.2)

More specific setup instructions would be great

Hi guys,

This is a great plugin and we've been using it for a while, but we can't seem to figure out the way to do personal notifications.

It's not clear how to setup user specific notifications - do we need to create webhooks in slack for each separate user?

We've got all our notifications coming into one slack channel at the moment, but it would be much better to follow only tasks related to the people involved with it.

Thanks in advance!

Preview Thumbnail

People,
Congrats. This plugin is really very useful. It is possible to include a thumbnail preview of the attached file (images), as with integration with Trello?

It would help a lot.

In my teams the final layout of all design creations are attached in the task. With the notifications it becomes much easier to check.

Regards!

image

Unable to test overdue notifications

Edit: There is a notification on overdue tasks, just not via cli. How can this be triggered manually for testing purposes?

According to kanboard/kanboard#2270 (comment), "The task overdue event is not handled by the notification subscriber" so it doesn't look like it is possible to test it this way.

Actual behaviour

No overdue notification is sent to Slack channel when triggering any cli commands

Expected behaviour

Overdue notification should be sent to Slack channel

Steps to reproduce

1. Set up notifications
2. Create overdue task
3. Run cli notification:overdue-tasks or cli cronjob (both don't work)
4. See that no notification is sent regarding overdue tasks

Configuration

  • Plugin version: v1.0.7
  • Kanboard version: v1.2.15
  • Database type and version: postres v12.3
  • PHP version: v7.3.19
  • OS: Windows 10
  • Browser: Chrome v85

Similar to: manuvarkey/kanboard-plugin-telegram#26

[error] HttpClient: request failed

Hi,

My slack WebHooks is OK, when i try in shell (censored by XXXXX)

curl -X POST -H 'Content-type: application/json' \ --data '{"text":"TEST!"}' \ https://hooks.slack.com/services/XXXXXXXXX/XXXXXXXX/XXXXXXXX

image

I've setup my global webhook url (censored by XXXXX)

image

In my debug tail i see [2017-03-11 13:17:46] [error] HttpClient: request failed and my webhooks did't send notification

tail -f debug.log | grep HttpClient
[2017-03-11 13:17:46] [error] HttpClient: request failed
[2017-03-11 13:17:46] [debug] HttpClient: url=https://hooks.slack.com/services/XXXXXXXXX/XXXXXXXX/XXXXXXXXXX?token=e5c7da01a6ec2a9a969109c6010b9d526357cee607a371ba9cdbe15da985
[2017-03-11 13:17:46] [debug] HttpClient: headers=array (
[2017-03-11 13:17:46] [debug] HttpClient: payload={"event_name":"task.move.column","event_data":{"task_id":"3","task":{"id":"3","title":"test","description":"","date_creation":"1489230096","color_id":"grey","project_id":"2","column_id":"6","owner_id":"1","position":"1","is_active":"1","date_completed":null,"score":"0","date_due":"0","category_id":"0","creator_id":"1","date_modification":"1489234666","reference":"","date_started":"0","time_spent":"0","time_estimated":"0","swimlane_id":"2","date_moved":"1489234666","recurrence_status":"0","recurrence_trigger":"0","recurrence_factor":"0","recurrence_timeframe":"0","recurrence_basedate":"0","recurrence_parent":null,"recurrence_child":null,"priority":"0","external_provider":null,"external_uri":null,"category_name":null,"swimlane_name":"Swimlane par d\u00e9faut","project_name":"Espace client","column_title":"Non Assign\u00e9","assignee_username":"valentin","assignee_name":"Valentin","creator_username":"valentin","creator_name":"Valentin","category_description":null,"column_position":"1"},"changes":{"src_column_id":"7","dst_column_id":"6","date_moved":"1489234648"},"project_id":"2","position":1,"column_id":"6","swimlane_id":"2","src_column_id":"7","dst_column_id":"6","date_moved":"1489234648","recurrence_status":"0","recurrence_trigger":"0"}}
[2017-03-11 13:17:46] [debug] HttpClient: metadata=NULL
[2017-03-11 13:17:46] [debug] HttpClient: response=
[2017-03-11 13:17:46] [debug] HttpClient: executionTime=0.00017499923706055
[2017-03-11 13:17:46] [error] HttpClient: request failed
[2017-03-11 13:17:46] [debug] HttpClient: url=https://hooks.slack.com/services/XXXXXXXXX/XXXXXXXX/XXXXXXXXXX
[2017-03-11 13:17:46] [debug] HttpClient: headers=array (
[2017-03-11 13:17:46] [debug] HttpClient: payload={"text":"[Espace client] Valentin moved the task #3 to the column "Non Assign\u00e9" (test) - <http://lakedev-hosting.fr/?controller=TaskViewController&action=show&task_id=3&project_id=2|voir la t\u00e2che sur Kanboard>","username":"Kanboard","icon_url":"http://kanboard.net/assets/img/favicon.png"}
[2017-03-11 13:17:46] [debug] HttpClient: metadata=NULL
[2017-03-11 13:17:46] [debug] HttpClient: response=
[2017-03-11 13:17:46] [debug] HttpClient: executionTime=0.0001518726348877

Error sending overdue notifications to Slack

Expected behaviour

Send overdue notifications to Slack

Actual behaviour

PHP Notice:  Undefined index: task in /var/www/[folder]/public_html/plugins/Slack/Notification/Slack.php on line 30
PHP Catchable fatal error:  Argument 3 passed to Kanboard\Plugin\Slack\Notification\Slack::sendMessage() must be of the type array, null given, called in /var/www/[folder]/public_html/plugins/Slack/Notification/Slack.php on line 31 and defined in /var/www/[folder]/public_html/plugins/Slack/Notification/Slack.php on line 98

Steps to reproduce

  • copy plugin source to plugins/Slack
  • configure slack incomming webhook-url under user > profile > integration (or admin > settings > integrations)
  • activate Slack via user > profile > notifications
  • run ./cli notification:overdue-tasks --group on shell

Configuration

Version: 1.0.35
PHP Version: 5.5.9-1ubuntu4.20
PHP SAPI: apache2handler
OS Version: Linux 3.13.0-57-generic
Datenbanktreiber: mysql
Datenbank Version: 5.5.53-0ubuntu0.14.04.1
Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/10.0.1 Safari/602.2.14

Click to Slack message appendix " ... - view the task on Kanboard" leads to error

We downloaded today (31.05.2016) latest Kanboard instance and Slack plugin (1.0.4) directly from GitHub repository.

When we go to Slack and click to generated link "... view the task on Kanboard", it gives following error linked to recent Controllers rename:

Internal Error: Controller not found
(generated link --> http://centos7/kanboard/?controller=**task**&action=show&task_id=855&project_id=28)
(correct link --> http://centos7/kanboard/?controller=**TaskViewController**&action=show&task_id=855&project_id=28)

Additional info:

Application version: master
PHP version: 5.4.16
PHP SAPI: apache2handler
OS version: Linux 3.10.0-327.13.1.el7.x86_64
Database driver: sqlite
Database version: 3.7.17
Browser: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.