PageRenderTime 31ms CodeModel.GetById 6ms RepoModel.GetById 0ms app.codeStats 0ms

/lib/RT/Extension/ReferenceIDoitObjects.pm

https://github.com/Sanzzes/rt-extension-referenceidoitobjects
Perl | 235 lines | 174 code | 53 blank | 8 comment | 3 complexity | ca1c5fa6a2e42c8673fabdf333d9e45a MD5 | raw file
  1. # RT::Extension::ReferenceIDoitObjects
  2. #
  3. # Copyright 2011-12 synetics GmbH, http://i-doit.org/
  4. #
  5. # This program is free software; you can redistribute it and/or modify it under
  6. # the same terms as Perl itself.
  7. #
  8. # Request Tracker (RT) is Copyright Best Practical Solutions, LLC.
  9. package RT::Extension::ReferenceIDoitObjects;
  10. use 5.010;
  11. use warnings;
  12. use strict;
  13. our $VERSION = '0.7';
  14. =head1 NAME
  15. RT::Extension::ReferenceIDoitObjects - Create a ticket in relation to one or
  16. more i-doit objects
  17. =head1 DESCRIPTION
  18. This extension gives you the opportunity to combine an issue tracker like RT
  19. with an IT documentation tool / CMDB like i-doit. It uses i-doit's API to relate
  20. a ticket with one or more CIs / objects managed by i-doit. On i-doit's side you
  21. are able to view all tickets related to an object. This extension also supports
  22. i-doit's multi-mandator functionality.
  23. i-doit ("I document IT") is a web-based tool to document complex IT
  24. infrastructures. It provides several modules like a ITIL compliant Configuration
  25. Management Database (CMDB). More information about i-doit is available under
  26. L<http://www.i-doit.org/>. It's core is Free and Open Source Software. Visit
  27. L<http://www.i-doit.com/> for commercial support and additional services. Please
  28. note, that B<i-doit's API (which is essential for this extension) is currently
  29. only implemented in the commercial branch>.
  30. =head1 INSTALLATION
  31. This extension requires RT 4.x or higher and a running installation of i-doit
  32. 0.9.9-9 or higher.
  33. To install this extension, run the following commands:
  34. perl Makefile.PL
  35. make
  36. make test
  37. make install
  38. make initdb
  39. Executing the last command creates 2 new custom fields, so please do it only
  40. once. These fields contain the i-doit mandator and the referenced objects.
  41. =head1 CONFIGURATION
  42. To enable this extension edit the RT site configuration based in
  43. C<RT_HOME/etc/RT_SiteConfig.pm>:
  44. Set(@Plugins,qw(RT::Extension::ReferenceIDoitObjects));
  45. i-doit has a built-in API based on JSON-RPC. To call this API set its URL:
  46. Set($IDoitURL, 'http://example.org/i-doit/');
  47. Set($IDoitAPI, $IDoitURL . '?api=jsonrpc');
  48. Set($IDoitUser, 'admin');
  49. Set($IDoitPassword, '21232f297a57a5a743894a0e4a801fc3'); # 'admin'
  50. Set($IDoitDefaultMandator, 1);
  51. Set($IDoitDefaultView, 'object'); # 'object', 'tree' or 'item'
  52. Set($IDoitShowCustomFields, 1); # 1 ('yes') or 0 ('no')
  53. =over 4
  54. =item C<$IDoitURL>
  55. It's I<highly recommended> to establish an encrypted connection between RT and
  56. i-doit over a network, e. g. TLS over HTTP (HTTPS).
  57. =item C<$IDoitAPI>
  58. Please be aware of browsers' "B<Same Origin Policy>"! This extension uses AJAX
  59. requests access i-doit's API. If RT and i-doit are not available under the same
  60. domain name (or IP address), AJAX calls will fail.
  61. To avoid this "problem" (actually this policy is very useful) you can setup an
  62. AJAX proxy. This extension already provides such a proxy located under C<etc/>.
  63. It's written in PHP, so you have to install PHP 5.2 or higher and the PHP
  64. extension C<curl> on the same machine where RT is installed. Make this little
  65. script available through your web server and edit the script by setting
  66. C<$l_url> to the URL of i-doit's API, e. g.
  67. C<http://example.org/i-doit/index.php?api=jsonrpc>. In RT's site configuration
  68. C<$IDoitAPI> has to be set to this script, e. g.
  69. C<http://rt.example.org/path/to/i-doit_api_proxy.php>.
  70. =item C<$IDoitUser>
  71. You need a valid i-doit user with reading permissions.
  72. =item C<$IDoitPassword>
  73. The user's password is encoded as a MD5 hash.
  74. =item C<$IDoitDefaultMandator>
  75. You need the identifier of a mandator who owns the objects, but this may also be
  76. set while creating a ticket. This identifier has be to added to the list of the
  77. corresponding custom field.
  78. =item C<$IDoitDefaultView>
  79. When creating or editing a ticket, this extension adds a so-called I<object
  80. browser> to the web interface. The browser gives you three views on objects:
  81. =over 4
  82. =item C<object>
  83. Select any object provided by the API and filter them by type.
  84. =item C<tree>
  85. Select users' work stations and their related sub objects. Each user will be
  86. taken by the email address provided by RT's field C<Requestors> if these users
  87. are documented in i-doit.
  88. i-doit gives you the possiblity to create relations between users, their work
  89. stations and all equipment related to these workstations.
  90. Tip: You may synchronize user information between RT and i-doit via LDAP.
  91. =item C<item>
  92. View and remove all selected items.
  93. =back
  94. =item C<$IDoitShowCustomFields>
  95. Sometimes it's better to "clean up" the web user interface. Whenever you only
  96. have 1 mandator within i-doit and don't want to edit the object identifiers
  97. manually it's recommended to hide the used custom fields.
  98. =back
  99. After all your new configuration will take effect after restarting your RT
  100. environment:
  101. rm -rf $RT_HOME/var/mason_data/obj/* && service apache2 restart
  102. This is an example for deleting the mason cache and restarting the Apache HTTP
  103. web server on a Debian GNU/Linux based operating system.
  104. =head1 AUTHORS
  105. Benjamin Heisig, E<lt>bheisig@synetics.deE<gt>
  106. Leonard Fischer, E<lt>lfischer@synetics.deE<gt>
  107. =head1 SUPPORT AND DOCUMENTATION
  108. You can find documentation for this module with the C<perldoc> command.
  109. perldoc RT::Extension::ReferenceIDoitObjects
  110. You can also look for information at:
  111. =over 4
  112. =item B<Search CPAN>
  113. L<http://search.cpan.org/dist/RT-Extension-ReferenceIDoitObjects/>
  114. =item B<RT: CPAN's request tracker>
  115. L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=RT-Extension-ReferenceIDoitObjects>
  116. =item B<AnnoCPAN: Annotated CPAN documentation>
  117. L<http://annocpan.org/dist/RT-Extension-ReferenceIDoitObjects>
  118. =item B<CPAN Ratings>
  119. L<http://cpanratings.perl.org/d/RT-Extension-ReferenceIDoitObjects>
  120. =item B<Repository>
  121. L<https://github.com/bheisig/rt-extension-referenceidoitobjects>
  122. =back
  123. =head1 BUGS
  124. Please report any bugs or feature requests to the L<authors|/"AUTHORS">.
  125. =head1 COPYRIGHT AND LICENSE
  126. Copyright 2011-12 synetics GmbH, E<lt>http://i-doit.org/E<gt>
  127. This program is free software; you can redistribute it and/or modify it under
  128. the same terms as Perl itself.
  129. Request Tracker (RT) is Copyright Best Practical Solutions, LLC.
  130. =head1 SEE ALSO
  131. RT
  132. =cut
  133. 1;