Create a ticket in Request Tracker (RT) in relation to one or more i-doit objects
This extension gives you the opportunity to combine an issue tracker like Request Tracker (RT) with an IT documentation tool / CMDB like i-doit. It uses i-doit's API to relate a ticket with one or more objects managed by i-doit. On i-doit's side you are able to view all tickets related to an object. This extension also supports i-doit's multi-tenant functionality.
i-doit ("I document IT") is a Web application to establish an IT documentation and CMDB. Its core is Free and Open Source Software. Visit https://www.i-doit.com/ for commercial support and additional services.
The latest release requires RT 4.4.x and i-doit 1.8.2 or higher. It is not compatible with RT != 4.4.x (for example 3.8.x, 4.0.x, 4.2.x) and not compatible with i-doit <= 1.8.1.
You also need the i-doit API add-on installed, enabled and configured.
Here is a matrix of all compatible versions:
RT 3.8.x | RT 4.0.x | RT 4.2.x | RT 4.4.x | |
---|---|---|---|---|
i-doit 1.0.x | 0.92¹ | |||
i-doit 1.1.x | 0.92 | |||
i-doit 1.2.x | 0.92 | |||
i-doit 1.3.x | 0.93 | |||
i-doit 1.4.x | 0.93/0.94 | |||
i-doit 1.5.x | 0.94 | |||
i-doit 1.6.x | 0.94 | |||
i-doit 1.7.x | 0.94 | |||
i-doit 1.8.x | 0.94 | 1.00² | ||
i-doit 1.9.x | 1.00² | |||
i-doit 1.10.x | 1.00² | |||
i-doit 1.11.x | 1.00² |
¹ Requires i-doit 1.0.1 or higher
² Requires i-doit 1.8.2 or higher
The preferred way is via CPAN. You may also fetch und install the latest version manually or even try the current development branch.
But before you do please make sure all dependencies are met:
RT 4.4.x
- Perl module
YAML::Tiny
export RT_HOME="/opt/rt"
sudo cpan YAML::Tiny
Set RT_HOME
to the path where your RT instance is located, for example /opt/rt4
.
Download the latest version from CPAN or GitHub. To install this extension run the following commands:
wget https://cpan.metacpan.org/authors/id/B/BH/BHEISIG/RT-Extension-ReferenceIDoitObjects-1.00.tar.gz
tar xzvf RT-Extension-ReferenceIDoitObjects-1.00.tar.gz
cd RT-Extension-ReferenceIDoitObjects-1.00/
perl Makefile.PL
make
make test
sudo make install
make initdb
Executing the last command creates 2 new custom fields, so please do it only once. These fields contain the i-doit tenant and the referenced objects.
The prefered and easiest way to install the latest version is via CPAN:
sudo cpan RT::Extension::ReferenceIDoitObjects
$RT_HOME/sbin/rt-setup-database --action insert --datafile $RT_HOME/local/plugins/RT-Extension-ReferenceIDoitObjects/etc/initialdata
The second command is equivalent to make initdb
, but is unfortunately not executed automatically.
Fetch the current development branch:
git clone https://github.com/bheisig/rt-extension-referenceidoitobjects.git
cd rt-extension-referenceidoitobjects
perl Makefile.PL
make
make test
sudo make install
If you already installed this extension you will be able to update to the latest version.
sudo cpan RT::Extension::ReferenceIDoitObjects
wget https://cpan.metacpan.org/authors/id/B/BH/BHEISIG/RT-Extension-ReferenceIDoitObjects-1.00.tar.gz
tar xzvf RT-Extension-ReferenceIDoitObjects-1.00.tar.gz
cd RT-Extension-ReferenceIDoitObjects-1.00/
perl Makefile.PL
make
make test
sudo make install
Fresh copy:
git clone https://github.com/bheisig/rt-extension-referenceidoitobjects.git
cd rt-extension-referenceidoitobjects
perl Makefile.PL
make
make test
sudo make install
Existing copy:
cd rt-extension-referenceidoitobjects
git pull
perl Makefile.PL
make
make test
sudo make install
Version 1.x is shipped with several changes, so please follow these instructions carefully.
- Just follow the normal update steps.
- You have to re-name the custom field "i-doit mandator" to "i-doit tenant".
- The custom filed "i-doit tenant" must contain tenant identifiers not their names.
- Check RT's site configuration file for the string "mandator". Please replace it with "tenant" (beware of the case-sensitivity).
- In RT's site configuration the settings
%IDoitTenantKeys
and$IDoitDefaultTenant
must contain the tenant identifiers, not their names. - Restart RT environment:
sudo rm -rf $RT_HOME/var/mason_data/obj/* && sudo systemctl restart apache2.service
Caution: RT 4.4.x is currently shipped with an out-dated version of the JavaScript framework jQuery. This version breaks with the jQuery plug-in DataTables which is needed by this RT extension. A workaround is to upgrade jQuery.
- Download a newer version of jQuery from their website, for example the minified version
1.12.4.min.js
. - Copy this file to
$RT_HOME/share/static/js/
. - Inside this directory you see the out-dated jQuery version
jquery-1.11.3.min.js
. Move it:mv jquery-1.11.3.min.js jquery-1.11.3.min.js.bak
- Create a symbolic link:
ln -s jquery-1.12.4.min.js jquery-1.11.3.min.js
Note that this workaround could be overwritten whenever you perform an update of RT.
To enable this extension edit the RT site configuration based in $RT_HOME/etc/RT_SiteConfig.pm
:
Set(@Plugins,qw(RT::Extension::ReferenceIDoitObjects));
Set($IDoitURL, 'http://example.org/i-doit/');
Set($IDoitAPI, $IDoitURL . '?api=jsonrpc');
Set(%IDoitTenantKeys, (
1 => 'api key',
2 => 'api key'
));
Set($IDoitDefaultTenant, 1);
Set($IDoitDefaultView, 'objects'); # 'objects', 'workplaces', 'devices', or 'item'
Set($IDoitInstalledSoftware, 'relations'); # 'objects', or 'relations'
Set($IDoitShowCustomFields, 1); # 1 ('yes') or 0 ('no')
It is highly recommended to establish an TLS encrypted connection between RT and i-doit over a network (HTTPS).
i-doit has a API based on JSON-RPC. If you haven't installed or configured it yet now it will be a good time to do it.
Notice: If you use both Web GUIs of i-doit and RT under different domains (FQDN) or IP addresses, please be aware of browsers' "Same Origin Policy". This extension uses AJAX requests access i-doit's API. If RT and i-doit are not available under the same domain name (or IP address), AJAX calls will fail.
To avoid this "problem" (actually this policy is very useful) you can setup an AJAX proxy. This extension already provides such a proxy located under etc/i-doit_api_proxy.php
. It is written in PHP, so you have to install PHP 5.6 or higher and the PHP extension curl
on the same machine where RT is installed. For example, on a Debian GNU/Linux 9 system:
sudo apt install php php-curl libapache2-mod-php
Make this little script available through your web server and edit the script by setting $l_url
to the URL of i-doit's API:
$l_url = 'https://i-doit.example.org/i-doit/index.php?api=jsonrpc';
In RT's site configuration the setting $IDoitAPI
has to be set to the URL of this script:
Set($IDoitAPI, 'https://rt.example.org/path/to/i-doit_api_proxy.php');
If you use a TLS encrypted HTTPS connection with a self-signed certificate curl
should probably not check the certificate. Add this line to the proxy script:
curl_setopt($l_curl_handle, CURLOPT_SSL_VERIFYPEER, false);
For testing purposes call the proxy "by hand". Point your browser to the URL of the proxy script. i-doit should answer with an error message that it is not a valid JSON-RPC request.
This is a list of tenants with their API keys. Just put the identifier and API key of every tenant in i-doit you like to relate to tickets.
Notice: Within the Web GUI you must configure the custom field "i-doit tenant". Add a new value for each tenant. The important field is name
where you should set the tenant identifier.
Choose a default tenant for every situation where it's needed. Use its identifier. This identifier has be to added to the list of the corresponding custom field as well.
When creating or editing a ticket, this extension adds a so-called object browser
to the Web interface. The browser gives you several views on objects:
Select objects provided by the API and filter them by type.
Select users' workplaces and their related components. Each user will be taken by the email address provided by RT's field "Requestors" if these users are documented in i-doit.
i-doit gives you the possibility to create relations between users, their workplaces and all components related to these workplaces.
Tip: You may synchronize user information between RT and i-doit via LDAP.
Select assigned devices for current requestor. Those devices are objects in i-doit which have this requestor as an assigned person.
View and remove all selected items.
Defines which type of objects will be shown for the installed software. There are two options: objects
or relations
.
Shows software objects which are assigned to the currently selected object.
Shows the software relation between the object and the assigned software.
Sometimes it is better to "clean up" the Web GUI. Whenever you only have one tenant within i-doit and don't want to edit the object identifiers manually it is recommended to hide the used custom fields. Select 1
to show them or 0
to hide them.
After all your new configuration will take effect after restarting your RT environment:
sudo rm -rf $RT_HOME/var/mason_data/obj/*
sudo systemctl restart apache2.service
This is an example for deleting the mason cache and restarting the Apache HTTP Web server on a Debian GNU/Linux based operating system.
You may see and create object-related tickets within i-doit. Please refer to the i-doit Knowledge Base to enable this feature.
If you create a new ticket in i-doit a new browser tab will be opened with the RT user interface. Sometimes RT shows a warning that there is a CSR attack. If you observe this behavior edit RT's local configuration file $RT_HOME/etc/RT_SiteConfig.pm
where $RT_HOME
is the path to your RT installation, for example /opt/rt4
:
Set($RestrictReferrer, 0); # avoids possible CSR attacks
Don't forget to clear the Mason cache and restart your Web server.
Notice: This setting could breach your security!
Whenever you create a new ticket or edit an existing one you are able to reference this ticket with one or more objects in i-doit. An additional box with the so-called "object browser" will shown up. Just select the objects you need or deselect the objects you do not need.
- i-doit Knowledge Base
- i-doit Website
- i-doit Help Center
- i-doit Community
- RT Website
- Source code repository
- MetaCPAN
- AnnoCPAN (Annotated CPAN documentation)
- CPAN Ratings
CPAN's request tracker(unused)- Install Request Tracker (RT) 4.4.1 on Debian GNU/Linux 8.6 (Or: How I survived Perl's CPAN dependency hell…)
Please report any bugs or feature requests related to this extension to the issue tracker. Pull requests are very welcomed!
If you have found issues concerning i-doit or RT please contact the respective customer support. The extension's authors won't give you professional support, neither for i-doit nor RT.
- Benjamin Heisig
- Leonard Fischer
- Van Quyen Hoang
Just to be clear: We won't give you support via e-mail. Instead, create a new issue.
Copyright (C) 2011-18 synetics GmbH
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero 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 Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.
Request Tracker (RT) is Copyright Best Practical Solutions, LLC.