Giter Club home page Giter Club logo

rt-extension-referenceidoitobjects's Introduction

RT::Extension::ReferenceIDoitObjects

Create a ticket in Request Tracker (RT) in relation to one or more i-doit objects

Description

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.

Requirements

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

Installation

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.

Manual

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.

CPAN

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.

Git

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

Update

If you already installed this extension you will be able to update to the latest version.

CPAN

sudo cpan RT::Extension::ReferenceIDoitObjects

Manual

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

Git

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

Upgrade from Version 0.9x to 1.x

Version 1.x is shipped with several changes, so please follow these instructions carefully.

  1. Just follow the normal update steps.
  2. You have to re-name the custom field "i-doit mandator" to "i-doit tenant".
  3. The custom filed "i-doit tenant" must contain tenant identifiers not their names.
  4. Check RT's site configuration file for the string "mandator". Please replace it with "tenant" (beware of the case-sensitivity).
  5. In RT's site configuration the settings %IDoitTenantKeys and $IDoitDefaultTenant must contain the tenant identifiers, not their names.
  6. Restart RT environment: sudo rm -rf $RT_HOME/var/mason_data/obj/* && sudo systemctl restart apache2.service

Issue in RT 4.4.x

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.

  1. Download a newer version of jQuery from their website, for example the minified version 1.12.4.min.js.
  2. Copy this file to $RT_HOME/share/static/js/.
  3. 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
  4. 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.

Configuration

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')

$IDoitURL

It is highly recommended to establish an TLS encrypted connection between RT and i-doit over a network (HTTPS).

$IDoitAPI

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.

$IDoitTenantKeys

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.

$IDoitDefaultTenant

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.

$IDoitDefaultView

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:

objects

Select objects provided by the API and filter them by type.

workplaces

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.

devices

Select assigned devices for current requestor. Those devices are objects in i-doit which have this requestor as an assigned person.

selected

View and remove all selected items.

$IDoitInstalledSoftware

Defines which type of objects will be shown for the installed software. There are two options: objects or relations.

objects

Shows software objects which are assigned to the currently selected object.

relations

Shows the software relation between the object and the assigned software.

$IDoitShowCustomFields

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.

Activate Configuration

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.

Configure i-doit

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!

Usage

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.

Create a new ticket

Display a ticket

Modify a ticket

Modify everything at once

Useful Resources

Issues and Contributions

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.

Authors

  • 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 and License

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.

rt-extension-referenceidoitobjects's People

Contributors

bheisig avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

rt-extension-referenceidoitobjects's Issues

i-doIT Integration - no tickets shown

Got the plugin for RT up and running. When creating a ticket in RT, I can select assets from i-doIT. The assigned object is shown in the ticket. But when I try to show all tickets for the object in i-doIT, there are no tickets. But the log of i-doIT shows an entry for the ticket creation with the correct values from RT.

I've checked the i-doIT-manual, but the part for RT is not very useful for this. Any ideas what I can check to solve this? Thank you in advance!

Frank

Multi-tenant setup

Hi,
I got a strange behavior when I was trying to setup i-doit and RT with multi-tenant configuration. All tickets with different tenant value has access to objects that belong to tenant 1.

My setup is:
i-doit PRO 1.9.2 (it is a demo license)
Using Virtual appliance under Virtualbox.

Extension not active

Installed the extension successfully, activated it, short test fails because of false version of i-doit. So I commented out the lines in RT_SiteConfig.pm to deactivate the extension till upgrade of i-doit. After that, I removed the comments to re-activate the extension, but it doesn't work. I see the custom fields of the extension, but no dialogue for the connection to i-doit. In /opt/rt4/var/mason_data/obj no folder for the extension. How can I fix this? Thank you in advance!

Query i-doit without filter?

We've just updated our i-doit from 1.11 to 1.13, we also updated the API. In the older Version, when creating a ticket we've got all objects in Request Tracker, even the object is not assigned to the requestors email-adress.

After the update, all requests from Request Tracker are made with a filter, the requestors email-address. Is there a way to disable this filter, so one can choose any object from i-doit when creating a ticket? RT is 4.4.2. Thank you in advance!

Kind regards, Frank

Referenced i-doit objects on RT view

Good morning,
Is it possible to change the columns presented in RT's interface (both viewing and editing), which are fetched from i-doit?
Possibly adding or at least replacing some of the current ones would be really interesting. Currently, we have ID, Name, Type, Link on "selected objects" and ID, Name, Link" on All objects, but we'd like to add or replace some of these.

Thank you!

All objects selected

Hi,
We have a 4.4 RT installation, integrated with an 1.12.2 installation of i-doit. We've seen a strange behaviour after migrating to this i-doit version: the object selection list which shows up on RT's "References i-doit objects" view always shows all objects selected.

We currently have a 20+ tenant installation (multi-tenant plugin) and at least one of them has almost 2k items registered on the database. Having to manually deselect 2k items to select the needed ones is a huge effort.

Would you have any clue where to look at this (I am not afraid of getting my hands dirty)?

Thank you!

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.