**Deprecated!** - This package works for MRBS version 1.4.10.
All newer versions have not been tested and are not supported.
Repository | GitHub |
---|---|
Versions | Status |
---|---|
MRBS-OTRS is a function to 'connect' the MRBS (1.4.10) deprecated
with the Ticketsystem OTRS.
The aim is to add a ticketnumber from OTRS into the description of the booking in MRBS.
Every notification of the booking goes into the same ticket as article.
How it works: create a ticket in OTRS via the OTRS rpc interface from PHP.
- create a ticket in OTRS via SOAP::PHP
- insert the TicketNumber into the description of the booking room
* install the package php-soap
* enable the RPC interface in OTRS
* set a user name and password under `Admin > SysConfig > Framework > Core::Soap` (webinterface)
* add the configuration of the web/config.inc.php
* change ticket-properties
* add the file otrs-soap.php to the ./web directory
* add the file otrs.php to the ./web directory
web/edit_entry.php
(1.4.10) is updated by following code:
- echo "<input class=\"submit default_action\" type=\"submit\" name=\"save_button\" value=\"" . get_vocab("save") . "\" > \n";
+ echo "<input class=\"submit default_action\" type=\"submit\" name=\"savebutton\" value=\"" . get_vocab("save") . "\" > \n";
web/js/edit_entry.js-php
(1.4.10) is updated by following code:
- if ($(this).data('submit') === 'save_button')
+ if ($(this).data('submit') === 'savebutton')
web/edit_entry_handler.php
(1.4.10) is extended by following code:
+ ### OTRS ###
+ $just_check = TRUE; # just check the valid booking
+ $result = mrbsMakeBookings($bookings, $this_id, $just_check, $skip, $original_room_id, $need_to_send_mail, $edit_type);
+ # if the booking is vaild & no other booking exist & save button was pressed = include otrs.php
+ if ($result['valid_booking']== TRUE && !isset($id) && isset($savebutton) )
+ {
+ include("otrs.php");
+ }
+ ### OTRS END ###
$just_check = $ajax && function_exists('json_encode') && !$commit;
$this_id = (isset($id)) ? $id : NULL;
$result = mrbsMakeBookings($bookings, $this_id, $just_check, $skip, $original_room_id, $need_to_send_mail, $edit_type);
- install PHP-SOAP: sudo apt-get install php-soap
- enable the RPC interface in OTRS:
Admin > SysConfig > Framework > Core::Soap
- set SOAP:username and SOAP:password
- Perl module SOAP::Lite on otrs-server
Add these parameter into "config.inc.php" file.
$create_otrs_ticket = TRUE; // activate otrs-create-ticket function
$otrs_ticket["area"][] = "2"; // area number
$otrs_ticket["area"][] = "5";
[...]
<a name="OTRSconfiguration"/>
*OTRS configuration*
$otrs_url = "http://domain.de/otrs/rpc.pl"; // URL of your otrs-server
$otrs_username = "otrs"; // OTRS-Webinterface -> SysConfig -> Framework -> Core::SOAP -> SOAP:User
$otrs_password = "PASSWORD"; // OTRS-Webinterface -> SysConfig -> Framework -> Core::SOAP -> SOAP:Password
*ticket properties*
$otrs_title_add = "MRBS-OTRS: "; // Ticket-title
$otrs_from_domain = "domain.de"; // (optional)
$otrs_queue = "Postmaster"; // create tickets in this queue
$otrs_lock = "unlock"; // lock/unlock
$otrs_state = "new"; // new/open/closed..
$otrs_priority = "3"; // 1/2/3/4/5 priority
$otrs_articletype = "webrequest"; //
$otrs_sendertype = "customer"; //
$otrs_historytype = "WebRequestCustomer"; //
$otrs_historycomment = "created from MRBS via PHP"; //
$otrs_contenttype = "text/plain; charset=ISO-8859-1"; //
$otrs_userid = 1; // user in OTRS (1 = systemuser)
For download see dennykorsukewitz/MRBS-OTRS
Enjoy!
Your Denny Korsukéwitz!