Commit 4bc23ffe authored by pedrolab's avatar pedrolab

request tracker doc

parent 3e0f5702
Based on the debian experience. Debian uses 3 types of bug tracking systems: (1) [debbugs](https://en.wikipedia.org/wiki/Debbugs), (2) its [gitlab](https://gitlab.com) [instance](https://salsa.debian.org/public) and (3) [request tracker (rt)](https://bestpractical.com/request-tracker/) [instance](https://rt.debian.org/). debbugs and gitlab are more convenient for software and rt for service desk support. This guide explains how to install it for our organization.
# Install
The steps described [here](https://rt-wiki.bestpractical.com/wiki/DebianJessieInstallGuide) works too for debian stretch. This should deal with installation of all necessary apache2 packages follow the configuration for the database setup and rt root password:
apt-get install request-tracker4 rt4-db-mysql rt4-apache2
Install the extension to allow commands by email
cpan YAML
cpan install
cpan RT::Extension::CommandByMail
# Configure
Put the rt config to apache
cd /etc/apache2/conf-enabled/
ln -s /etc/request-tracker4/apache2-modperl2.conf
Adapt configuration to our needs in `/etc/request-tracker4/RT_SiteConfig.d/50-debconf.pm`:
# THE BASICS:
Set($rtname, 'example.com');
Set($Organization, 'orgexample');
Set($Timezone, 'Europe/Madrid');
Set($CorrespondAddress , 'rt@example.com');
Set($CommentAddress , 'rt-comment@example.com');
# THE WEBSERVER:
Set($WebDomain, 'example.com');
Set($WebBaseURL , "https://example.com");
Set($WebPath , "/rt");
#Set(@ReferrerWhitelist, qw(example.com:443, example.com:80));
#lets try this -> src https://forum.bestpractical.com/t/cross-site-forgery/31763
Set(@ReferrerWhitelist, qw());
To create, reply and comment tickets through email with rt put in `/etc/aliases`:
suport: "|/usr/bin/rt-mailgate --queue suport --action correspond --url http://localhost/rt"
suport-comentari: "|/usr/bin/rt-mailgate --queue suport --action comment --url http://localhost/rt"
and update aliases appropiately:
newaliases && service postfix reload
To configure the extension that allows commands by email (change queue, set status, etc.) you have to include the next three lines in `/etc/request-tracker4/RT_SiteConfig.pm`:
Plugin('RT::Extension::CommandByMail');
Set(@MailPlugins, qw(Auth::MailFrom Action::CommandByMail));
Set($CommandByMailHeader, "X-RT-Command");
Apply all configurations
service apache2 reload
Configure RT-Shredder (ready to delete things) after that you can access it through: Admin / Tools / Shredder
mkdir -p /var/lib/request-tracker4/data/RT-Shredder
chown www-data -R /var/lib/request-tracker4/data/RT-Shredder
## TODO
- Rt can also handle [service level agreements](https://bestpractical.com/blog/2017/3/managing-service-level-agreements-slas-in-rt); but this part is not included in the guide (yet).
- https://rt-wiki.bestpractical.com/wiki/SpamFiltering
# Design & Customizations
## Proposed generic structure
- Each queue handle different types of tickets.
- One queue (the dispatcher) receives all emails and its purpose is to route the tickets to the other queues.
- On each queue specific users and groups receive notifications because they are in the AdminCc
## Notify AdminCc when ticket arrives to your queue
source http://kb.mit.edu/confluence/display/istcontrib/Enabling+notification+to+your+team+when+a+ticket+is+moved+to+your+RT+queue
backup source https://web.archive.org/web/20190218160302/http://kb.mit.edu/confluence/display/istcontrib/Enabling+notification+to+your+team+when+a+ticket+is+moved+to+your+RT+queue
## Autodispatcher to specific queue
```
Condition: On Create
Action: User Defined
Template: Blank
Custom condition:
Custom action preparation code: `return 1;`
Custom action commit code:
```
Assuming that queueName in subject goes automatically to queueName queue:
```perl
# src https://forum.bestpractical.com/t/auto-change-queue-based-on-requestor/15206/3
# src https://rt-wiki.bestpractical.com/wiki/SetOwnerAndQueueBySubject
if (
$self->TicketObj->Status eq "new" &&
$self->TicketObj->Queue == 4 && # ID of suport queue
# case insensitive https://stackoverflow.com/questions/9655164/regex-ignore-case-sensitivity
$self->TicketObj->Subject =~ /queueName/i ) {
$RT::Logger->error("change to alta queue");
# thanks https://forum.bestpractical.com/t/simple-custom-action-gives-mason-compiler-error/4856/2
my ($status, $msg) = $self->TicketObj->SetQueue("queueName");
return 0;
}
```
## Change status (lifecycles)
https://docs.bestpractical.com/rt/4.4.4/customizing/lifecycles.html
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment