Version to 3.5.1
Compatible with GLPI 9.3
This commit is contained in:
@@ -2,7 +2,9 @@
|
||||
|
||||
GLPI plugin that provides an interface with a customized ProcessMaker server (https://github.com/tomolimo/processmaker-server).
|
||||
|
||||
version 3.4.5 is compatible with GLPI 9.2 and needs ProcessMaker either 3.0.1.8-RE-1.12 (https://github.com/tomolimo/processmaker-server/releases/tag/3.0.1.8-RE-1.12) or 3.3.0-RE-1.0 (https://github.com/tomolimo/processmaker-server/releases/tag/3.3.0-RE-1.0)
|
||||
version 3.4.x is compatible with GLPI 9.2 and needs ProcessMaker either 3.0.1.8-RE-1.12 (https://github.com/tomolimo/processmaker-server/releases/tag/3.0.1.8-RE-1.12) or 3.3.0-RE-1.0 (https://github.com/tomolimo/processmaker-server/releases/tag/3.3.0-RE-1.0)
|
||||
|
||||
version 3.5.x is compatible with GLPI 9.3 and needs ProcessMaker 3.3.0-RE-1.x (https://github.com/tomolimo/processmaker-server/releases/latest)
|
||||
|
||||
This plugin can run classic and bpmn processes
|
||||
|
||||
|
||||
@@ -61,15 +61,22 @@ if (empty($_REQUEST['searchText'])) {
|
||||
}
|
||||
|
||||
$processall = (isset($_REQUEST['specific_tags']['process_restrict']) && !$_REQUEST['specific_tags']['process_restrict']);
|
||||
$count_cases_per_item = isset($_REQUEST['specific_tags']['count_cases_per_item']) ? $_REQUEST['specific_tags']['count_cases_per_item'] : [];
|
||||
|
||||
$result = PluginProcessmakerProcess::getSqlSearchResult(false, $search);
|
||||
|
||||
if ($DB->numrows($result)) {
|
||||
while ($data = $DB->fetch_array($result)) {
|
||||
$process_entities = PluginProcessmakerProcess::getEntitiesForProfileByProcess($data["id"], $_SESSION['glpiactiveprofile']['id'], true);
|
||||
if ($processall || in_array( $_REQUEST["entity_restrict"], $process_entities)) {
|
||||
array_push( $processes, [ 'id' => $data["id"],
|
||||
'text' => $data["name"] ]);
|
||||
$can_add = $data['max_cases_per_item'] == 0 || !isset($count_cases_per_item[$data["id"]]) || $count_cases_per_item[$data["id"]] < $data['max_cases_per_item'];
|
||||
if ($processall
|
||||
|| ($data['maintenance'] != 1
|
||||
&& in_array( $_REQUEST["entity_restrict"], $process_entities)
|
||||
&& $can_add) ) {
|
||||
|
||||
array_push( $processes, ['id' => $data["id"],
|
||||
'text' => $data["name"]
|
||||
]);
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,8 +57,9 @@ if (!isset($_REQUEST['page'])) {
|
||||
if ($one_item < 0) {
|
||||
$start = ($_REQUEST['page']-1)*$_REQUEST['page_limit'];
|
||||
$LIMIT = "LIMIT $start,".$_REQUEST['page_limit'];
|
||||
$searchText = isset($_REQUEST['searchText']) ? $_REQUEST['searchText'] : "";
|
||||
$result = PluginProcessmakerUser::getSqlSearchResult( $_REQUEST['specific_tags']['taskGuid'], false, $_REQUEST['right'], $_REQUEST["entity_restrict"],
|
||||
$_REQUEST['value'], $used, $_REQUEST['searchText'], $LIMIT);
|
||||
$_REQUEST['value'], $used, $searchText, $LIMIT);
|
||||
} else {
|
||||
$query = "SELECT DISTINCT `glpi_users`.*
|
||||
FROM `glpi_users`
|
||||
|
||||
@@ -22,16 +22,13 @@ function glpi_processmaker_case_reload_page() {
|
||||
if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'route' && isset( $_REQUEST['UID'] ) && isset( $_REQUEST['APP_UID'] ) && isset( $_REQUEST['__DynaformName__'] )) {
|
||||
// then get item id from DB
|
||||
if ($locCase->getFromGUID($_REQUEST['APP_UID'])) {
|
||||
|
||||
if (isset( $_REQUEST['form'] )) {
|
||||
$PM_SOAP->derivateCase($locCase, $_REQUEST);
|
||||
}
|
||||
$PM_SOAP->derivateCase($locCase, $_REQUEST);
|
||||
}
|
||||
glpi_processmaker_case_reload_page();
|
||||
|
||||
} else if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'delete') {
|
||||
} else if (isset($_REQUEST['purge'])) {
|
||||
// delete case from case table, this will also delete the tasks
|
||||
if ($locCase->getFromDB($_POST['cases_id']) && $locCase->deleteCase()) {
|
||||
if ($locCase->getFromDB($_REQUEST['id']) && $locCase->deleteCase()) {
|
||||
Session::addMessageAfterRedirect(__('Case has been deleted!', 'processmaker'), true, INFO);
|
||||
} else {
|
||||
Session::addMessageAfterRedirect(__('Unable to delete case!', 'processmaker'), true, ERROR);
|
||||
|
||||
@@ -5,19 +5,8 @@ include_once ("../../../inc/includes.php");
|
||||
Html::header(__('ProcessMaker', 'processmaker'), $_SERVER['PHP_SELF'], "helpdesk", "PluginProcessmakerCase", "cases");
|
||||
|
||||
if (!$PM_SOAP->config->fields['maintenance']) {
|
||||
if (Session::haveRightsOr("plugin_processmaker_config", [READ, UPDATE])) {
|
||||
if (Session::haveRightsOr("plugin_processmaker_case", [READ, UPDATE])) {
|
||||
|
||||
// force default sort to column id / DESC
|
||||
if (empty($_SESSION['glpisearch']['PluginProcessmakerCase'])
|
||||
|| isset($_GET["reset"])
|
||||
|| !isset($_GET["sort"])
|
||||
) {
|
||||
$_SESSION['glpisearch']['PluginProcessmakerCase']['order'] = 'DESC';
|
||||
$_SESSION['glpisearch']['PluginProcessmakerCase']['sort'] = '1';
|
||||
if (isset($_GET["reset"])) {
|
||||
unset($_GET['reset']);
|
||||
}
|
||||
}
|
||||
Search::show('PluginProcessmakerCase');
|
||||
} else {
|
||||
Html::displayRightError();
|
||||
|
||||
@@ -4,14 +4,13 @@ include_once ("../../../inc/includes.php");
|
||||
|
||||
Session::checkCentralAccess();
|
||||
|
||||
$right = new PluginProcessmakerProcess_Profile();
|
||||
$right = new PluginProcessmakerProcess_Profile();
|
||||
|
||||
if (isset($_POST["add"])) {
|
||||
|
||||
$right->check(-1, UPDATE, $_POST);
|
||||
if ($right->add($_POST)) {
|
||||
}
|
||||
$right->add($_POST);
|
||||
Html::back();
|
||||
}
|
||||
}
|
||||
|
||||
Html::displayErrorAndDie("lost");
|
||||
|
||||
@@ -3,12 +3,9 @@ include_once ("../../../inc/includes.php");
|
||||
|
||||
switch ($_POST["action"]) {
|
||||
case 'newcase':
|
||||
if (isset($_POST['items_id']) && $_POST['items_id'] > 0) { // then this case will be bound to an item
|
||||
// TODO: we must check if a case is not already existing
|
||||
// to manage the problem of F5 (Refresh)
|
||||
if (isset($_POST['items_id']) && $_POST['items_id'] > 0) {
|
||||
|
||||
//$hasCase = PluginProcessmakerCase::getIDFromItem($_POST['itemtype'], $_POST['items_id']);
|
||||
//if ($hasCase === false && $_POST['plugin_processmaker_processes_id'] > 0) {
|
||||
// then this case will be bound to an item
|
||||
if ($_POST['plugin_processmaker_processes_id'] > 0) {
|
||||
|
||||
$resultCase = $PM_SOAP->startNewCase($_POST['plugin_processmaker_processes_id'], $_POST['itemtype'], $_POST['items_id'], Session::getLoginUserID());
|
||||
@@ -18,9 +15,18 @@ switch ($_POST["action"]) {
|
||||
if ($case->getFromGUID($resultCase->caseId)) {
|
||||
$link = $case->getLinkURL();
|
||||
$task = new PluginProcessmakerTask();
|
||||
$task->getFromDBByQuery(" WHERE `plugin_processmaker_cases_id`=".$case->getID()); // normally there is only one and only one first task
|
||||
|
||||
$task->getFromDBByRequest([
|
||||
'WHERE' => [
|
||||
'plugin_processmaker_cases_id' => $case->getID()
|
||||
],
|
||||
]);
|
||||
|
||||
|
||||
//$task->getFromDBByQuery(" WHERE `plugin_processmaker_cases_id`=".$case->getID()); // normally there is only one and only one first task
|
||||
//$link .= '&forcetab=PluginProcessmakerTask$'.$task->getID();
|
||||
Session::setActiveTab('PluginProcessmakerCase', 'PluginProcessmakerTask$'.$task->getID());
|
||||
|
||||
Session::setActiveTab('PluginProcessmakerCase', 'PluginProcessmakerTask$'.$task->fields['id']);
|
||||
$item = new $_POST['itemtype'];
|
||||
$item->getFromDB($_POST['items_id']);
|
||||
unset($_SERVER['REQUEST_URI']); // to prevent use of processmaker.form.php in NavigateList
|
||||
@@ -39,11 +45,18 @@ switch ($_POST["action"]) {
|
||||
Html::back();
|
||||
}
|
||||
} else { // the case is created before the ticket (used for post-only case creation before ticket creation)
|
||||
$pm_user_guid = PluginProcessmakerUser::getPMUserId( Session::getLoginUserID() );
|
||||
$resultCase = $PM_SOAP->newCase( $_POST['plugin_processmaker_processes_id'],
|
||||
[ 'GLPI_ITEM_CAN_BE_SOLVED' => 0,
|
||||
'GLPI_SELFSERVICE_CREATED' => '1',
|
||||
'GLPI_ITEM_TYPE' => 'Ticket',
|
||||
'GLPI_URL' => $CFG_GLPI['url_base']] );
|
||||
['GLPI_ITEM_CAN_BE_SOLVED' => 0,
|
||||
'GLPI_SELFSERVICE_CREATED' => '1',
|
||||
'GLPI_ITEM_TYPE' => 'Ticket',
|
||||
'GLPI_URL' => $CFG_GLPI['url_base'],
|
||||
// Specific to Tickets
|
||||
// GLPI_TICKET_TYPE will contains 1 (= incident) or 2 (= request)
|
||||
'GLPI_TICKET_TYPE' => $_POST['type'],
|
||||
'GLPI_ITEM_REQUESTER_GLPI_ID' => Session::getLoginUserID(),
|
||||
'GLPI_ITEM_REQUESTER_PM_ID' => $pm_user_guid
|
||||
] );
|
||||
if ($resultCase->status_code == 0) {
|
||||
// case is created
|
||||
// Must show it...
|
||||
|
||||
@@ -54,6 +54,7 @@ function processMakerShowCase($ID, $from_helpdesk) {
|
||||
|
||||
$rand = rand();
|
||||
|
||||
$PM_SOAP->echoDomain();
|
||||
echo "<script type='text/javascript' src='".$CFG_GLPI["root_doc"]."/plugins/processmaker/js/cases.helpdesk.js?rand=$rand'></script>";
|
||||
|
||||
$tkt = new Ticket;
|
||||
|
||||
177
hook.php
177
hook.php
@@ -24,66 +24,6 @@ function plugin_processmaker_MassiveActions($type) {
|
||||
}
|
||||
|
||||
|
||||
//function plugin_processmaker_MassiveActionsDisplay($options) {
|
||||
|
||||
// switch ($options['itemtype']) {
|
||||
// case 'PluginProcessmakerProcess' :
|
||||
// //case 'PluginProcessmakerCase' :
|
||||
// switch ($options['action']) {
|
||||
// case "plugin_processmaker_taskrefresh" :
|
||||
// //case "plugin_processmaker_purgecase" :
|
||||
// echo "<input type='submit' name='massiveaction' class='submit' ".
|
||||
// "value='".__('Post')."'>";
|
||||
// break;
|
||||
|
||||
// }
|
||||
// break;
|
||||
// }
|
||||
// return "";
|
||||
//}
|
||||
|
||||
|
||||
//function plugin_processmaker_MassiveActionsProcess($data) {
|
||||
|
||||
// switch ($data['action']) {
|
||||
|
||||
// case "plugin_processmaker_taskrefresh" :
|
||||
// if ($data['itemtype'] == 'PluginProcessmakerProcess') {
|
||||
// foreach ($data["item"] as $key => $val) {
|
||||
// if ($val == 1) {
|
||||
// $process = new PluginProcessmakerProcess;
|
||||
// $process->refreshTasks( array( 'id' => $key ) );
|
||||
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// break;
|
||||
// //case "plugin_processmaker_purgecase":
|
||||
// // if ($data['itemtype'] == 'PluginProcessmakerCase') {
|
||||
// // foreach ($data["item"] as $key => $val) {
|
||||
// // if ($val == 1) {
|
||||
// // $locCase= new PluginProcessmakerCase;
|
||||
// // //$locCase->( array( 'id' => $key ) );
|
||||
|
||||
// // }
|
||||
// // }
|
||||
// // }
|
||||
// // break;
|
||||
// //case 'plugin_processmaker_process_profile_delete' :
|
||||
// // if ($data['itemtype'] == 'PluginProcessmakerProcess_Profile') {
|
||||
// // foreach ($data["item"] as $key => $val) {
|
||||
// // if ($val == 1) {
|
||||
// // $process_profile = new PluginProcessmakerProcess_Profile;
|
||||
// // $process_profile->delete( array( 'id' => $key ), true );
|
||||
|
||||
// // }
|
||||
// // }
|
||||
// // }
|
||||
// // break;
|
||||
|
||||
// }
|
||||
//}
|
||||
|
||||
/**
|
||||
* Summary of plugin_processmaker_install
|
||||
* Creates tables and initializes tasks, "GLPI Requesters" group
|
||||
@@ -192,6 +132,7 @@ function plugin_pre_item_update_processmaker(CommonITILObject $parm) {
|
||||
switch ($key) {
|
||||
case 'global_validation' :
|
||||
$locVar[ 'GLPI_TICKET_GLOBAL_VALIDATION' ] = $val;
|
||||
$locVar[ 'GLPI_ITEM_GLOBAL_VALIDATION' ] = $val;
|
||||
break;
|
||||
case 'itilcategories_id' :
|
||||
$locVar[ 'GLPI_ITEM_ITIL_CATEGORY_ID' ] = $val;
|
||||
@@ -250,73 +191,6 @@ function plugin_item_update_processmaker_satisfaction($parm) {
|
||||
}
|
||||
}
|
||||
|
||||
///**
|
||||
// * Summary of plugin_pre_item_purge_processmaker
|
||||
// * @param mixed $parm is the object
|
||||
// */
|
||||
//function plugin_pre_item_purge_processmaker ( $parm ) {
|
||||
|
||||
// if ($parm->getType() == 'Ticket_User' && is_array( $parm->fields ) && isset( $parm->fields['type'] ) && $parm->fields['type'] == 2) {
|
||||
// $itemId = $parm->fields['tickets_id'];
|
||||
// $itemType = 'Ticket';
|
||||
// $technicians = PluginProcessmakerProcessmaker::getItemUsers( $itemType, $itemId, 2 ); // 2 for technicians
|
||||
|
||||
// if (PluginProcessmakerCase::getIDFromItem($itemType, $itemId) && count($technicians) == 1) {
|
||||
// $parm->input = null; // to cancel deletion of the last tech in the ticket
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
///**
|
||||
// * Summary of plugin_item_purge_processmaker
|
||||
// * @param mixed $parm is the object
|
||||
// */
|
||||
//function plugin_item_purge_processmaker($parm) {
|
||||
// global $DB, $PM_SOAP;
|
||||
|
||||
// //$objects = ['Ticket', 'Change', 'Problem'];
|
||||
// $object_users = ['Ticket_User', 'Change_User', 'Problem_User'];
|
||||
|
||||
// if (in_array($parm->getType(), $object_users) && is_array( $parm->fields ) && isset( $parm->fields['type'] ) && $parm->fields['type'] == 2) {
|
||||
|
||||
// // We just deleted a tech from this ticket then we must if needed "de-assign" the tasks assigned to this tech
|
||||
// // and re-assign them to the first tech in the list !!!!
|
||||
|
||||
// $itemType = strtolower(explode('_', $parm->getType())[0]); // $parm->getType() returns 'Ticket_User';
|
||||
// $itemId = $parm->fields[$itemType.'s_id'];
|
||||
// $cases = PluginProcessmakerCase::getIDsFromItem($itemType, $itemId);
|
||||
// foreach ($cases as $cases_id) {
|
||||
// // cases are existing for this item
|
||||
// $locCase = new PluginProcessmakerCase;
|
||||
// if ($locCase->getFromDB($cases_id)) {
|
||||
// $technicians = PluginProcessmakerProcessmaker::getItemUsers($itemType, $itemId, CommonITILActor::ASSIGN);
|
||||
|
||||
// $locVars = array( 'GLPI_TICKET_TECHNICIAN_GLPI_ID' => $technicians[0]['glpi_id'],
|
||||
// 'GLPI_ITEM_TECHNICIAN_GLPI_ID' => $technicians[0]['glpi_id'],
|
||||
// 'GLPI_TICKET_TECHNICIAN_PM_ID' => $technicians[0]['pm_id'],
|
||||
// 'GLPI_ITEM_TECHNICIAN_PM_ID' => $technicians[0]['pm_id']
|
||||
// );
|
||||
|
||||
// // and we must find all tasks assigned to this former user and re-assigned them to new user (if any :))!
|
||||
// $caseInfo = $locCase->getCaseInfo( );
|
||||
// if ($caseInfo !== false) {
|
||||
// $locCase->sendVariables( $locVars);
|
||||
// // need to get info on the thread of the GLPI current user
|
||||
// // we must retreive currentGLPI user from this array
|
||||
// $GLPICurrentPMUserId = PluginProcessmakerUser::getPMUserId( $parm->fields['users_id'] );
|
||||
// if (property_exists($caseInfo, 'currentUsers') && is_array( $caseInfo->currentUsers )) {
|
||||
// foreach ($caseInfo->currentUsers as $caseUser) {
|
||||
// if ($caseUser->userId == $GLPICurrentPMUserId && in_array( $caseUser->delThreadStatus, array('DRAFT', 'OPEN', 'PAUSE' ) )) {
|
||||
// $locCase->reassignCase($caseUser->delIndex, $caseUser->taskId, $caseUser->delThread, $parm->fields['users_id'], $technicians[0]['pm_id'] );
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
function plugin_processmaker_post_init() {
|
||||
global $PM_DB, $PM_SOAP;
|
||||
@@ -352,22 +226,26 @@ function plugin_processmaker_change_profile() {
|
||||
function plugin_item_update_processmaker_tasks($parm) {
|
||||
global $DB, $CFG_GLPI, $PM_SOAP;
|
||||
|
||||
// we need to test if a specific case is completed, and if so
|
||||
// we should complete the linked cases (via linked tickets)
|
||||
$pmTaskCat = new PluginProcessmakerTaskCategory;
|
||||
if ($pmTaskCat->getFromDBbyCategory( $parm->fields['taskcategories_id'] )
|
||||
&& in_array( 'state', $parm->updates )
|
||||
&& $parm->input['state'] == 2) { // the task has just been set to DONE state
|
||||
&& $parm->input['state'] == Planning::DONE
|
||||
&& $parm->oldvalues['state'] == Planning::TODO) { // the task has just been set to DONE state
|
||||
|
||||
$itemtype = str_replace( 'Task', '', $parm->getType() );
|
||||
//$itemtype = str_replace( 'Task', '', $parm->getType() );
|
||||
|
||||
$pmTask = new PluginProcessmakerTask($parm->getType());
|
||||
$pmTask->getFromDB($parm->fields['id']);
|
||||
|
||||
$locCase = new PluginProcessmakerCase;
|
||||
$locCase->getFromDB($pmTask->fields['plugin_processmaker_cases_id']); //Item($itemtype, $parm->fields['tickets_id']);
|
||||
$locCase->getFromDB($pmTask->fields['plugin_processmaker_cases_id']);
|
||||
$srccase_guid = $locCase->fields['case_guid'];
|
||||
|
||||
$msg = ' $locCase: '.str_replace("\n", "\n ", print_r($locCase, true))."\n";
|
||||
$msg .= ' $task: '.str_replace("\n", "\n ", print_r($parm, true))."\n";
|
||||
$msg .= ' $pmTask: '.str_replace("\n", "\n ", print_r($pmTask, true))."\n";
|
||||
$msg .= "\n";
|
||||
|
||||
foreach ($DB->request( 'glpi_plugin_processmaker_caselinks', "is_active = 1 AND sourcetask_guid='".$pmTaskCat->fields['pm_task_guid']."'") as $targetTask) {
|
||||
|
||||
// Must check the condition
|
||||
@@ -390,7 +268,7 @@ function plugin_item_update_processmaker_tasks($parm) {
|
||||
// must read some values
|
||||
$externalapplication = json_decode( $targetTask['externalapplication'], true );
|
||||
// must be of the form
|
||||
// {"method":"POST","url":"http://arsupd201.ar.ray.group:8000/search_by_userid/","params":{"user":"@@USER_ID","system":"GPP","list":"@@ROLE_LIST"}}
|
||||
// {"method":"POST","url":"urloftheservice","params":json_object}
|
||||
// Where method is the POST, GET, ... method
|
||||
// url is the URL to be called
|
||||
// params is a list of parameters to get from running case
|
||||
@@ -410,9 +288,20 @@ function plugin_item_update_processmaker_tasks($parm) {
|
||||
$infoForTasks[ "@@$casevar" ] = "'$varval'";
|
||||
unset( $infoForTasks[ $casevar ] );
|
||||
}
|
||||
|
||||
$msg .= " ***********\n";
|
||||
$msg .= ' $targetTask: '.str_replace("\n", "\n ", print_r($targetTask, true))."\n";
|
||||
|
||||
$targetTask['sourcecondition'] = str_replace( array_keys($infoForTasks), $infoForTasks, $targetTask['sourcecondition'] );
|
||||
|
||||
if (eval( "return ".$targetTask['sourcecondition'].";" )) {
|
||||
$eval = eval( "return (".$targetTask['sourcecondition']." ? 1 : 0);" );
|
||||
|
||||
$msg .= ' $infoForTasks: '.str_replace("\n", "\n ", print_r($infoForTasks, true))."\n";
|
||||
$msg .= ' $targetTask[\'sourcecondition\']: '.str_replace("\n", "\n ", print_r($targetTask['sourcecondition'], true))."\n";
|
||||
$msg .= ' $result: '."$eval\n";
|
||||
$msg .= "\n";
|
||||
|
||||
if ($eval) {
|
||||
// look at each linked ticket if a case is attached and then if a task like $val is TO_DO
|
||||
// then will try to routeCase for each tasks in $val
|
||||
|
||||
@@ -436,9 +325,13 @@ function plugin_item_update_processmaker_tasks($parm) {
|
||||
$ch = curl_init();
|
||||
$externalapplication['url'] = eval( "return '".str_replace( array_keys($infoForTasks), $infoForTasks, $externalapplication['url'])."' ;" ); // '???
|
||||
curl_setopt($ch, CURLOPT_URL, $externalapplication['url'] );
|
||||
if (isset($externalapplication['method']) && $externalapplication['method'] == 'POST') {
|
||||
curl_setopt($ch, CURLOPT_POST, 1);
|
||||
}
|
||||
}
|
||||
|
||||
if ($targetTask['is_self']) {
|
||||
$PM_SOAP->login(true);
|
||||
$taskCase = $PM_SOAP->taskCase( $srccase_guid );
|
||||
foreach ($taskCase as $task) {
|
||||
// search for target task guid
|
||||
@@ -446,6 +339,7 @@ function plugin_item_update_processmaker_tasks($parm) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
$PM_SOAP->login();
|
||||
|
||||
$postdata['APP_UID'] = $srccase_guid;
|
||||
$postdata['DEL_INDEX'] = $task->delegate;
|
||||
@@ -470,20 +364,22 @@ function plugin_item_update_processmaker_tasks($parm) {
|
||||
if ($externalapplication) {
|
||||
// must call external application in order to get the needed data asynchroneously
|
||||
// must be of the form
|
||||
// {"url":"http://arsupd201.ar.ray.group:8000/search_by_userid/","params":{"user":"@@USER_ID","system":"GPP","list":"@@ROLE_LIST"}}
|
||||
// {"url":"urloftheservice","params":{"user":"@@USER_ID","system":"GPP","list":"@@ROLE_LIST"}}
|
||||
// url is the URL to be called
|
||||
|
||||
$externalapplicationparams['id'] = $cronaction->getID();
|
||||
|
||||
$externalapplicationparams = json_encode( $externalapplicationparams, JSON_HEX_APOS | JSON_HEX_QUOT);
|
||||
|
||||
curl_setopt($ch, CURLOPT_POST, 1);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $externalapplicationparams);
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json', 'Content-Length: ' . strlen($externalapplicationparams), 'Expect:']);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1 );
|
||||
curl_setopt($ch, CURLOPT_VERBOSE, 1);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $pmconfig->fields['ssl_verify']);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, $pmconfig->fields['ssl_verify']);
|
||||
|
||||
//curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1 ) ;
|
||||
//curl_setopt($ch, CURLOPT_PROXY, "localhost:8889");
|
||||
//curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1 ) ;
|
||||
//curl_setopt($ch, CURLOPT_PROXY, "localhost:8889");
|
||||
|
||||
$response = curl_exec ($ch);
|
||||
|
||||
@@ -493,6 +389,7 @@ function plugin_item_update_processmaker_tasks($parm) {
|
||||
}
|
||||
// }
|
||||
} else {
|
||||
// TODO to review this part of code as it is no longer usable like this !!!
|
||||
foreach (Ticket_Ticket::getLinkedTicketsTo( $parm->fields['tickets_id'] ) as $tlink) {
|
||||
if ($tlink['link'] == Ticket_Ticket::LINK_TO) {
|
||||
$query = "SELECT glpi_plugin_processmaker_cases.id, MAX(glpi_plugin_processmaker_tasks.del_index) AS del_index FROM glpi_tickettasks
|
||||
@@ -531,5 +428,9 @@ function plugin_item_update_processmaker_tasks($parm) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$msg .= "================\n";
|
||||
Toolbox::logInFile("processmaker", $msg);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -10,13 +10,14 @@
|
||||
*/
|
||||
class PluginProcessmakerCasechangelog extends CommonDBTM {
|
||||
|
||||
static function displayTabContentForItem(CommonGLPI $case, $tabnum=1, $withtemplate=0) {
|
||||
static function displayTabContentForItem(CommonGLPI $case, $tabnum = 1, $withtemplate = 0) {
|
||||
global $CFG_GLPI, $PM_SOAP;
|
||||
|
||||
$rand = rand();
|
||||
|
||||
$caseHistoryURL = $PM_SOAP->serverURL."/cases/ajaxListener?action=changeLogHistory&rand=$rand";
|
||||
|
||||
$PM_SOAP->echoDomain();
|
||||
echo "<script type='text/javascript' src='".$CFG_GLPI["root_doc"]."/plugins/processmaker/js/cases.js'></script>"; //?rand=$rand'
|
||||
|
||||
$iframe = "<iframe
|
||||
@@ -27,11 +28,11 @@ class PluginProcessmakerCasechangelog extends CommonDBTM {
|
||||
onload=\"onOtherFrameLoad( 'caseChangeLogHistory', 'caseiframe-caseChangeLogHistory', 'body', 0 );\">
|
||||
</iframe>";
|
||||
|
||||
$PM_SOAP->initCaseAndShowTab(['APP_UID' => $case->fields['case_guid'], 'DEL_INDEX' => 1], $iframe, $rand) ;
|
||||
$PM_SOAP->initCaseAndShowTab(['APP_UID' => $case->fields['case_guid'], 'DEL_INDEX' => 1], $iframe, $rand);
|
||||
|
||||
}
|
||||
|
||||
function getTabNameForItem(CommonGLPI $case, $withtemplate = 0){
|
||||
function getTabNameForItem(CommonGLPI $case, $withtemplate = 0) {
|
||||
return __('Change log', 'processmaker');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ class PluginProcessmakerCasedynaform extends CommonDBTM {
|
||||
$proj = new PluginProcessmakerProcess;
|
||||
$proj->getFromDB($case->fields['plugin_processmaker_processes_id']);
|
||||
|
||||
$PM_SOAP->echoDomain();
|
||||
echo "<script type='text/javascript' src='".$CFG_GLPI["root_doc"]."/plugins/processmaker/js/cases.js'></script>"; //?rand=$rand'
|
||||
|
||||
echo "<script type='text/javascript'>
|
||||
@@ -37,7 +38,7 @@ class PluginProcessmakerCasedynaform extends CommonDBTM {
|
||||
$.ajax( { url: '".$PM_SOAP->serverURL."/cases/cases_Open?sid=".$PM_SOAP->getPMSessionID()."&APP_UID={$case->fields['case_guid']}&DEL_INDEX=1&action=TO_DO&glpi_init_case=1&glpi_domain={$config->fields['domain']}',
|
||||
xhrFields: { withCredentials: true },
|
||||
cache: false,
|
||||
crossDomain: true,
|
||||
crossDomain: true,
|
||||
success: function(jqXHR) {
|
||||
//debugger;
|
||||
loctabs.append( '<div id=\'' + name + '\'>' + html + '</div>');
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* @author MoronO
|
||||
*/
|
||||
class PluginProcessmakerCasehistory extends CommonDBTM {
|
||||
static function displayTabContentForItem(CommonGLPI $case, $tabnum=1, $withtemplate=0) {
|
||||
static function displayTabContentForItem(CommonGLPI $case, $tabnum = 1, $withtemplate = 0) {
|
||||
global $CFG_GLPI, $PM_SOAP;
|
||||
|
||||
$rand = rand();
|
||||
@@ -17,6 +17,7 @@ class PluginProcessmakerCasehistory extends CommonDBTM {
|
||||
$caseHistoryURL = $PM_SOAP->serverURL
|
||||
."/cases/ajaxListener?action=caseHistory&rand=$rand";
|
||||
|
||||
$PM_SOAP->echoDomain();
|
||||
echo "<script type='text/javascript' src='".$CFG_GLPI["root_doc"]."/plugins/processmaker/js/cases.js'></script>";
|
||||
|
||||
$iframe = "<iframe
|
||||
@@ -27,11 +28,11 @@ class PluginProcessmakerCasehistory extends CommonDBTM {
|
||||
onload=\"onOtherFrameLoad( 'caseHistory', 'caseiframe-caseHistory', 'body', 0 );\">
|
||||
</iframe>";
|
||||
|
||||
$PM_SOAP->initCaseAndShowTab(['APP_UID' => $case->fields['case_guid'], 'DEL_INDEX' => 1], $iframe, $rand) ;
|
||||
$PM_SOAP->initCaseAndShowTab(['APP_UID' => $case->fields['case_guid'], 'DEL_INDEX' => 1], $iframe, $rand);
|
||||
|
||||
}
|
||||
|
||||
function getTabNameForItem(CommonGLPI $case, $withtemplate = 0){
|
||||
function getTabNameForItem(CommonGLPI $case, $withtemplate = 0) {
|
||||
return __('History', 'processmaker');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,136 +148,127 @@ class PluginProcessmakerCaselink extends CommonDBTM {
|
||||
|
||||
|
||||
/**
|
||||
* Summary of getSearchOptions
|
||||
* Summary of rawSearchOptions
|
||||
* @return mixed
|
||||
*/
|
||||
function getSearchOptions() {
|
||||
function rawSearchOptions() {
|
||||
$tab = [];
|
||||
|
||||
$tab['common'] = __('ProcessMaker', 'processmaker');
|
||||
$tab[] = [
|
||||
'id' => 'common',
|
||||
'name' => __('ProcessMaker', 'processmaker')
|
||||
];
|
||||
|
||||
$tab[1]['table'] = $this->getTable();
|
||||
$tab[1]['field'] = 'name';
|
||||
$tab[1]['name'] = __('Name');
|
||||
$tab[1]['datatype'] = 'itemlink';
|
||||
$tab[1]['itemlink_type'] = $this->getType();
|
||||
$tab[] = [
|
||||
'id' => '1',
|
||||
'table' => $this->getTable(),
|
||||
'field' => 'name',
|
||||
'name' => __('Name'),
|
||||
'datatype' => 'itemlink',
|
||||
'itemlink_type' => 'PluginProcessmakerCaselink',
|
||||
'massiveaction' => false
|
||||
];
|
||||
|
||||
$tab[8]['table'] = $this->getTable();
|
||||
$tab[8]['field'] = 'is_active';
|
||||
$tab[8]['name'] = __('Active');
|
||||
$tab[8]['massiveaction'] = true;
|
||||
$tab[8]['datatype'] = 'bool';
|
||||
$tab[] = [
|
||||
'id' => '8',
|
||||
'table' => $this->getTable(),
|
||||
'field' => 'is_active',
|
||||
'name' => __('Active'),
|
||||
'massiveaction' => true,
|
||||
'datatype' => 'bool'
|
||||
];
|
||||
|
||||
$tab[9]['table'] = $this->getTable();
|
||||
$tab[9]['field'] = 'date_mod';
|
||||
$tab[9]['name'] = __('Last update');
|
||||
$tab[9]['massiveaction'] = false;
|
||||
$tab[9]['datatype'] = 'datetime';
|
||||
$tab[] = [
|
||||
'id' => '9',
|
||||
'table' => $this->getTable(),
|
||||
'field' => 'date_mod',
|
||||
'name' => __('Last update'),
|
||||
'massiveaction' => false,
|
||||
'datatype' => 'datetime'
|
||||
];
|
||||
|
||||
$tab[10]['table'] = $this->getTable();
|
||||
$tab[10]['field'] = 'is_externaldata';
|
||||
$tab[10]['name'] = __('External data', 'processmaker');
|
||||
$tab[10]['massiveaction'] = false;
|
||||
$tab[10]['datatype'] = 'bool';
|
||||
$tab[] = [
|
||||
'id' => '10',
|
||||
'table' => $this->getTable(),
|
||||
'field' => 'is_externaldata',
|
||||
'name' => __('External data', 'processmaker'),
|
||||
'massiveaction' => false,
|
||||
'datatype' => 'bool'
|
||||
];
|
||||
|
||||
$tab[11]['table'] = $this->getTable();
|
||||
$tab[11]['field'] = 'is_self';
|
||||
$tab[11]['name'] = __('Self', 'processmaker');
|
||||
$tab[11]['massiveaction'] = false;
|
||||
$tab[11]['datatype'] = 'bool';
|
||||
$tab[] = [
|
||||
'id' => '11',
|
||||
'table' => $this->getTable(),
|
||||
'field' => 'is_self',
|
||||
'name' => __('Self', 'processmaker'),
|
||||
'massiveaction' => false,
|
||||
'datatype' => 'bool'
|
||||
];
|
||||
|
||||
$tab[12]['table'] = $this->getTable();
|
||||
$tab[12]['field'] = 'is_targettoclaim';
|
||||
$tab[12]['name'] = __('Claim target task', 'processmaker');
|
||||
$tab[12]['massiveaction'] = false;
|
||||
$tab[12]['datatype'] = 'bool';
|
||||
$tab[] = [
|
||||
'id' => '12',
|
||||
'table' => $this->getTable(),
|
||||
'field' => 'is_targettoclaim',
|
||||
'name' => __('Claim target task', 'processmaker'),
|
||||
'massiveaction' => false,
|
||||
'datatype' => 'bool'
|
||||
];
|
||||
|
||||
$tab[13]['table'] = $this->getTable();
|
||||
$tab[13]['field'] = 'externalapplication';
|
||||
$tab[13]['name'] = __('External application JSON config', 'processmaker');
|
||||
$tab[13]['massiveaction'] = false;
|
||||
$tab[13]['datatype'] = 'text';
|
||||
$tab[] = [
|
||||
'id' => '13',
|
||||
'table' => $this->getTable(),
|
||||
'field' => 'externalapplication',
|
||||
'name' => __('External application JSON config', 'processmaker'),
|
||||
'massiveaction' => false,
|
||||
'datatype' => 'text'
|
||||
];
|
||||
|
||||
$tab[14]['table'] = $this->getTable();
|
||||
$tab[14]['field'] = 'sourcetask_guid';
|
||||
$tab[14]['name'] = __('Source task GUID', 'processmaker');
|
||||
$tab[14]['massiveaction'] = false;
|
||||
$tab[14]['datatype'] = 'text';
|
||||
$tab[] = [
|
||||
'id' => '14',
|
||||
'table' => $this->getTable(),
|
||||
'field' => 'sourcetask_guid',
|
||||
'name' => __('Source task GUID', 'processmaker'),
|
||||
'massiveaction' => false,
|
||||
'datatype' => 'text'
|
||||
];
|
||||
|
||||
$tab[15]['table'] = $this->getTable();
|
||||
$tab[15]['field'] = 'targettask_guid';
|
||||
$tab[15]['name'] = __('Target task GUID', 'processmaker');
|
||||
$tab[15]['massiveaction'] = false;
|
||||
$tab[15]['datatype'] = 'text';
|
||||
$tab[] = [
|
||||
'id' => '15',
|
||||
'table' => $this->getTable(),
|
||||
'field' => 'targettask_guid',
|
||||
'name' => __('Target task GUID', 'processmaker'),
|
||||
'massiveaction' => false,
|
||||
'datatype' => 'text'
|
||||
];
|
||||
|
||||
$tab[16]['table'] = $this->getTable();
|
||||
$tab[16]['field'] = 'targetdynaform_guid';
|
||||
$tab[16]['name'] = __('Target dynaform GUID', 'processmaker');
|
||||
$tab[16]['massiveaction'] = false;
|
||||
$tab[16]['datatype'] = 'text';
|
||||
$tab[] = [
|
||||
'id' => '16',
|
||||
'table' => $this->getTable(),
|
||||
'field' => 'targetdynaform_guid',
|
||||
'name' => __('Target dynaform GUID', 'processmaker'),
|
||||
'massiveaction' => false,
|
||||
'datatype' => 'text'
|
||||
];
|
||||
|
||||
$tab[17]['table'] = $this->getTable();
|
||||
$tab[17]['field'] = 'targetprocess_guid';
|
||||
$tab[17]['name'] = __('Target process GUID', 'processmaker');
|
||||
$tab[17]['massiveaction'] = false;
|
||||
$tab[17]['datatype'] = 'text';
|
||||
$tab[] = [
|
||||
'id' => '17',
|
||||
'table' => $this->getTable(),
|
||||
'field' => 'targetprocess_guid',
|
||||
'name' => __('Target process GUID', 'processmaker'),
|
||||
'massiveaction' => false,
|
||||
'datatype' => 'text'
|
||||
];
|
||||
|
||||
$tab[18]['table'] = $this->getTable();
|
||||
$tab[18]['field'] = 'sourcecondition';
|
||||
$tab[18]['name'] = __('Source condition', 'processmaker');
|
||||
$tab[18]['massiveaction'] = false;
|
||||
$tab[18]['datatype'] = 'text';
|
||||
|
||||
//$tab[14]['table'] = 'glpi_taskcategories';
|
||||
//$tab[14]['field'] = 'completename'; //'plugin_processmaker_taskcategories_id_source';
|
||||
//$tab[14]['name'] = __('Source task');
|
||||
//$tab[14]['massiveaction'] = false;
|
||||
//$tab[14]['datatype'] = 'dropdown';
|
||||
//$tab[14]['forcegroupby'] = true;
|
||||
//$tab[14]['joinparams'] =
|
||||
// [
|
||||
// 'beforejoin' => [
|
||||
// 'table' => 'glpi_plugin_processmaker_taskcategories',
|
||||
// 'joinparams' => [
|
||||
// 'beforejoin' => [
|
||||
// 'table' => 'glpi_plugin_processmaker_caselinks'
|
||||
// ]
|
||||
// ]
|
||||
// ]
|
||||
// ];
|
||||
$tab[] = [
|
||||
'id' => '18',
|
||||
'table' => $this->getTable(),
|
||||
'field' => 'sourcecondition',
|
||||
'name' => __('Source condition', 'processmaker'),
|
||||
'massiveaction' => false,
|
||||
'datatype' => 'text'
|
||||
];
|
||||
|
||||
return $tab;
|
||||
}
|
||||
|
||||
//static function getMenuContent() {
|
||||
|
||||
// if (!Session::haveRight('entity', READ)) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// $front_page = "/plugins/processmaker/front";
|
||||
// $menu = array();
|
||||
// //$menu['title'] = self::getMenuName();
|
||||
// //$menu['page'] = "$front_page/caselink.php";
|
||||
|
||||
// $itemtypes = array('PluginProcessmakerCaselink' => 'processmakercaselinks');
|
||||
|
||||
// foreach ($itemtypes as $itemtype => $option) {
|
||||
// $menu['options'][$option]['title'] = $itemtype::getTypeName(Session::getPluralNumber());
|
||||
// switch( $itemtype ) {
|
||||
// case 'PluginProcessmakerCaselink':
|
||||
// $menu['options'][$option]['page'] = $itemtype::getSearchURL(false);
|
||||
// $menu['options'][$option]['links']['search'] = $itemtype::getSearchURL(false);
|
||||
// if ($itemtype::canCreate()) {
|
||||
// $menu['options'][$option]['links']['add'] = $itemtype::getFormURL(false);
|
||||
// }
|
||||
// break ;
|
||||
// default :
|
||||
// $menu['options'][$option]['page'] = PluginProcessmakerCaselink::getSearchURL(false);
|
||||
// break ;
|
||||
// }
|
||||
|
||||
// }
|
||||
// return $menu;
|
||||
//}
|
||||
}
|
||||
|
||||
@@ -9,4 +9,4 @@
|
||||
* @author MoronO
|
||||
*/
|
||||
class PluginProcessmakerCaselinkaction extends CommonDBTM {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*/
|
||||
class PluginProcessmakerCasemap extends CommonDBTM {
|
||||
|
||||
static function displayTabContentForItem(CommonGLPI $case, $tabnum=1, $withtemplate=0) {
|
||||
static function displayTabContentForItem(CommonGLPI $case, $tabnum = 1, $withtemplate = 0) {
|
||||
global $CFG_GLPI, $PM_SOAP;
|
||||
|
||||
$rand = rand();
|
||||
@@ -26,6 +26,7 @@ class PluginProcessmakerCasemap extends CommonDBTM {
|
||||
"/cases/ajaxListener?action=processMap"
|
||||
)."&rand=$rand";
|
||||
|
||||
$PM_SOAP->echoDomain();
|
||||
echo "<script type='text/javascript' src='".$CFG_GLPI["root_doc"]."/plugins/processmaker/js/cases.js'></script>"; //?rand=$rand'
|
||||
|
||||
$iframe = "<iframe
|
||||
@@ -35,12 +36,12 @@ class PluginProcessmakerCasemap extends CommonDBTM {
|
||||
onload=\"onOtherFrameLoad( 'caseMap', 'caseiframe-caseMap', 'body', ".($project_type=='bpmn' ? "true" : "false" )." );\">
|
||||
</iframe>";
|
||||
|
||||
$PM_SOAP->initCaseAndShowTab(['APP_UID' => $case->fields['case_guid'], 'DEL_INDEX' => 1], $iframe, $rand) ;
|
||||
$PM_SOAP->initCaseAndShowTab(['APP_UID' => $case->fields['case_guid'], 'DEL_INDEX' => 1], $iframe, $rand);
|
||||
|
||||
}
|
||||
|
||||
function getTabNameForItem(CommonGLPI $case, $withtemplate = 0){
|
||||
function getTabNameForItem(CommonGLPI $case, $withtemplate = 0) {
|
||||
return __('Map', 'processmaker');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,8 +158,9 @@ class PluginProcessmakerConfig extends CommonDBTM {
|
||||
echo "<tr class='tab_bg_1'>";
|
||||
echo "<td >".__('Server URL (must be in same domain than GLPI)', 'processmaker')."</td><td >";
|
||||
echo "<input size='50' type='text' name='pm_server_URL' value='".$config->fields['pm_server_URL']."'>";
|
||||
echo "</td>";
|
||||
echo "</td></tr>\n";
|
||||
|
||||
echo "<tr class='tab_bg_1'>";
|
||||
echo "<td>".__('Common domain with GLPI', 'processmaker')."</td>";
|
||||
echo "<td><font color='red'><div name='domain'>".$config->fields['domain']."</div></font>";
|
||||
|
||||
@@ -315,24 +316,29 @@ class PluginProcessmakerConfig extends CommonDBTM {
|
||||
} else {
|
||||
echo "<font color='red'>".__('Not connected');
|
||||
}
|
||||
|
||||
echo "</td></tr>\n";
|
||||
|
||||
echo "<tr class='tab_bg_1'>";
|
||||
echo "<td >" . __('Max cases per item (0=unlimited)', 'processmaker') . "</td>";
|
||||
echo "<td ><input type='text' name='max_cases_per_item' value='".$config->fields["max_cases_per_item"]."'>";
|
||||
echo "</td></tr>\n";
|
||||
|
||||
} else {
|
||||
echo "<tr><td colspan='4' class='center b'>";
|
||||
PluginProcessmakerProcessmaker::showUnderMaintenance();
|
||||
echo "</td></tr>";
|
||||
}
|
||||
|
||||
echo "<tr><td colspan='4' class='center b'>".__('Maintenance')."</td></tr>";
|
||||
echo "<tr><td colspan='4' class='center b'>".__('Maintenance')."</td></tr>";
|
||||
|
||||
echo "<tr class='tab_bg_1'>";
|
||||
echo "<td >".__('Maintenance mode')."</td><td >";
|
||||
Dropdown::showYesNo("maintenance", $config->fields['maintenance']);
|
||||
echo "</td></tr>";
|
||||
echo "<tr class='tab_bg_1'>";
|
||||
echo "<td >".__('Maintenance mode')."</td><td >";
|
||||
Dropdown::showYesNo("maintenance", $config->fields['maintenance']);
|
||||
echo "</td></tr>";
|
||||
|
||||
echo "<tr><td colspan='4'></td></tr>";
|
||||
echo "<tr><td colspan='4'></td></tr>";
|
||||
|
||||
echo "<tr><th colspan='4'>".__('Processmaker system information', 'processmaker')."</th></tr>";
|
||||
echo "<tr><th colspan='4'>".__('Processmaker system information', 'processmaker')."</th></tr>";
|
||||
if ($setup_ok) {
|
||||
$info = $PM_SOAP->systemInformation( );
|
||||
echo '<tr><td>'.__('Version', 'processmaker').'</td><td>'.$info->version.'</td></tr>';
|
||||
@@ -347,7 +353,7 @@ class PluginProcessmakerConfig extends CommonDBTM {
|
||||
} else {
|
||||
echo '<tr><td>'.__('Version', 'processmaker').'</td><td>'.__('Not yet!', 'processmaker').'</td></tr>';
|
||||
}
|
||||
$config->showFormButtons(['candel'=>false]);
|
||||
$config->showFormButtons(['candel' => false]);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -170,9 +170,14 @@ class PluginProcessmakerProcess_Profile extends CommonDBTM
|
||||
*/
|
||||
function prepareInputForAdd($input) {
|
||||
$tmp = new self;
|
||||
if ($tmp->getFromDBByQuery(" WHERE `plugin_processmaker_processes_id` = ".$input['plugin_processmaker_processes_id']."
|
||||
AND `entities_id` = ".$input['entities_id']."
|
||||
AND `profiles_id` = ".$input['profiles_id'])) {
|
||||
$restrict=[
|
||||
'WHERE' => [
|
||||
'plugin_processmaker_processes_id' => $input['plugin_processmaker_processes_id'],
|
||||
'entities_id' => $input['entities_id'],
|
||||
'profiles_id' => $input['profiles_id']
|
||||
],
|
||||
];
|
||||
if ($tmp->getFromDBByRequest($restrict)) {
|
||||
//// then update existing
|
||||
//$tmp->update(['id' => $tmp->getID(),
|
||||
// 'is_recursive' => $input['is_recursive']]);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -10,4 +10,4 @@
|
||||
*/
|
||||
class PluginProcessmakerSelfservicedraft extends CommonDBTM {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,13 @@ class PluginProcessmakerTask extends CommonITILTask
|
||||
function getFromDB($items_id) {
|
||||
global $DB;
|
||||
|
||||
if ($this->getFromDBByQuery(" WHERE itemtype='".$this->itemtype."' AND items_id=$items_id;" )) {
|
||||
//if ($this->getFromDBByQuery(" WHERE itemtype='".$this->itemtype."' AND items_id=$items_id;" )) {
|
||||
if ($this->getFromDBByRequest([
|
||||
'WHERE' => [
|
||||
'itemtype' => $this->itemtype,
|
||||
'items_id' => $items_id
|
||||
],
|
||||
])) {
|
||||
$task = new $this->itemtype;
|
||||
if ($task->getFromDB( $items_id )) {
|
||||
// then we should add our own fields
|
||||
@@ -306,7 +312,11 @@ class PluginProcessmakerTask extends CommonITILTask
|
||||
$rand = rand();
|
||||
|
||||
// get infos for the current task
|
||||
$task = $dbu->getAllDataFromTable('glpi_plugin_processmaker_tasks', "id = $tabnum");
|
||||
$restrict = [
|
||||
"id" => $tabnum
|
||||
];
|
||||
//$task = $dbu->getAllDataFromTable('glpi_plugin_processmaker_tasks', "id = $tabnum");
|
||||
$task = $dbu->getAllDataFromTable('glpi_plugin_processmaker_tasks', $restrict);
|
||||
|
||||
// shows the re-assign form
|
||||
$caseInfo = $case->getCaseInfo();
|
||||
@@ -347,6 +357,7 @@ class PluginProcessmakerTask extends CommonITILTask
|
||||
}
|
||||
}
|
||||
|
||||
$PM_SOAP->echoDomain();
|
||||
echo "<script type='text/javascript' src='".$CFG_GLPI["root_doc"]."/plugins/processmaker/js/cases.js'></script>";
|
||||
|
||||
$csrf = Session::getNewCSRFToken();
|
||||
|
||||
@@ -86,11 +86,11 @@ class PluginProcessmakerTaskCategory extends CommonDBTM
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Print a good title for task categories tab
|
||||
* add button for re-synchro of taskcategory list (only if rigths are w)
|
||||
* @return nothing (display)
|
||||
**/
|
||||
/**
|
||||
* Print a good title for task categories tab
|
||||
* add button for re-synchro of taskcategory list (only if rigths are w)
|
||||
* @return nothing (display)
|
||||
**/
|
||||
static function title(CommonGLPI $item) {
|
||||
global $CFG_GLPI;
|
||||
|
||||
@@ -99,26 +99,22 @@ class PluginProcessmakerTaskCategory extends CommonDBTM
|
||||
|
||||
if (Session::haveRight('plugin_processmaker_config', UPDATE)) {
|
||||
$buttons["process.form.php?refreshtask=1&id=".$item->getID()] = $title;
|
||||
Html::displayTitle($CFG_GLPI["root_doc"] . "/plugins/processmaker/pics/gears.png", $title, "",
|
||||
$buttons);
|
||||
$pic = $CFG_GLPI["root_doc"] . "/plugins/processmaker/pics/gears.png";
|
||||
if ($item->fields['maintenance']) {
|
||||
$pic = $CFG_GLPI["root_doc"] . "/plugins/processmaker/pics/verysmall-under_maintenance.png";
|
||||
}
|
||||
Html::displayTitle($pic, $title, "", $buttons);
|
||||
}
|
||||
}
|
||||
|
||||
//function getLinkItemFromExternalID($extId) {
|
||||
// if( $this->getFromDBbyExternalID( $extId ) ) {
|
||||
// $taskcat = new TaskCategory ;
|
||||
// return $taskcat->getFromDB( $this->fields['items_id'] ) ;
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
/**
|
||||
* Retrieve a TaskCat from the database using its external id (unique index): pm_task_guid
|
||||
*
|
||||
* @param $task_guid string externalid
|
||||
*
|
||||
* @return true if succeed else false
|
||||
**/
|
||||
/**
|
||||
* Retrieve a TaskCat from the database using its external id (unique index): pm_task_guid
|
||||
*
|
||||
* @param $task_guid string externalid
|
||||
*
|
||||
* @return true if succeed else false
|
||||
**/
|
||||
function getFromGUID($task_guid) {
|
||||
global $DB;
|
||||
|
||||
|
||||
@@ -178,9 +178,14 @@ class PluginProcessmakerUser extends CommonDBTM {
|
||||
*/
|
||||
public static function getGLPIUserId($pmUserId) {
|
||||
$obj = new self;
|
||||
if ($obj->getFromDBByQuery("WHERE `pm_users_id` = '$pmUserId'")) {
|
||||
if ($obj->getFromDBByRequest([
|
||||
'WHERE' => [
|
||||
'pm_users_id' => $pmUserId
|
||||
],
|
||||
])) {
|
||||
return $obj->fields['id'];
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,27 +4,7 @@ function processmaker_install() {
|
||||
global $DB;
|
||||
|
||||
// installation from scratch
|
||||
include_once(GLPI_ROOT."/plugins/processmaker/setup.php");
|
||||
$info = plugin_version_processmaker();
|
||||
switch ($info['version']) {
|
||||
case '3.3.0' :
|
||||
$version = '3.3.0';
|
||||
break;
|
||||
case '3.3.1' :
|
||||
case '3.3.2' :
|
||||
case '3.3.3' :
|
||||
case '3.3.4' :
|
||||
case '3.3.5' :
|
||||
case '3.3.6' :
|
||||
case '3.3.7' :
|
||||
$version = '3.3.1';
|
||||
break;
|
||||
case '3.3.8' :
|
||||
default :
|
||||
$version = '3.3.8';
|
||||
break;
|
||||
}
|
||||
$DB->runFile(GLPI_ROOT . "/plugins/processmaker/install/mysql/$version-empty.sql");
|
||||
$DB->runFile(GLPI_ROOT . "/plugins/processmaker/install/mysql/processmaker-empty.sql");
|
||||
|
||||
// add configuration singleton
|
||||
$query = "INSERT INTO `glpi_plugin_processmaker_configs` (`id`) VALUES (1);";
|
||||
|
||||
@@ -1,167 +0,0 @@
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET NAMES utf8 */;
|
||||
/*!50503 SET NAMES utf8mb4 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_caselinkactions
|
||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_caselinkactions` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`plugin_processmaker_caselinks_id` int(11) DEFAULT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`value` text,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `caselinks_id_name` (`plugin_processmaker_caselinks_id`,`name`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_caselinks
|
||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_caselinks` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`is_active` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`is_externaldata` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0:insert data from case,1:wait for external application to set datas',
|
||||
`is_self` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0:use linked tickets, 1:use self',
|
||||
`sourcetask_guid` varchar(32) DEFAULT NULL,
|
||||
`targettask_guid` varchar(32) DEFAULT NULL,
|
||||
`targetprocess_guid` varchar(32) DEFAULT NULL,
|
||||
`targetdynaform_guid` varchar(32) DEFAULT NULL,
|
||||
`sourcecondition` text,
|
||||
`is_targettoclaim` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`externalapplication` text,
|
||||
`date_mod` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `is_active` (`is_active`),
|
||||
KEY `is_externaldata` (`is_externaldata`),
|
||||
KEY `is_self` (`is_self`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_cases
|
||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_cases` (
|
||||
`id` varchar(32) NOT NULL,
|
||||
`items_id` int(11) NOT NULL,
|
||||
`itemtype` varchar(10) NOT NULL DEFAULT 'Ticket',
|
||||
`case_num` int(11) NOT NULL,
|
||||
`case_status` varchar(20) NOT NULL DEFAULT 'DRAFT',
|
||||
`processes_id` int(11) DEFAULT NULL,
|
||||
UNIQUE KEY `items` (`itemtype`,`items_id`),
|
||||
KEY `case_status` (`case_status`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_configs
|
||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_configs` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(50) NOT NULL DEFAULT 'ProcessMaker',
|
||||
`pm_server_URL` varchar(250) NOT NULL DEFAULT 'http://localhost/',
|
||||
`pm_workspace` varchar(50) NOT NULL DEFAULT 'workflow',
|
||||
`pm_admin_user` varchar(255) DEFAULT NULL,
|
||||
`pm_admin_passwd` varchar(255) DEFAULT NULL,
|
||||
`pm_theme` varchar(50) NOT NULL DEFAULT 'glpi_classic',
|
||||
`date_mod` timestamp NULL DEFAULT NULL,
|
||||
`taskcategories_id` int(11) DEFAULT NULL,
|
||||
`users_id` int(11) DEFAULT NULL,
|
||||
`pm_group_guid` varchar(32) DEFAULT NULL,
|
||||
`comment` text,
|
||||
`pm_dbserver_name` varchar(255) DEFAULT 'localhost',
|
||||
`pm_dbname` varchar(50) DEFAULT 'wf_workflow',
|
||||
`pm_dbserver_user` varchar(255) DEFAULT NULL,
|
||||
`pm_dbserver_passwd` varchar(255) DEFAULT NULL,
|
||||
`domain` varchar(50) DEFAULT '',
|
||||
`maintenance` tinyint(1) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_crontaskactions
|
||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_crontaskactions` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`plugin_processmaker_caselinks_id` int(11) DEFAULT NULL,
|
||||
`itemtype` varchar(100) NOT NULL,
|
||||
`items_id` int(11) NOT NULL DEFAULT '0',
|
||||
`users_id` int(11) NOT NULL DEFAULT '0',
|
||||
`is_targettoclaim` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`postdata` mediumtext,
|
||||
`logs_out` mediumtext,
|
||||
`state` int(11) NOT NULL,
|
||||
`date_mod` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_processes
|
||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_processes` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`process_guid` varchar(32) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`is_active` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`hide_case_num_title` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`insert_task_comment` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`comment` text,
|
||||
`taskcategories_id` int(11) DEFAULT NULL,
|
||||
`itilcategories_id` int(11) NOT NULL DEFAULT '0',
|
||||
`type` int(11) NOT NULL DEFAULT '1' COMMENT 'Only used for Tickets',
|
||||
`date_mod` timestamp NULL DEFAULT NULL,
|
||||
`project_type` varchar(50) NOT NULL DEFAULT 'classic',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `process_guid` (`process_guid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_processes_profiles
|
||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_processes_profiles` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`processes_id` int(11) NOT NULL DEFAULT '0',
|
||||
`profiles_id` int(11) NOT NULL DEFAULT '0',
|
||||
`entities_id` int(11) NOT NULL DEFAULT '0',
|
||||
`is_recursive` tinyint(1) NOT NULL DEFAULT '1',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `entities_id` (`entities_id`),
|
||||
KEY `profiles_id` (`profiles_id`),
|
||||
KEY `processes_id` (`processes_id`),
|
||||
KEY `is_recursive` (`is_recursive`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_taskcategories
|
||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_taskcategories` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`processes_id` int(11) NOT NULL,
|
||||
`pm_task_guid` varchar(32) NOT NULL,
|
||||
`taskcategories_id` int(11) NOT NULL,
|
||||
`start` bit(1) NOT NULL DEFAULT b'0',
|
||||
`is_active` tinyint(1) NOT NULL DEFAULT '1',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `pm_task_guid` (`pm_task_guid`),
|
||||
UNIQUE KEY `items` (`taskcategories_id`),
|
||||
KEY `processes_id` (`processes_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_tasks
|
||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_tasks` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`items_id` int(11) NOT NULL,
|
||||
`itemtype` varchar(32) NOT NULL,
|
||||
`case_id` varchar(32) NOT NULL,
|
||||
`del_index` int(11) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `case_id` (`case_id`,`del_index`),
|
||||
UNIQUE KEY `items` (`itemtype`,`items_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_users
|
||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_users` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`pm_users_id` varchar(32) NOT NULL,
|
||||
`password` varchar(32) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `pm_users_id` (`pm_users_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
@@ -1,168 +0,0 @@
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET NAMES utf8 */;
|
||||
/*!50503 SET NAMES utf8mb4 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_caselinkactions
|
||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_caselinkactions` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`plugin_processmaker_caselinks_id` int(11) DEFAULT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`value` text,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `caselinks_id_name` (`plugin_processmaker_caselinks_id`,`name`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_caselinks
|
||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_caselinks` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`is_active` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`is_externaldata` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0:insert data from case,1:wait for external application to set datas',
|
||||
`is_self` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0:use linked tickets, 1:use self',
|
||||
`sourcetask_guid` varchar(32) DEFAULT NULL,
|
||||
`targettask_guid` varchar(32) DEFAULT NULL,
|
||||
`targetprocess_guid` varchar(32) DEFAULT NULL,
|
||||
`targetdynaform_guid` varchar(32) DEFAULT NULL,
|
||||
`sourcecondition` text,
|
||||
`is_targettoclaim` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`externalapplication` text,
|
||||
`date_mod` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `is_active` (`is_active`),
|
||||
KEY `is_externaldata` (`is_externaldata`),
|
||||
KEY `is_self` (`is_self`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_cases
|
||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_cases` (
|
||||
`id` varchar(32) NOT NULL,
|
||||
`items_id` int(11) NOT NULL,
|
||||
`itemtype` varchar(10) NOT NULL DEFAULT 'Ticket',
|
||||
`case_num` int(11) NOT NULL,
|
||||
`case_status` varchar(20) NOT NULL DEFAULT 'DRAFT',
|
||||
`processes_id` int(11) DEFAULT NULL,
|
||||
UNIQUE KEY `items` (`itemtype`,`items_id`),
|
||||
KEY `case_status` (`case_status`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_configs
|
||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_configs` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(50) NOT NULL DEFAULT 'ProcessMaker',
|
||||
`pm_server_URL` varchar(250) NOT NULL DEFAULT 'http://localhost/',
|
||||
`pm_workspace` varchar(50) NOT NULL DEFAULT 'workflow',
|
||||
`pm_admin_user` varchar(255) DEFAULT NULL,
|
||||
`pm_admin_passwd` varchar(255) DEFAULT NULL,
|
||||
`pm_theme` varchar(50) NOT NULL DEFAULT 'glpi_classic',
|
||||
`date_mod` timestamp NULL DEFAULT NULL,
|
||||
`taskcategories_id` int(11) DEFAULT NULL,
|
||||
`users_id` int(11) DEFAULT NULL,
|
||||
`pm_group_guid` varchar(32) DEFAULT NULL,
|
||||
`comment` text,
|
||||
`pm_dbserver_name` varchar(255) DEFAULT 'localhost',
|
||||
`pm_dbname` varchar(50) DEFAULT 'wf_workflow',
|
||||
`pm_dbserver_user` varchar(255) DEFAULT NULL,
|
||||
`pm_dbserver_passwd` varchar(255) DEFAULT NULL,
|
||||
`domain` varchar(50) DEFAULT '',
|
||||
`maintenance` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`db_version` varchar(10) NOT NULL DEFAULT '3.2.9',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_crontaskactions
|
||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_crontaskactions` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`plugin_processmaker_caselinks_id` int(11) DEFAULT NULL,
|
||||
`itemtype` varchar(100) NOT NULL,
|
||||
`items_id` int(11) NOT NULL DEFAULT '0',
|
||||
`users_id` int(11) NOT NULL DEFAULT '0',
|
||||
`is_targettoclaim` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`postdata` mediumtext,
|
||||
`logs_out` mediumtext,
|
||||
`state` int(11) NOT NULL,
|
||||
`date_mod` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_processes
|
||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_processes` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`process_guid` varchar(32) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`is_active` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`hide_case_num_title` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`insert_task_comment` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`comment` text,
|
||||
`taskcategories_id` int(11) DEFAULT NULL,
|
||||
`itilcategories_id` int(11) NOT NULL DEFAULT '0',
|
||||
`type` int(11) NOT NULL DEFAULT '1' COMMENT 'Only used for Tickets',
|
||||
`date_mod` timestamp NULL DEFAULT NULL,
|
||||
`project_type` varchar(50) NOT NULL DEFAULT 'classic',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `process_guid` (`process_guid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_processes_profiles
|
||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_processes_profiles` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`processes_id` int(11) NOT NULL DEFAULT '0',
|
||||
`profiles_id` int(11) NOT NULL DEFAULT '0',
|
||||
`entities_id` int(11) NOT NULL DEFAULT '0',
|
||||
`is_recursive` tinyint(1) NOT NULL DEFAULT '1',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `entities_id` (`entities_id`),
|
||||
KEY `profiles_id` (`profiles_id`),
|
||||
KEY `processes_id` (`processes_id`),
|
||||
KEY `is_recursive` (`is_recursive`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_taskcategories
|
||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_taskcategories` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`processes_id` int(11) NOT NULL,
|
||||
`pm_task_guid` varchar(32) NOT NULL,
|
||||
`taskcategories_id` int(11) NOT NULL,
|
||||
`start` bit(1) NOT NULL DEFAULT b'0',
|
||||
`is_active` tinyint(1) NOT NULL DEFAULT '1',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `pm_task_guid` (`pm_task_guid`),
|
||||
UNIQUE KEY `items` (`taskcategories_id`),
|
||||
KEY `processes_id` (`processes_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_tasks
|
||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_tasks` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`items_id` int(11) NOT NULL,
|
||||
`itemtype` varchar(32) NOT NULL,
|
||||
`case_id` varchar(32) NOT NULL,
|
||||
`del_index` int(11) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `case_id` (`case_id`,`del_index`),
|
||||
UNIQUE KEY `items` (`itemtype`,`items_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_users
|
||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_users` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`pm_users_id` varchar(32) NOT NULL,
|
||||
`password` varchar(32) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `pm_users_id` (`pm_users_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
@@ -1,179 +0,0 @@
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET NAMES utf8 */;
|
||||
/*!50503 SET NAMES utf8mb4 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_caselinkactions
|
||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_caselinkactions` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`plugin_processmaker_caselinks_id` int(11) DEFAULT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`value` text,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `caselinks_id_name` (`plugin_processmaker_caselinks_id`,`name`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_caselinks
|
||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_caselinks` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`is_active` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`is_externaldata` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0:insert data from case,1:wait for external application to set datas',
|
||||
`is_self` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0:use linked tickets, 1:use self',
|
||||
`sourcetask_guid` varchar(32) DEFAULT NULL,
|
||||
`targettask_guid` varchar(32) DEFAULT NULL,
|
||||
`targetprocess_guid` varchar(32) DEFAULT NULL,
|
||||
`targetdynaform_guid` varchar(32) DEFAULT NULL,
|
||||
`sourcecondition` text,
|
||||
`is_targettoclaim` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`externalapplication` text,
|
||||
`date_mod` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `is_active` (`is_active`),
|
||||
KEY `is_externaldata` (`is_externaldata`),
|
||||
KEY `is_self` (`is_self`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_cases
|
||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_cases` (
|
||||
`id` INT(11) NOT NULL,
|
||||
`itemtype` VARCHAR(10) NOT NULL DEFAULT 'Ticket',
|
||||
`items_id` INT(11) NOT NULL,
|
||||
`entities_id` INT(11) NOT NULL DEFAULT '0',
|
||||
`name` MEDIUMTEXT NOT NULL DEFAULT '',
|
||||
`case_guid` VARCHAR(32) NOT NULL,
|
||||
`case_status` VARCHAR(20) NOT NULL DEFAULT 'DRAFT',
|
||||
`plugin_processmaker_processes_id` INT(11) NULL DEFAULT NULL,
|
||||
`plugin_processmaker_cases_id` INT(11) NULL DEFAULT NULL,
|
||||
INDEX `items` (`itemtype`, `items_id`),
|
||||
INDEX `case_status` (`case_status`),
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE INDEX `case_guid` (`case_guid`),
|
||||
INDEX `plugin_processmaker_processes_id` (`plugin_processmaker_processes_id`),
|
||||
INDEX `plugin_processmaker_cases_id` (`plugin_processmaker_cases_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_configs
|
||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_configs` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(50) NOT NULL DEFAULT 'ProcessMaker',
|
||||
`pm_server_URL` varchar(250) NOT NULL DEFAULT 'http://localhost/',
|
||||
`pm_workspace` varchar(50) NOT NULL DEFAULT 'workflow',
|
||||
`pm_admin_user` varchar(255) DEFAULT NULL,
|
||||
`pm_admin_passwd` varchar(255) DEFAULT NULL,
|
||||
`pm_theme` varchar(50) NOT NULL DEFAULT 'glpi_classic',
|
||||
`date_mod` timestamp NULL DEFAULT NULL,
|
||||
`taskcategories_id` int(11) DEFAULT NULL,
|
||||
`users_id` int(11) DEFAULT NULL,
|
||||
`pm_group_guid` varchar(32) DEFAULT NULL,
|
||||
`comment` text,
|
||||
`pm_dbserver_name` varchar(255) DEFAULT 'localhost',
|
||||
`pm_dbname` varchar(50) DEFAULT 'wf_workflow',
|
||||
`pm_dbserver_user` varchar(255) DEFAULT NULL,
|
||||
`pm_dbserver_passwd` varchar(255) DEFAULT NULL,
|
||||
`domain` varchar(50) DEFAULT '',
|
||||
`maintenance` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`db_version` varchar(10) NOT NULL DEFAULT '3.3.0',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_crontaskactions
|
||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_crontaskactions` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`plugin_processmaker_caselinks_id` int(11) DEFAULT NULL,
|
||||
`plugin_processmaker_cases_id` int(11) DEFAULT '0',
|
||||
`users_id` int(11) NOT NULL DEFAULT '0',
|
||||
`is_targettoclaim` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`postdata` mediumtext,
|
||||
`logs_out` mediumtext,
|
||||
`state` int(11) NOT NULL,
|
||||
`date_mod` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_processes
|
||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_processes` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`process_guid` varchar(32) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`is_active` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`hide_case_num_title` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`insert_task_comment` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`comment` text,
|
||||
`taskcategories_id` int(11) DEFAULT NULL,
|
||||
`itilcategories_id` int(11) NOT NULL DEFAULT '0',
|
||||
`type` int(11) NOT NULL DEFAULT '1' COMMENT 'Only used for Tickets',
|
||||
`date_mod` timestamp NULL DEFAULT NULL,
|
||||
`project_type` varchar(50) NOT NULL DEFAULT 'classic',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `process_guid` (`process_guid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_processes_profiles
|
||||
CREATE TABLE `glpi_plugin_processmaker_processes_profiles` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`plugin_processmaker_processes_id` int(11) NOT NULL,
|
||||
`profiles_id` int(11) NOT NULL,
|
||||
`entities_id` int(11) NOT NULL,
|
||||
`is_recursive` tinyint(1) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE INDEX `plugin_processmaker_processes_id_profiles_id_entities_id` (`plugin_processmaker_processes_id`, `profiles_id`, `entities_id`),
|
||||
KEY `entities_id` (`entities_id`),
|
||||
KEY `profiles_id` (`profiles_id`),
|
||||
KEY `plugin_processmaker_processes_id` (`plugin_processmaker_processes_id`),
|
||||
KEY `is_recursive` (`is_recursive`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
|
||||
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_taskcategories
|
||||
CREATE TABLE `glpi_plugin_processmaker_taskcategories` (
|
||||
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`plugin_processmaker_processes_id` INT(11) NOT NULL,
|
||||
`pm_task_guid` VARCHAR(32) NOT NULL,
|
||||
`taskcategories_id` INT(11) NOT NULL,
|
||||
`is_start` TINYINT(1) NOT NULL DEFAULT '0',
|
||||
`is_active` TINYINT(1) NOT NULL DEFAULT '1',
|
||||
`is_subprocess` TINYINT(1) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE INDEX `pm_task_guid` (`pm_task_guid`),
|
||||
UNIQUE INDEX `items` (`taskcategories_id`),
|
||||
INDEX `plugin_processmaker_processes_id` (`plugin_processmaker_processes_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_tasks
|
||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_tasks` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`items_id` int(11) NOT NULL,
|
||||
`itemtype` varchar(32) NOT NULL,
|
||||
`plugin_processmaker_cases_id` int(11) NOT NULL,
|
||||
`plugin_processmaker_taskcategories_id` int(11) NOT NULL,
|
||||
`del_index` int(11) NOT NULL,
|
||||
`del_thread` INT(11) NOT NULL,
|
||||
`del_thread_status` varchar(32) NOT NULL DEFAULT 'OPEN',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `tasks` (`plugin_processmaker_cases_id`,`del_index`),
|
||||
UNIQUE KEY `items` (`itemtype`,`items_id`),
|
||||
KEY `del_thread_status` (`del_thread_status`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_users
|
||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_users` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`pm_users_id` varchar(32) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `pm_users_id` (`pm_users_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
@@ -1,186 +0,0 @@
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET NAMES utf8 */;
|
||||
/*!50503 SET NAMES utf8mb4 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_caselinkactions
|
||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_caselinkactions` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`plugin_processmaker_caselinks_id` int(11) DEFAULT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`value` text,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `caselinks_id_name` (`plugin_processmaker_caselinks_id`,`name`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_caselinks
|
||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_caselinks` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`is_active` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`is_externaldata` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0:insert data from case,1:wait for external application to set datas',
|
||||
`is_self` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0:use linked tickets, 1:use self',
|
||||
`sourcetask_guid` varchar(32) DEFAULT NULL,
|
||||
`targettask_guid` varchar(32) DEFAULT NULL,
|
||||
`targetprocess_guid` varchar(32) DEFAULT NULL,
|
||||
`targetdynaform_guid` varchar(32) DEFAULT NULL,
|
||||
`sourcecondition` text,
|
||||
`is_targettoclaim` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`is_targettoreassign` TINYINT(1) NOT NULL DEFAULT '0',
|
||||
`is_targettoimpersonate` TINYINT(1) NOT NULL DEFAULT '0',
|
||||
`externalapplication` TEXT NULL,
|
||||
`is_synchronous` TINYINT(1) NOT NULL DEFAULT '0',
|
||||
`date_mod` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `is_active` (`is_active`),
|
||||
KEY `is_externaldata` (`is_externaldata`),
|
||||
KEY `is_self` (`is_self`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_cases
|
||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_cases` (
|
||||
`id` INT(11) NOT NULL,
|
||||
`itemtype` VARCHAR(10) NOT NULL DEFAULT 'Ticket',
|
||||
`items_id` INT(11) NOT NULL,
|
||||
`entities_id` INT(11) NOT NULL DEFAULT '0',
|
||||
`name` MEDIUMTEXT NOT NULL DEFAULT '',
|
||||
`case_guid` VARCHAR(32) NOT NULL,
|
||||
`case_status` VARCHAR(20) NOT NULL DEFAULT 'DRAFT',
|
||||
`plugin_processmaker_processes_id` INT(11) NULL DEFAULT NULL,
|
||||
`plugin_processmaker_cases_id` INT(11) NULL DEFAULT NULL,
|
||||
INDEX `items` (`itemtype`, `items_id`),
|
||||
INDEX `case_status` (`case_status`),
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE INDEX `case_guid` (`case_guid`),
|
||||
INDEX `plugin_processmaker_processes_id` (`plugin_processmaker_processes_id`),
|
||||
INDEX `plugin_processmaker_cases_id` (`plugin_processmaker_cases_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_configs
|
||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_configs` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(50) NOT NULL DEFAULT 'ProcessMaker',
|
||||
`pm_server_URL` varchar(250) NOT NULL DEFAULT 'http://localhost/',
|
||||
`pm_workspace` varchar(50) NOT NULL DEFAULT 'workflow',
|
||||
`pm_admin_user` varchar(255) DEFAULT NULL,
|
||||
`pm_admin_passwd` varchar(255) DEFAULT NULL,
|
||||
`pm_theme` varchar(50) NOT NULL DEFAULT 'glpi_classic',
|
||||
`date_mod` timestamp NULL DEFAULT NULL,
|
||||
`taskcategories_id` int(11) DEFAULT NULL,
|
||||
`users_id` int(11) DEFAULT NULL,
|
||||
`pm_group_guid` varchar(32) DEFAULT NULL,
|
||||
`comment` text,
|
||||
`pm_dbserver_name` varchar(255) DEFAULT 'localhost',
|
||||
`pm_dbname` varchar(50) DEFAULT 'wf_workflow',
|
||||
`pm_dbserver_user` varchar(255) DEFAULT NULL,
|
||||
`pm_dbserver_passwd` varchar(255) DEFAULT NULL,
|
||||
`domain` varchar(50) DEFAULT '',
|
||||
`maintenance` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`db_version` varchar(10) NOT NULL DEFAULT '3.3.0',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_crontaskactions
|
||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_crontaskactions` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`plugin_processmaker_caselinks_id` int(11) DEFAULT NULL,
|
||||
`plugin_processmaker_cases_id` int(11) DEFAULT '0',
|
||||
`users_id` int(11) NOT NULL DEFAULT '0',
|
||||
`is_targettoclaim` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`postdata` mediumtext,
|
||||
`logs_out` mediumtext,
|
||||
`state` int(11) NOT NULL,
|
||||
`date_mod` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_processes
|
||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_processes` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`process_guid` varchar(32) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`is_active` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`hide_case_num_title` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`insert_task_comment` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`comment` text,
|
||||
`taskcategories_id` int(11) DEFAULT NULL,
|
||||
`itilcategories_id` int(11) NOT NULL DEFAULT '0',
|
||||
`type` int(11) NOT NULL DEFAULT '1' COMMENT 'Only used for self-service Tickets',
|
||||
`date_mod` timestamp NULL DEFAULT NULL,
|
||||
`project_type` varchar(50) NOT NULL DEFAULT 'classic',
|
||||
`is_change` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`is_problem` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`is_incident` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`is_request` tinyint(1) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `process_guid` (`process_guid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_processes_profiles
|
||||
CREATE TABLE `glpi_plugin_processmaker_processes_profiles` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`plugin_processmaker_processes_id` int(11) NOT NULL,
|
||||
`profiles_id` int(11) NOT NULL,
|
||||
`entities_id` int(11) NOT NULL,
|
||||
`is_recursive` tinyint(1) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE INDEX `plugin_processmaker_processes_id_profiles_id_entities_id` (`plugin_processmaker_processes_id`, `profiles_id`, `entities_id`),
|
||||
KEY `entities_id` (`entities_id`),
|
||||
KEY `profiles_id` (`profiles_id`),
|
||||
KEY `plugin_processmaker_processes_id` (`plugin_processmaker_processes_id`),
|
||||
KEY `is_recursive` (`is_recursive`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
|
||||
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_taskcategories
|
||||
CREATE TABLE `glpi_plugin_processmaker_taskcategories` (
|
||||
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`plugin_processmaker_processes_id` INT(11) NOT NULL,
|
||||
`pm_task_guid` VARCHAR(32) NOT NULL,
|
||||
`taskcategories_id` INT(11) NOT NULL,
|
||||
`is_start` TINYINT(1) NOT NULL DEFAULT '0',
|
||||
`is_active` TINYINT(1) NOT NULL DEFAULT '1',
|
||||
`is_subprocess` TINYINT(1) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE INDEX `pm_task_guid` (`pm_task_guid`),
|
||||
UNIQUE INDEX `items` (`taskcategories_id`),
|
||||
INDEX `plugin_processmaker_processes_id` (`plugin_processmaker_processes_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_tasks
|
||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_tasks` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`items_id` int(11) NOT NULL,
|
||||
`itemtype` varchar(32) NOT NULL,
|
||||
`plugin_processmaker_cases_id` int(11) NOT NULL,
|
||||
`plugin_processmaker_taskcategories_id` int(11) NOT NULL,
|
||||
`del_index` int(11) NOT NULL,
|
||||
`del_thread` INT(11) NOT NULL,
|
||||
`del_thread_status` varchar(32) NOT NULL DEFAULT 'OPEN',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `tasks` (`plugin_processmaker_cases_id`,`del_index`),
|
||||
UNIQUE KEY `items` (`itemtype`,`items_id`),
|
||||
KEY `del_thread_status` (`del_thread_status`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
-- Dumping structure for table glpi.glpi_plugin_processmaker_users
|
||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_users` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`pm_users_id` varchar(32) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `pm_users_id` (`pm_users_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
@@ -64,7 +64,7 @@ CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_cases` (
|
||||
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_configs` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(50) NOT NULL DEFAULT 'ProcessMaker',
|
||||
`pm_server_URL` varchar(250) NOT NULL DEFAULT 'http://localhost/',
|
||||
`pm_server_URL` varchar(250) NOT NULL DEFAULT 'http://itsm-pm.acme.com/',
|
||||
`pm_workspace` varchar(50) NOT NULL DEFAULT 'workflow',
|
||||
`pm_admin_user` varchar(255) DEFAULT NULL,
|
||||
`pm_admin_passwd` varchar(255) DEFAULT NULL,
|
||||
@@ -81,7 +81,8 @@ CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_configs` (
|
||||
`domain` varchar(50) DEFAULT '',
|
||||
`maintenance` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`ssl_verify` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`db_version` varchar(10) NOT NULL DEFAULT '3.3.8',
|
||||
`db_version` varchar(10) NOT NULL DEFAULT '3.4.9',
|
||||
`max_cases_per_item` int(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
@@ -119,6 +120,8 @@ CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_processes` (
|
||||
`is_problem` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`is_incident` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`is_request` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`maintenance` TINYINT(1) NOT NULL DEFAULT '0',
|
||||
`max_cases_per_item` int(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `process_guid` (`process_guid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user