Redmine. Customizable jabber-alert in 5 minutes

Redmine is a very good system for project management and bug tracking. However, (from my personal experience I use), it is not able to build a working team is self-organizing control system errors. The developers are too busy to keep track of all comments related to their tasks; on the other hand, the author who created a particular task, rarely looks at her. In cases where the task is incorrect or needs to be updated, the dialogue between the performer and the author may be delayed, because the discussion is quite weak. Because of this, the tracker-sheet turns into a cesspool of irrelevant tasks. It becomes easier to solve the issue directly without resorting to Redmine. The efficiency of this system is small.

To say that I'm interested in is a self-organizing system. Surely you can hire some specialist who will kick the developers so they looked in the tracker often, calling users, etc. But in reality small companies is a luxury. Because I think this issue should be resolved through a mechanism of alerts.

Immediately, the problem can be solved as:
the
    the
  • Redmine is able to send notification emails. In principle what you need, but it has several drawbacks: first, no one is going to check the mail every five minutes; secondly, this alert function can be disabled by the user; in the absence of a corporate email such letter warning hurry in section of spam.
  • the
  • an Extension to the IDE, such as mylyn for Eclipse. Unfortunately, solves the problem only at one end: the standard user has no IDE. But for developers gives tremendous opportunities to work with Redmine directly from the IDE. That's probably the best option (for developers) if the company is able to deploy a workstation with a preinstalled IDE and configured the extension.
  • the
  • messaging via jabber or icq.

For Redmine, there is a curious jabber bot orangutan. This is an ambitious project whose aim is the organization of work with Redmine via jabber Protocol. In a perfect world you can: close, create and comment on tasks just by sending command messages in human language. But it's in a perfect world. And in real difficulty in setting up, the teams are fixed, the human language of the question. In addition to the work of the bot on Redmine need to roll a plugin written for a shaggy version. And the main disadvantage: supports only English language.

Unfortunately, I have not found other opportunities organizations jabber notifications for Redmine. Had to create their own alerts service.

the

notification Service "send2me"


As I wrote earlier, Redmine is able to send e-mail notifications about changes in tasks. Taking advantage of this opportunity can be realized the sending jabber notifications through the direct delivery of postal messages to a list of jabber addresses. On the basis of this idea appeared send2me.org.

After registration, each user receives a personal mailbox, such as "mail@send2me.org". Any message received to this e-mail, sent to the jabber list of contacts, according to established rules. The service provides a simple interface for describing the rules for the selection of messages to send. The rules are described by blocks, conditionals, regular expressions and routing table. These three components allow us to describe arbitrarily complex rule to send messages. However, creating a rule to send notifications from Redmine is a trivial task thanks to the built-in templates.

so, configure jabber notifications for Redmine:

1. Register at send2me.org and receive personal mailbox, such as "mail@send2me.org".
2. In Redmine, create the user who will listen to all alerts as email address specified "mail@send2me.org". Thus, we ensure that all changes in tasks will be sent to the specified email.

3. Now we need to create a message processing rule Redmine. To do this, go to your user on send2me.org and click on the "Add" button in the "Rules".



In the edit form the rules specify a pattern of "Redmine".



Go through the items that you want to change.
the
    the
  • In the first block (the red number "1" on the image) we reject all messages that come not from Redmine. This is done by the regular expression:
     $header{'X-Redmine-Host'} =~ /^yourredminehost.com$/
    Respectively, instead of "yourredminehost.com", enter the host of your Redmine.
  • the
  • In the second block we reject all messages not from our project. Use a regular expression:
    $header{'X-Redmine-Project'} =~ /^identifier$/
    where the "identifier" is the project identifier in Redmine. This block is optional – if it is removed, messages will be accepted from all projects.
  • the
  • and finally, in third unit, you need to fill the correspondence table of Redmine users and their jabber contacts.

Note: to determine the message recipient uses message headers that are generated by Redmine.
( $header{'X-Redmine-Issue-Author'}, 
$header{'X-Redmine-Issue-Assignee'}, 
split(';', $header{'X-Redmine-Watchers'} ))
unfortunately Redmine doesn't add to the mail header of the observers tasks. So out of the box notifications will be sent only to the authors of the task and the assigned performers. To determine the observers use the additional header "X-Redmine-Watchers". To make it work, you need to put a simple plugin for Redmine (it requires neither migration, nor any manipulation of the configuration of Redmine).

The procedure to configure jabber notifications Redmine ends. Further, for those who are interested, I will describe the architecture of the service send2me.org

the

the architecture of the notification service


The figure is a schematic diagram of the organization of such a service.



Any email received to the mailbox, is processed as follows:
the
    the
  • Postfix – takes a received message and forwards it to named pipe (named pipe). Postfix is configured so that redirects to payp only messages from those users for whom there is a record in the database send2me.org (i.e. registered users). Other messages are removed.
  • the
  • Rule processor (rules engine) – removes a message from the named pipe and apply a set of custom rules. If the message is not discarded according to the rules, it is prepared to send jabber contacts and is directed to the following named pipe.
  • the
  • Ejabberd module (bot) – retrieves the message from the named pipe and sends it.

A separate link is web crud written in Dancer and designed to create and edit custom rules.

Attachments of emails are handled, and cut when you receive through renattach.

I find it difficult to evaluate the performance of this architecture: postfix and ejabberd are widely known for high quality products. Suppose that the narrow link is part of the system, written in perl. I think pretty quickly gebrettert dump my nischebrodsky server (1Ghz &512MB), but the service really interested users it is enough.
Article based on information from habrahabr.ru

Comments

Popular posts from this blog

Powershell and Cyrillic in the console (updated)

Active/Passive PostgreSQL Cluster, using Pacemaker, Corosync

Automatic deployment ElasticBeanstalk using Bitbucket Pipelines