GLPI 9.5 compliance
Set version to 4.0.0
This commit is contained in:
17
.gitattributes
vendored
17
.gitattributes
vendored
@@ -1,17 +0,0 @@
|
|||||||
# Auto detect text files and perform LF normalization
|
|
||||||
* text=auto
|
|
||||||
|
|
||||||
# Custom for Visual Studio
|
|
||||||
*.cs diff=csharp
|
|
||||||
|
|
||||||
# Standard to msysgit
|
|
||||||
*.doc diff=astextplain
|
|
||||||
*.DOC diff=astextplain
|
|
||||||
*.docx diff=astextplain
|
|
||||||
*.DOCX diff=astextplain
|
|
||||||
*.dot diff=astextplain
|
|
||||||
*.DOT diff=astextplain
|
|
||||||
*.pdf diff=astextplain
|
|
||||||
*.PDF diff=astextplain
|
|
||||||
*.rtf diff=astextplain
|
|
||||||
*.RTF diff=astextplain
|
|
||||||
216
.gitignore
vendored
216
.gitignore
vendored
@@ -1,216 +0,0 @@
|
|||||||
#################
|
|
||||||
## Eclipse
|
|
||||||
#################
|
|
||||||
|
|
||||||
*.pydevproject
|
|
||||||
.project
|
|
||||||
.metadata
|
|
||||||
bin/
|
|
||||||
tmp/
|
|
||||||
*.tmp
|
|
||||||
*.bak
|
|
||||||
*.swp
|
|
||||||
*~.nib
|
|
||||||
local.properties
|
|
||||||
.classpath
|
|
||||||
.settings/
|
|
||||||
.loadpath
|
|
||||||
|
|
||||||
# External tool builders
|
|
||||||
.externalToolBuilders/
|
|
||||||
|
|
||||||
# Locally stored "Eclipse launch configurations"
|
|
||||||
*.launch
|
|
||||||
|
|
||||||
# CDT-specific
|
|
||||||
.cproject
|
|
||||||
|
|
||||||
# PDT-specific
|
|
||||||
.buildpath
|
|
||||||
|
|
||||||
|
|
||||||
#################
|
|
||||||
## Visual Studio
|
|
||||||
#################
|
|
||||||
|
|
||||||
## Ignore Visual Studio temporary files, build results, and
|
|
||||||
## files generated by popular Visual Studio add-ons.
|
|
||||||
|
|
||||||
# User-specific files
|
|
||||||
*.suo
|
|
||||||
*.user
|
|
||||||
*.sln.docstates
|
|
||||||
|
|
||||||
# Build results
|
|
||||||
|
|
||||||
[Dd]ebug/
|
|
||||||
[Rr]elease/
|
|
||||||
x64/
|
|
||||||
build/
|
|
||||||
[Bb]in/
|
|
||||||
[Oo]bj/
|
|
||||||
|
|
||||||
# MSTest test Results
|
|
||||||
[Tt]est[Rr]esult*/
|
|
||||||
[Bb]uild[Ll]og.*
|
|
||||||
|
|
||||||
*_i.c
|
|
||||||
*_p.c
|
|
||||||
*.ilk
|
|
||||||
*.meta
|
|
||||||
*.obj
|
|
||||||
*.pch
|
|
||||||
*.pdb
|
|
||||||
*.pgc
|
|
||||||
*.pgd
|
|
||||||
*.rsp
|
|
||||||
*.sbr
|
|
||||||
*.tlb
|
|
||||||
*.tli
|
|
||||||
*.tlh
|
|
||||||
*.tmp
|
|
||||||
*.tmp_proj
|
|
||||||
*.log
|
|
||||||
*.vspscc
|
|
||||||
*.vssscc
|
|
||||||
.builds
|
|
||||||
*.pidb
|
|
||||||
*.log
|
|
||||||
*.scc
|
|
||||||
|
|
||||||
# Visual C++ cache files
|
|
||||||
ipch/
|
|
||||||
*.aps
|
|
||||||
*.ncb
|
|
||||||
*.opensdf
|
|
||||||
*.sdf
|
|
||||||
*.cachefile
|
|
||||||
|
|
||||||
# Visual Studio profiler
|
|
||||||
*.psess
|
|
||||||
*.vsp
|
|
||||||
*.vspx
|
|
||||||
|
|
||||||
# Guidance Automation Toolkit
|
|
||||||
*.gpState
|
|
||||||
|
|
||||||
# ReSharper is a .NET coding add-in
|
|
||||||
_ReSharper*/
|
|
||||||
*.[Rr]e[Ss]harper
|
|
||||||
|
|
||||||
# TeamCity is a build add-in
|
|
||||||
_TeamCity*
|
|
||||||
|
|
||||||
# DotCover is a Code Coverage Tool
|
|
||||||
*.dotCover
|
|
||||||
|
|
||||||
# NCrunch
|
|
||||||
*.ncrunch*
|
|
||||||
.*crunch*.local.xml
|
|
||||||
|
|
||||||
# Installshield output folder
|
|
||||||
[Ee]xpress/
|
|
||||||
|
|
||||||
# DocProject is a documentation generator add-in
|
|
||||||
DocProject/buildhelp/
|
|
||||||
DocProject/Help/*.HxT
|
|
||||||
DocProject/Help/*.HxC
|
|
||||||
DocProject/Help/*.hhc
|
|
||||||
DocProject/Help/*.hhk
|
|
||||||
DocProject/Help/*.hhp
|
|
||||||
DocProject/Help/Html2
|
|
||||||
DocProject/Help/html
|
|
||||||
|
|
||||||
# Click-Once directory
|
|
||||||
publish/
|
|
||||||
|
|
||||||
# Publish Web Output
|
|
||||||
*.Publish.xml
|
|
||||||
*.pubxml
|
|
||||||
*.publishproj
|
|
||||||
|
|
||||||
# NuGet Packages Directory
|
|
||||||
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
|
|
||||||
#packages/
|
|
||||||
|
|
||||||
# Windows Azure Build Output
|
|
||||||
csx
|
|
||||||
*.build.csdef
|
|
||||||
|
|
||||||
# Windows Store app package directory
|
|
||||||
AppPackages/
|
|
||||||
|
|
||||||
# Others
|
|
||||||
sql/
|
|
||||||
*.Cache
|
|
||||||
ClientBin/
|
|
||||||
[Ss]tyle[Cc]op.*
|
|
||||||
~$*
|
|
||||||
*~
|
|
||||||
*.dbmdl
|
|
||||||
*.[Pp]ublish.xml
|
|
||||||
*.pfx
|
|
||||||
*.publishsettings
|
|
||||||
|
|
||||||
# RIA/Silverlight projects
|
|
||||||
Generated_Code/
|
|
||||||
|
|
||||||
# Backup & report files from converting an old project file to a newer
|
|
||||||
# Visual Studio version. Backup files are not needed, because we have git ;-)
|
|
||||||
_UpgradeReport_Files/
|
|
||||||
Backup*/
|
|
||||||
UpgradeLog*.XML
|
|
||||||
UpgradeLog*.htm
|
|
||||||
|
|
||||||
# SQL Server files
|
|
||||||
App_Data/*.mdf
|
|
||||||
App_Data/*.ldf
|
|
||||||
|
|
||||||
#############
|
|
||||||
## Windows detritus
|
|
||||||
#############
|
|
||||||
|
|
||||||
# Windows image file caches
|
|
||||||
Thumbs.db
|
|
||||||
ehthumbs.db
|
|
||||||
|
|
||||||
# Folder config file
|
|
||||||
Desktop.ini
|
|
||||||
|
|
||||||
# Recycle Bin used on file shares
|
|
||||||
$RECYCLE.BIN/
|
|
||||||
|
|
||||||
# Mac crap
|
|
||||||
.DS_Store
|
|
||||||
|
|
||||||
|
|
||||||
#############
|
|
||||||
## Python
|
|
||||||
#############
|
|
||||||
|
|
||||||
*.py[cod]
|
|
||||||
|
|
||||||
# Packages
|
|
||||||
*.egg
|
|
||||||
*.egg-info
|
|
||||||
dist/
|
|
||||||
build/
|
|
||||||
eggs/
|
|
||||||
parts/
|
|
||||||
var/
|
|
||||||
sdist/
|
|
||||||
develop-eggs/
|
|
||||||
.installed.cfg
|
|
||||||
|
|
||||||
# Installer logs
|
|
||||||
pip-log.txt
|
|
||||||
|
|
||||||
# Unit test / coverage reports
|
|
||||||
.coverage
|
|
||||||
.tox
|
|
||||||
|
|
||||||
#Translations
|
|
||||||
*.mo
|
|
||||||
|
|
||||||
#Mr Developer
|
|
||||||
.mr.developer.cfg
|
|
||||||
@@ -8,6 +8,8 @@ version 3.5.x is compatible with GLPI 9.3 and needs ProcessMaker 3.3.0-RE-1.x (h
|
|||||||
|
|
||||||
version 3.6.x is compatible with GLPI 9.4 and needs ProcessMaker 3.3.0-RE-1.x (https://github.com/tomolimo/processmaker-server/releases/latest)
|
version 3.6.x is compatible with GLPI 9.4 and needs ProcessMaker 3.3.0-RE-1.x (https://github.com/tomolimo/processmaker-server/releases/latest)
|
||||||
|
|
||||||
|
version 4.0.0 is compatible with GLPI 9.5 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
|
This plugin can run classic and bpmn processes
|
||||||
|
|
||||||
An IRC channel is available: #processmaker-glpi on https://webchat.freenode.net/
|
An IRC channel is available: #processmaker-glpi on https://webchat.freenode.net/
|
||||||
|
|||||||
40
ajax/dropdownTicketCategories.php
Normal file
40
ajax/dropdownTicketCategories.php
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (strpos($_SERVER['PHP_SELF'], "dropdownTicketCategories.php")) {
|
||||||
|
include ("../../../inc/includes.php");
|
||||||
|
header("Content-Type: text/html; charset=UTF-8");
|
||||||
|
Html::header_nocache();
|
||||||
|
} else if (!defined('GLPI_ROOT')) {
|
||||||
|
die("Sorry. You can't access this file directly");
|
||||||
|
}
|
||||||
|
|
||||||
|
$opt['entity'] = $_POST["entity_restrict"] ?? -1;
|
||||||
|
|
||||||
|
if (isset($_POST["condition"])) {
|
||||||
|
$opt['condition'] = $_POST["condition"];
|
||||||
|
}
|
||||||
|
|
||||||
|
$currentcateg = new ITILCategory();
|
||||||
|
$currentcateg->getFromDB($_POST['value']);
|
||||||
|
|
||||||
|
if ($_POST["type"]) {
|
||||||
|
switch ($_POST['type']) {
|
||||||
|
case Ticket::INCIDENT_TYPE :
|
||||||
|
$opt['condition']['is_incident'] = '1';
|
||||||
|
if ($currentcateg->getField('is_incident') == 1) {
|
||||||
|
$opt['value'] = $_POST['value'];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case Ticket::DEMAND_TYPE:
|
||||||
|
$opt['condition']['is_request'] = '1';
|
||||||
|
if ($currentcateg->getField('is_request') == 1) {
|
||||||
|
$opt['value'] = $_POST['value'];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ITILCategory::dropdown($opt);
|
||||||
@@ -56,36 +56,28 @@ if (!isset($_REQUEST['page'])) {
|
|||||||
|
|
||||||
if ($one_item < 0) {
|
if ($one_item < 0) {
|
||||||
$start = ($_REQUEST['page'] - 1) * $_REQUEST['page_limit'];
|
$start = ($_REQUEST['page'] - 1) * $_REQUEST['page_limit'];
|
||||||
$LIMIT = "LIMIT $start,".$_REQUEST['page_limit'];
|
|
||||||
$searchText = isset($_REQUEST['searchText']) ? $_REQUEST['searchText'] : "";
|
$searchText = isset($_REQUEST['searchText']) ? $_REQUEST['searchText'] : "";
|
||||||
/*$result*/$res = PluginProcessmakerUser::getSqlSearchResult( $_REQUEST['specific_tags']['taskGuid'], false, $_REQUEST['right'], $_REQUEST["entity_restrict"],
|
$res = PluginProcessmakerUser::getSqlSearchResult( $_REQUEST['specific_tags'], false, $_REQUEST['right'], $_REQUEST["entity_restrict"],
|
||||||
$_REQUEST['value'], $used, $searchText, $LIMIT);
|
$_REQUEST['value'], $used, $searchText, $start, $_REQUEST['page_limit']);
|
||||||
} else {
|
} else {
|
||||||
$res = $DB->request([
|
$res = $DB->request([
|
||||||
'SELECT' => 'glpi_users.*',
|
'FIELDS' => 'glpi_users.*',
|
||||||
|
'DISTINCT' => true,
|
||||||
'FROM' => 'glpi_users',
|
'FROM' => 'glpi_users',
|
||||||
'WHERE' => [
|
'WHERE' => [
|
||||||
'glpi_users.id' => $one_item
|
'glpi_users.id' => $one_item
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
//$query = "SELECT DISTINCT `glpi_users`.*
|
|
||||||
// FROM `glpi_users`
|
|
||||||
// WHERE `glpi_users`.`id` = '$one_item';";
|
|
||||||
//$result = $DB->query($query);
|
|
||||||
}
|
}
|
||||||
$users = [];
|
$users = [];
|
||||||
|
|
||||||
// Count real items returned
|
// Count real items returned
|
||||||
$count = 0;
|
$count = 0;
|
||||||
//if ($DB->numrows($result)) {
|
|
||||||
// while ($data = $DB->fetch_assoc($result)) {
|
|
||||||
//if ($res->numrows()) {
|
|
||||||
foreach ($res as $data) {
|
foreach ($res as $data) {
|
||||||
$users[$data["id"]] = $dbu->formatUserName($data["id"], $data["name"], $data["realname"],
|
$users[$data["id"]] = $dbu->formatUserName($data["id"], $data["name"], $data["realname"],
|
||||||
$data["firstname"]);
|
$data["firstname"], 0);
|
||||||
$logins[$data["id"]] = $data["name"];
|
$logins[$data["id"]] = $data["name"];
|
||||||
}
|
}
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
$datas = [];
|
$datas = [];
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ $commoninputs = "<input type='hidden' name='items_id' value='".$_REQUEST['items_
|
|||||||
"<input type='hidden' name='tasktype' value='".$_REQUEST['tasktype']."'>".
|
"<input type='hidden' name='tasktype' value='".$_REQUEST['tasktype']."'>".
|
||||||
"<input type='hidden' name='tasks_id' value='".$_REQUEST['tasks_id']."'>";
|
"<input type='hidden' name='tasks_id' value='".$_REQUEST['tasks_id']."'>";
|
||||||
|
|
||||||
$PM_SOAP = new PluginProcessmakerProcessmaker; // not used in this context, just here to define the type of $PM_SOAP
|
$PM_SOAP = new PluginProcessmakerProcessmaker;
|
||||||
$PM_DB = new PluginProcessmakerDB;
|
$PM_DB = new PluginProcessmakerDB;
|
||||||
$rand = rand();
|
$rand = rand();
|
||||||
|
|
||||||
@@ -39,10 +39,16 @@ echo "<input type='hidden' name='comment' value=''>";
|
|||||||
echo $commoninputs;
|
echo $commoninputs;
|
||||||
|
|
||||||
$can_unclaim = false; // by default
|
$can_unclaim = false; // by default
|
||||||
|
$grp = false;
|
||||||
$query = "SELECT TAS_GROUP_VARIABLE FROM TASK WHERE TAS_UID='".$_REQUEST['taskGuid']."' AND TAS_ASSIGN_TYPE='SELF_SERVICE';";
|
$query = "SELECT TAS_GROUP_VARIABLE FROM TASK WHERE TAS_UID='".$_REQUEST['taskGuid']."' AND TAS_ASSIGN_TYPE='SELF_SERVICE';";
|
||||||
$res = $PM_DB->query($query);
|
$res = $PM_DB->query($query);
|
||||||
if ($PM_DB->numrows($res) > 0) {
|
if ($PM_DB->numrows($res) > 0 && $row = $PM_DB->fetch_assoc($res)) {
|
||||||
$can_unclaim = true;
|
$can_unclaim = true;
|
||||||
|
if ($row['TAS_GROUP_VARIABLE'] != '') {
|
||||||
|
//self-service value based assignment
|
||||||
|
$PM_SOAP->login(true); // needs to be logged in to be able to call SOAP
|
||||||
|
$grp = $PM_SOAP->getGLPIGroupIdForSelfServiceTask($_REQUEST['caseGuid'], $_REQUEST['taskGuid']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginProcessmakerUser::dropdown( ['name' => 'users_id_recipient',
|
PluginProcessmakerUser::dropdown( ['name' => 'users_id_recipient',
|
||||||
@@ -51,14 +57,15 @@ PluginProcessmakerUser::dropdown( ['name' => 'users_id_recipient',
|
|||||||
'entity' => 0, //$item->fields["entities_id"], // not used, as any user can be assigned to any tasks
|
'entity' => 0, //$item->fields["entities_id"], // not used, as any user can be assigned to any tasks
|
||||||
'entity_sons' => false, // not used, as any user can be assigned to any tasks
|
'entity_sons' => false, // not used, as any user can be assigned to any tasks
|
||||||
'right' => 'all',
|
'right' => 'all',
|
||||||
|
'all' => ($can_unclaim ? 0 : -1),
|
||||||
'rand' => $rand,
|
'rand' => $rand,
|
||||||
'width' => '',
|
'width' => '',
|
||||||
'specific_tags' => ['taskGuid' => $_REQUEST['taskGuid']]
|
'specific_tags' => ['taskGuid' => $_REQUEST['taskGuid'], 'grpGuid' => ($grp !== false ? $grp['uid'] : 0)]
|
||||||
]);
|
]);
|
||||||
|
|
||||||
echo " ";
|
echo " ";
|
||||||
echo "<input type='submit' name='reassign$rand' value='".__('Re-assign', 'processmaker')."' class='submit'>";
|
echo "<input type='submit' name='reassign$rand' value='".__s('Re-assign', 'processmaker')."' class='submit'>";
|
||||||
echo "<input type='submit' name='reassign' value='".__('Re-assign', 'processmaker')."' class='submit' style='display:none'>";
|
echo "<input type='submit' name='reassign' value='".__s('Re-assign', 'processmaker')."' class='submit' style='display:none'>";
|
||||||
|
|
||||||
echo HTML::scriptBlock("
|
echo HTML::scriptBlock("
|
||||||
$(function () {
|
$(function () {
|
||||||
@@ -90,7 +97,7 @@ echo HTML::scriptBlock("
|
|||||||
hide: true
|
hide: true
|
||||||
}
|
}
|
||||||
$('<div id=reassign$rand></div>').appendTo($('#processmaker_form_task$rand-".$_REQUEST['delIndex']."'));
|
$('<div id=reassign$rand></div>').appendTo($('#processmaker_form_task$rand-".$_REQUEST['delIndex']."'));
|
||||||
var locDlg = $('#reassign$rand').html(content + '<p><textarea id=comment$rand rows=6 cols=60></textarea></p><font color=red>Input at least 10 words in English to justify.</font>').dialog(dlgContents);
|
var locDlg = $('#reassign$rand').html(content + '<p><textarea id=comment$rand rows=6 cols=60></textarea></p><font color=red>".addslashes(__('Input at least 10 words in English to justify.','processmaker'))."</font>').dialog(dlgContents);
|
||||||
$('#comment$rand').focus();
|
$('#comment$rand').focus();
|
||||||
$('#comment$rand').on('keydown keyup', function(e) {
|
$('#comment$rand').on('keydown keyup', function(e) {
|
||||||
if ($('#comment$rand').val().split(/\W+/).length > 10) {
|
if ($('#comment$rand').val().split(/\W+/).length > 10) {
|
||||||
@@ -107,21 +114,25 @@ echo HTML::scriptBlock("
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if ($('input[name=users_id]').val() == $('input[name=users_id_recipient]').val()) {
|
if ($('input[name=users_id]').val() == $('input[name=users_id_recipient]').val()) {
|
||||||
// task is already assigned to this user
|
// task is already assigned to this user
|
||||||
alert('".__('Task is already assigned to this user or group!', 'processmaker')."', '".__('Re-assign task', 'processmaker')."');
|
if ($('input[name=users_id]').val() == 0) {
|
||||||
|
alert('".addslashes(__('Task is already un-assigned!', 'processmaker'))."', '".addslashes(__('Re-assign task', 'processmaker'))."');
|
||||||
|
} else {
|
||||||
|
alert('".addslashes(__('Task is already assigned to this user!', 'processmaker'))."', '".addslashes(__('Re-assign task', 'processmaker'))."');
|
||||||
|
}
|
||||||
} else if ($('input[name=users_id_recipient]').val() == 0) {
|
} else if ($('input[name=users_id_recipient]').val() == 0) {
|
||||||
// un-claim
|
// un-claim
|
||||||
if (".($can_unclaim ? 1 : 0)." && $('input[name=users_id]').val() != 0) {
|
if (".($can_unclaim ? 1 : 0)." && $('input[name=users_id]').val() != 0) {
|
||||||
showCommentDlg('".__('Un-claim task', 'processmaker')."',
|
showCommentDlg('".addslashes(__('Un-claim task', 'processmaker'))."',
|
||||||
'".__('Please input reason to un-claim<br/>(task will be re-assigned to former group):', 'processmaker')."',
|
'".addslashes(__('Please input reason to un-claim<br/>(task will be re-assigned to former group):', 'processmaker'))."',
|
||||||
'".__('Un-claim', 'processmaker')."');
|
'".addslashes(__('Un-claim', 'processmaker'))."');
|
||||||
} else {
|
} else {
|
||||||
// task can't be unclaim because it isn't SELF_SERVICE
|
// task can't be unclaim because it isn't SELF_SERVICE
|
||||||
alert('".__('Can\\\'t un-assign Task!', 'processmaker')."', '".__('Un-claim task', 'processmaker')."');
|
alert('".addslashes(__("Can't un-assign task!", 'processmaker'))."', '".addslashes(__('Un-claim task', 'processmaker'))."');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
showCommentDlg('".__('Re-assign task', 'processmaker')."',
|
showCommentDlg('".addslashes(__('Re-assign task', 'processmaker'))."',
|
||||||
'".__('Please input reason to re-assign:', 'processmaker')."',
|
'".addslashes(__('Please input reason to re-assign:', 'processmaker'))."',
|
||||||
'".__('Re-assign', 'processmaker')."');
|
'".addslashes(__('Re-assign', 'processmaker'))."');
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
@@ -131,7 +142,7 @@ echo HTML::scriptBlock("
|
|||||||
|
|
||||||
if (Session::getLoginUserID() != $_REQUEST['users_id']) {
|
if (Session::getLoginUserID() != $_REQUEST['users_id']) {
|
||||||
echo " ";
|
echo " ";
|
||||||
echo "<input type='submit' name='reminder' value='".__('Send reminder', 'processmaker')."' class='submit'>";
|
echo "<input type='submit' name='reminder' value='".__s('Send reminder', 'processmaker')."' class='submit'>";
|
||||||
}
|
}
|
||||||
|
|
||||||
Html::closeForm(true);
|
Html::closeForm(true);
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ include_once ("../../../inc/includes.php");
|
|||||||
Html::header(__('ProcessMaker', 'processmaker'), $_SERVER['PHP_SELF'], "helpdesk", "PluginProcessmakerCase", "cases");
|
Html::header(__('ProcessMaker', 'processmaker'), $_SERVER['PHP_SELF'], "helpdesk", "PluginProcessmakerCase", "cases");
|
||||||
|
|
||||||
if (!$PM_SOAP->config->fields['maintenance']) {
|
if (!$PM_SOAP->config->fields['maintenance']) {
|
||||||
if (Session::haveRightsOr("plugin_processmaker_case", [READ, UPDATE])) {
|
if (Session::haveRightsOr("plugin_processmaker_case", [READ, DELETE, CANCEL, ADHOC_REASSIGN])) {
|
||||||
|
|
||||||
Search::show('PluginProcessmakerCase');
|
Search::show('PluginProcessmakerCase');
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -41,10 +41,10 @@ function processMakerShowProcessList ($ID, $from_helpdesk) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Summary of processMakerShowCase
|
* Summary of processMakerShowCase
|
||||||
* @param mixed $ID
|
* @param mixed $users_id
|
||||||
* @param mixed $from_helpdesk
|
* @param mixed $from_helpdesk
|
||||||
*/
|
*/
|
||||||
function processMakerShowCase($ID, $from_helpdesk) {
|
function processMakerShowCase($users_id, $from_helpdesk) {
|
||||||
global $CFG_GLPI, $PM_SOAP;
|
global $CFG_GLPI, $PM_SOAP;
|
||||||
|
|
||||||
$caseInfo = $PM_SOAP->getCaseInfo( $_REQUEST['case_guid'] );
|
$caseInfo = $PM_SOAP->getCaseInfo( $_REQUEST['case_guid'] );
|
||||||
@@ -62,19 +62,19 @@ function processMakerShowCase($ID, $from_helpdesk) {
|
|||||||
// as showFormHelpdesk uses $_POST, we must set it
|
// as showFormHelpdesk uses $_POST, we must set it
|
||||||
$_POST = $_REQUEST;
|
$_POST = $_REQUEST;
|
||||||
|
|
||||||
// must be using bare text
|
//// must be using bare text
|
||||||
$save_rich_text = $CFG_GLPI["use_rich_text"];
|
//$save_rich_text = $CFG_GLPI["use_rich_text"];
|
||||||
$CFG_GLPI["use_rich_text"] = false;
|
//$CFG_GLPI["use_rich_text"] = false;
|
||||||
|
|
||||||
// to get the HTML code for the helpdesk form
|
// to get the HTML code for the helpdesk form
|
||||||
$saved_ob_level = ob_get_level();
|
$saved_ob_level = ob_get_level();
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
$tkt->showFormHelpdesk($ID);
|
$tkt->showFormHelpdesk($users_id);
|
||||||
|
|
||||||
$buffer = ob_get_clean();
|
$buffer = ob_get_clean();
|
||||||
|
|
||||||
$CFG_GLPI["use_rich_text"] = $save_rich_text;
|
//$CFG_GLPI["use_rich_text"] = $save_rich_text;
|
||||||
|
|
||||||
// 9.1 only: hack to fix an issue with the initEditorSystem which calls scriptStart without calling scriptEnd
|
// 9.1 only: hack to fix an issue with the initEditorSystem which calls scriptStart without calling scriptEnd
|
||||||
if (ob_get_level() > $saved_ob_level) {
|
if (ob_get_level() > $saved_ob_level) {
|
||||||
@@ -93,7 +93,8 @@ function processMakerShowCase($ID, $from_helpdesk) {
|
|||||||
// so that only the already escaped entites will get the double encoding
|
// so that only the already escaped entites will get the double encoding
|
||||||
// will also change </b> end of bold into a local identifier
|
// will also change </b> end of bold into a local identifier
|
||||||
$endOfBold = 'end_of_bold'.rand();
|
$endOfBold = 'end_of_bold'.rand();
|
||||||
$buffer = str_replace(['<', '>', '</b>'], ['<', '>', $endOfBold], $buffer);
|
$endOfSpan = 'end_of_span'.rand();
|
||||||
|
$buffer = str_replace(['<', '>', '</b>', '</span>'], ['<', '>', $endOfBold, $endOfSpan], $buffer);
|
||||||
|
|
||||||
// will convert any UTF-8 char that can't be expressed in ASCII into an HTML entity
|
// will convert any UTF-8 char that can't be expressed in ASCII into an HTML entity
|
||||||
$buffer = mb_convert_encoding($buffer, 'HTML-ENTITIES');
|
$buffer = mb_convert_encoding($buffer, 'HTML-ENTITIES');
|
||||||
@@ -162,8 +163,8 @@ function processMakerShowCase($ID, $from_helpdesk) {
|
|||||||
|
|
||||||
$buffer = $dom->saveHTML();
|
$buffer = $dom->saveHTML();
|
||||||
|
|
||||||
// revert back </b>
|
// revert back </b> and </span>
|
||||||
$buffer = str_replace($endOfBold, '</b>', $buffer);
|
$buffer = str_replace([$endOfSpan, $endOfBold], ['</span>', '</b>'], $buffer);
|
||||||
|
|
||||||
// will revert back any char converted above
|
// will revert back any char converted above
|
||||||
$buffer = mb_convert_encoding($buffer, 'UTF-8', 'HTML-ENTITIES');
|
$buffer = mb_convert_encoding($buffer, 'UTF-8', 'HTML-ENTITIES');
|
||||||
@@ -245,11 +246,8 @@ Html::helpHeader(__('New ticket'), $_SERVER['PHP_SELF'], $_SESSION["glpiname"]);
|
|||||||
|
|
||||||
|
|
||||||
if (isset($_REQUEST['case_guid'])) {
|
if (isset($_REQUEST['case_guid'])) {
|
||||||
$res = $DB->request(
|
$res = $DB->request('glpi_plugin_processmaker_cases', ['case_guid' => $_REQUEST['case_guid']]);
|
||||||
'glpi_plugin_processmaker_cases', [
|
//$query = "SELECT * FROM glpi_plugin_processmaker_cases WHERE case_guid='".$_REQUEST['case_guid']."'";
|
||||||
'case_guid'=>$_REQUEST['case_guid']
|
|
||||||
]);
|
|
||||||
$query = "SELECT * FROM glpi_plugin_processmaker_cases WHERE case_guid='".$_REQUEST['case_guid']."'";
|
|
||||||
//$res = $DB->query( $query );
|
//$res = $DB->query( $query );
|
||||||
//if ($DB->numrows( $res )) { // a ticket already exists for this case, then show new cases
|
//if ($DB->numrows( $res )) { // a ticket already exists for this case, then show new cases
|
||||||
if ($res->numrows()) { // a ticket already exists for this case, then show new cases
|
if ($res->numrows()) { // a ticket already exists for this case, then show new cases
|
||||||
|
|||||||
16
hook.php
16
hook.php
@@ -124,9 +124,20 @@ function plugin_processmaker_addLeftJoin($type, $ref_table, $new_table, $linkfie
|
|||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function plugin_pre_item_update_processmaker(CommonITILObject $parm) {
|
function plugin_pre_item_update_processmaker(CommonITILObject $parm) {
|
||||||
global $DB;//, $PM_SOAP;
|
//global $DB;//, $PM_SOAP;
|
||||||
|
|
||||||
if (isset($_SESSION['glpiname'])) { // && $parm->getType() == 'Ticket') {
|
// look at previous status
|
||||||
|
if (isset($parm->input['status'])
|
||||||
|
&& $parm->input['status'] == CommonITILObject::SOLVED
|
||||||
|
&& !in_array($parm->fields['status'], [CommonITILObject::SOLVED, CommonITILObject::CLOSED])
|
||||||
|
&& !PluginProcessmakerCase::canSolve(['item' => $parm])) {
|
||||||
|
$parm->input = []; // empty array... to prevent item update
|
||||||
|
Session::addMessageAfterRedirect(__('At least one \'Process case\' is running!<br/>Solving is currently disabled!', 'processmaker'), false, ERROR);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (isset($_SESSION['glpiname'])) {
|
||||||
$locVar = [ ];
|
$locVar = [ ];
|
||||||
foreach ($parm->input as $key => $val) {
|
foreach ($parm->input as $key => $val) {
|
||||||
switch ($key) {
|
switch ($key) {
|
||||||
@@ -242,6 +253,7 @@ function plugin_processmaker_giveItem($itemtype, $ID, $data, $num) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function plugin_processmaker_change_profile() {
|
function plugin_processmaker_change_profile() {
|
||||||
if ($_SESSION['glpiactiveprofile']['interface'] == "helpdesk") {
|
if ($_SESSION['glpiactiveprofile']['interface'] == "helpdesk") {
|
||||||
// must add the rights for simplified interface
|
// must add the rights for simplified interface
|
||||||
|
|||||||
@@ -98,10 +98,11 @@ class PluginProcessmakerCase extends CommonDBTM {
|
|||||||
|
|
||||||
// count how many cases are on this item
|
// count how many cases are on this item
|
||||||
$cnt = count(self::getIDsFromItem($itemtype, $items_id));
|
$cnt = count(self::getIDsFromItem($itemtype, $items_id));
|
||||||
if ($cnt == 0) {
|
$tab = self::getTypeName(2); // to force plurial for tab name
|
||||||
return ['processmakercases' => __('Process case', 'processmaker')];
|
if ($cnt) {
|
||||||
|
$tab .= "<sup class='tab_nb'>$cnt</sup>";
|
||||||
}
|
}
|
||||||
return ['processmakercases' => _n('Process case', 'Process cases', $cnt, 'processmaker')."<sup class='tab_nb'>$cnt</sup>"];
|
return ['processmakercases' => $tab];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -240,49 +241,10 @@ class PluginProcessmakerCase extends CommonDBTM {
|
|||||||
// will unclaim the task
|
// will unclaim the task
|
||||||
// to unclaim a task, we must un-assign the task in the APP_DELEGATION table
|
// to unclaim a task, we must un-assign the task in the APP_DELEGATION table
|
||||||
// and un-assign the task in glpi_itemtypeTask table
|
// and un-assign the task in glpi_itemtypeTask table
|
||||||
$groupname = '';
|
|
||||||
|
|
||||||
// should get the group that is assigned to the task in SELF_SERVICE assign type
|
$groups_id_tech = $PM_SOAP->getGLPIGroupIdForSelfServiceTask($this->fields['case_guid'], $taskGuid);
|
||||||
$query = "SELECT TAS_GROUP_VARIABLE FROM TASK WHERE TAS_UID='".$taskGuid."' AND TAS_ASSIGN_TYPE='SELF_SERVICE' LIMIT 1;";
|
|
||||||
foreach($PM_DB->request($query) as $pmGroup) {
|
|
||||||
// should have only one record
|
|
||||||
if ($pmGroup['TAS_GROUP_VARIABLE'] == '') {
|
|
||||||
// then we are in the self-service with a group in the TASK_USER table
|
|
||||||
// TU_RELATION=2 is groups and TU_TYPE=1 means normal (= not adhoc)
|
|
||||||
// then get the group name from the CONTENT table
|
|
||||||
$query = "SELECT CONTENT.CON_VALUE FROM TASK_USER
|
|
||||||
JOIN CONTENT ON CONTENT.CON_ID=TASK_USER.USR_UID AND CONTENT.CON_CATEGORY='GRP_TITLE' AND CONTENT.CON_LANG = 'en'
|
|
||||||
WHERE TASK_USER.TAS_UID='".$taskGuid."' AND TASK_USER.TU_RELATION=2 AND TASK_USER.TU_TYPE=1 LIMIT 1;";
|
|
||||||
|
|
||||||
foreach ($PM_DB->request($query) as $onlyrec) {
|
if ($groups_id_tech !== false) {
|
||||||
$groupname = $onlyrec['CON_VALUE'];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
} else {
|
|
||||||
// then we are in the self-service with a case variable that contains either a group either an array of users
|
|
||||||
// array of users is not yet supported by PM plugin, as GLPI tasks have one and only one users_id_tech.
|
|
||||||
// group guid (in the case variable) must be retrieved from APP DATA
|
|
||||||
|
|
||||||
// TODO
|
|
||||||
////////////////////////////////////////////////////////////////
|
|
||||||
// Currently this case is not manageable by GLPI
|
|
||||||
// as GLPI needs at least a user or a group to be assigned to a task
|
|
||||||
// and when using the self-service value based assignment, there
|
|
||||||
// is a case variable that contains a list of users. This list of users cannot be mapped to a group in GLI
|
|
||||||
// OR may be we may create an artificial group in GLPI that would contains the list of users
|
|
||||||
////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
// and then we get the name of the group from the CONTENT table
|
|
||||||
//$query = "SELECT CON_VALUE FROM CONTENT
|
|
||||||
// WHERE CONTENT.CON_ID='$groupId' AND CONTENT.CON_CATEGORY='GRP_TITLE' AND CONTENT.CON_LANG='en' ;";
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$groups_id_tech = PluginProcessmakerProcessmaker::getGLPIGroupId($groupname);
|
|
||||||
|
|
||||||
if ($groups_id_tech) {
|
|
||||||
// unclaim the case only when a GLPI group can be found
|
// unclaim the case only when a GLPI group can be found
|
||||||
|
|
||||||
$query = "UPDATE APP_DELEGATION SET USR_UID='', DEL_INIT_DATE=NULL, USR_ID=0 WHERE APP_NUMBER=".$this->getID()." AND DEL_INDEX=$delIndex;";
|
$query = "UPDATE APP_DELEGATION SET USR_UID='', DEL_INIT_DATE=NULL, USR_ID=0 WHERE APP_NUMBER=".$this->getID()." AND DEL_INDEX=$delIndex;";
|
||||||
@@ -296,7 +258,7 @@ class PluginProcessmakerCase extends CommonDBTM {
|
|||||||
$glpi_task->update( ['id' => $glpi_task->getID(),
|
$glpi_task->update( ['id' => $glpi_task->getID(),
|
||||||
$foreignkey => $glpi_task->fields[$foreignkey],
|
$foreignkey => $glpi_task->fields[$foreignkey],
|
||||||
'users_id_tech' => 0,
|
'users_id_tech' => 0,
|
||||||
'groups_id_tech' => $groups_id_tech,
|
'groups_id_tech' => $groups_id_tech['id'],
|
||||||
'update' => true] );
|
'update' => true] );
|
||||||
PluginProcessmakerNotificationTargetProcessmaker::restoreNotificationState($donotif);
|
PluginProcessmakerNotificationTargetProcessmaker::restoreNotificationState($donotif);
|
||||||
|
|
||||||
@@ -318,7 +280,7 @@ class PluginProcessmakerCase extends CommonDBTM {
|
|||||||
$this->getNameID(['forceid' => true]),
|
$this->getNameID(['forceid' => true]),
|
||||||
DropdownTranslation::getTranslatedValue($glpi_task->fields['taskcategories_id'], 'TaskCategory', 'name', $_SESSION['glpilanguage'], $taskCat->fields['name']),
|
DropdownTranslation::getTranslatedValue($glpi_task->fields['taskcategories_id'], 'TaskCategory', 'name', $_SESSION['glpilanguage'], $taskCat->fields['name']),
|
||||||
Html::clean($dbu->getUserName(isset($glpi_task->oldvalues['users_id_tech']) ? $glpi_task->oldvalues['users_id_tech'] : 0)),
|
Html::clean($dbu->getUserName(isset($glpi_task->oldvalues['users_id_tech']) ? $glpi_task->oldvalues['users_id_tech'] : 0)),
|
||||||
Html::clean($groupname),
|
Html::clean($groups_id_tech['name']),
|
||||||
$options['comment']
|
$options['comment']
|
||||||
);
|
);
|
||||||
// unescape some chars and replace CRLF, CR or LF by <br/>
|
// unescape some chars and replace CRLF, CR or LF by <br/>
|
||||||
@@ -784,11 +746,7 @@ class PluginProcessmakerCase extends CommonDBTM {
|
|||||||
|
|
||||||
$items_id = $item->getField('id');
|
$items_id = $item->getField('id');
|
||||||
$itemtype = $item->getType();
|
$itemtype = $item->getType();
|
||||||
//if (!Session::haveRight("problem", Problem::READALL)
|
|
||||||
// || !$item->can($ID, READ)) {
|
|
||||||
|
|
||||||
// return false;
|
|
||||||
//}
|
|
||||||
|
|
||||||
$canupdate = $item->can($items_id, UPDATE);
|
$canupdate = $item->can($items_id, UPDATE);
|
||||||
|
|
||||||
@@ -810,13 +768,6 @@ class PluginProcessmakerCase extends CommonDBTM {
|
|||||||
]
|
]
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
//$query = "SELECT gppc.`id` AS assocID, gppc.`id` as id, gppp.id as pid, gppp.name as pname, gppc.`case_status`, gppc.`plugin_processmaker_cases_id`
|
|
||||||
// FROM `glpi_plugin_processmaker_cases` as gppc
|
|
||||||
// LEFT JOIN `glpi_plugin_processmaker_processes` AS gppp ON gppp.`id`=gppc.`plugin_processmaker_processes_id`
|
|
||||||
// WHERE gppc.`itemtype` = '$itemtype'
|
|
||||||
// AND gppc.`items_id` = $items_id
|
|
||||||
// ";
|
|
||||||
//$result = $DB->query($query);
|
|
||||||
|
|
||||||
$cases = [];
|
$cases = [];
|
||||||
$used = [];
|
$used = [];
|
||||||
@@ -832,17 +783,6 @@ class PluginProcessmakerCase extends CommonDBTM {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//if ($numrows = $DB->numrows($result)) {
|
|
||||||
// while ($data = $DB->fetch_assoc($result)) {
|
|
||||||
// $cases[$data['id']] = $data;
|
|
||||||
// $used[$data['id']] = $data['id'];
|
|
||||||
// if (isset($pid[$data['pid']])) {
|
|
||||||
// $pid[$data['pid']] += 1;
|
|
||||||
// } else {
|
|
||||||
// $pid[$data['pid']] = 1;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
$columns = ['pname' => __('Process', 'processmaker'),
|
$columns = ['pname' => __('Process', 'processmaker'),
|
||||||
'name' => __('Title', 'processmaker'),
|
'name' => __('Title', 'processmaker'),
|
||||||
@@ -922,11 +862,11 @@ class PluginProcessmakerCase extends CommonDBTM {
|
|||||||
$header_end .= "</tr>";
|
$header_end .= "</tr>";
|
||||||
echo $header_begin.$header_top.$header_end;
|
echo $header_begin.$header_top.$header_end;
|
||||||
|
|
||||||
//Session::initNavigateListItems('PluginProcessmakerCase',
|
Session::initNavigateListItems('PluginProcessmakerCase',
|
||||||
// //TRANS : %1$s is the itemtype name,
|
//TRANS : %1$s is the itemtype name,
|
||||||
// // %2$s is the name of the item (used for headings of a list)
|
// %2$s is the name of the item (used for headings of a list)
|
||||||
// sprintf(__('%1$s = %2$s'),
|
sprintf(__('%1$s = %2$s'),
|
||||||
// $itemtype::getTypeName(1), $item->fields["name"]));
|
$itemtype::getTypeName(1), $item->fields["name"]));
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
foreach ($cases as $data) {
|
foreach ($cases as $data) {
|
||||||
@@ -940,7 +880,7 @@ class PluginProcessmakerCase extends CommonDBTM {
|
|||||||
echo "<tr class='tab_bg_1'>";
|
echo "<tr class='tab_bg_1'>";
|
||||||
if ($canupdate) {
|
if ($canupdate) {
|
||||||
echo "<td width='10'>";
|
echo "<td width='10'>";
|
||||||
// prevent massiveaction on subprocess
|
// show massive action only for main cases (not for subcases)
|
||||||
if ($data['plugin_processmaker_cases_id'] == 0) {
|
if ($data['plugin_processmaker_cases_id'] == 0) {
|
||||||
Html::showMassiveActionCheckBox(__CLASS__, $data["assocID"]);
|
Html::showMassiveActionCheckBox(__CLASS__, $data["assocID"]);
|
||||||
}
|
}
|
||||||
@@ -951,7 +891,7 @@ class PluginProcessmakerCase extends CommonDBTM {
|
|||||||
echo "<td class='center'>".self::getStatus($data['case_status'])."</td>";
|
echo "<td class='center'>".self::getStatus($data['case_status'])."</td>";
|
||||||
echo "<td class='center'>";
|
echo "<td class='center'>";
|
||||||
if ($data['plugin_processmaker_cases_id'] > 0) {
|
if ($data['plugin_processmaker_cases_id'] > 0) {
|
||||||
// then this is a subprocess of
|
// then this is a subcase of
|
||||||
$maincase = new self;
|
$maincase = new self;
|
||||||
if ($maincase->getFromDB($data['plugin_processmaker_cases_id'])) {
|
if ($maincase->getFromDB($data['plugin_processmaker_cases_id'])) {
|
||||||
echo $maincase->getLink();
|
echo $maincase->getLink();
|
||||||
@@ -960,12 +900,11 @@ class PluginProcessmakerCase extends CommonDBTM {
|
|||||||
echo '-';
|
echo '-';
|
||||||
}
|
}
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
//echo "<td class='center'>".Html::convDateTime($data["date_creation"])."</td>";
|
|
||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
echo $header_begin.$header_top.$header_end;
|
echo $header_begin.$header_bottom.$header_end;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1148,20 +1087,29 @@ class PluginProcessmakerCase extends CommonDBTM {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//static function getIcon() {
|
||||||
|
// // return "fas fa-code-branch fa-rotate-90";
|
||||||
|
// return "fas fa-blog fa-flip-vertical";
|
||||||
|
// // return "fas fa-cogs fa-flip-vertical";
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Summary of getMenuContent
|
* Summary of getMenuContent
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
static function getMenuContent() {
|
static function getMenuContent() {
|
||||||
|
|
||||||
//if (!Session::haveRightsOr('plugin_processmaker_config', [READ, UPDATE])) {
|
if (!Session::haveRightsOr('plugin_processmaker_case', [READ, DELETE, CANCEL, ADHOC_REASSIGN])) {
|
||||||
// return;
|
return [];
|
||||||
//}
|
}
|
||||||
|
|
||||||
$front_page = "/plugins/processmaker/front";
|
$front_page = "/plugins/processmaker/front";
|
||||||
$menu = [];
|
$menu = [];
|
||||||
$menu['title'] = self::getTypeName(Session::getPluralNumber());
|
$menu['title'] = self::getTypeName(Session::getPluralNumber());
|
||||||
$menu['page'] = "$front_page/case.php";
|
$menu['page'] = "$front_page/case.php";
|
||||||
|
$menu['icon'] = "'></i><img src=\"/plugins/processmaker/pics/processmaker-xxs.png\" style=\"vertical-align: middle;\"/><i class='";
|
||||||
|
|
||||||
$menu['links']['search'] = PluginProcessmakerCase::getSearchURL(false);
|
$menu['links']['search'] = PluginProcessmakerCase::getSearchURL(false);
|
||||||
if (Session::haveRightsOr("config", [READ, UPDATE])) {
|
if (Session::haveRightsOr("config", [READ, UPDATE])) {
|
||||||
$menu['links']['config'] = PluginProcessmakerConfig::getFormURL(false);
|
$menu['links']['config'] = PluginProcessmakerConfig::getFormURL(false);
|
||||||
@@ -1547,7 +1495,7 @@ class PluginProcessmakerCase extends CommonDBTM {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function showForm ($ID, $options = ['candel'=>false]) {
|
function showForm($ID, $options = []) {
|
||||||
$options['colspan'] = 6;
|
$options['colspan'] = 6;
|
||||||
$options['formtitle'] = sprintf( __('Case status is \'%s\'', 'processmaker'), self::getStatus($this->fields['case_status']));
|
$options['formtitle'] = sprintf( __('Case status is \'%s\'', 'processmaker'), self::getStatus($this->fields['case_status']));
|
||||||
|
|
||||||
@@ -1564,7 +1512,9 @@ class PluginProcessmakerCase extends CommonDBTM {
|
|||||||
//echo '</div>' ;
|
//echo '</div>' ;
|
||||||
|
|
||||||
Html::closeForm();
|
Html::closeForm();
|
||||||
$options['candel'] = true;
|
|
||||||
|
$options['candel'] = $options['candel'] ?? $this->canPurgeItem($ID);
|
||||||
|
|
||||||
$this->showFormButtons($options);
|
$this->showFormButtons($options);
|
||||||
|
|
||||||
echo Html::scriptBlock("
|
echo Html::scriptBlock("
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ class PluginProcessmakerConfig extends CommonDBTM {
|
|||||||
if (empty($input["pm_dbserver_passwd"])) {
|
if (empty($input["pm_dbserver_passwd"])) {
|
||||||
unset($input["pm_dbserver_passwd"]);
|
unset($input["pm_dbserver_passwd"]);
|
||||||
} else {
|
} else {
|
||||||
$input["pm_dbserver_passwd"] = Toolbox::encrypt(stripslashes($input["pm_dbserver_passwd"]), GLPIKEY);
|
$input["pm_dbserver_passwd"] = Toolbox::sodiumEncrypt(stripslashes($input["pm_dbserver_passwd"]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -93,7 +93,7 @@ class PluginProcessmakerConfig extends CommonDBTM {
|
|||||||
if (empty($input["pm_admin_passwd"])) {
|
if (empty($input["pm_admin_passwd"])) {
|
||||||
unset($input["pm_admin_passwd"]);
|
unset($input["pm_admin_passwd"]);
|
||||||
} else {
|
} else {
|
||||||
$input["pm_admin_passwd"] = Toolbox::encrypt(stripslashes($input["pm_admin_passwd"]), GLPIKEY);
|
$input["pm_admin_passwd"] = Toolbox::sodiumEncrypt(stripslashes($input["pm_admin_passwd"]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -151,7 +151,7 @@ class PluginProcessmakerConfig extends CommonDBTM {
|
|||||||
];
|
];
|
||||||
|
|
||||||
$config = $PM_SOAP->config;
|
$config = $PM_SOAP->config;
|
||||||
$config->showFormHeader(['colspan' => 4]);
|
$config->showFormHeader(['colspan' => 2]);
|
||||||
|
|
||||||
if (!$config->fields['maintenance']) {
|
if (!$config->fields['maintenance']) {
|
||||||
|
|
||||||
@@ -226,7 +226,6 @@ class PluginProcessmakerConfig extends CommonDBTM {
|
|||||||
if ($config->fields['pm_server_URL'] != ''
|
if ($config->fields['pm_server_URL'] != ''
|
||||||
&& $config->fields['pm_workspace'] != ''
|
&& $config->fields['pm_workspace'] != ''
|
||||||
&& $config->fields["pm_admin_user"] != ''
|
&& $config->fields["pm_admin_user"] != ''
|
||||||
// && ($pm->login(true))) {
|
|
||||||
&& ($PM_SOAP->login(true))) {
|
&& ($PM_SOAP->login(true))) {
|
||||||
echo "<font color='green'>".__('Test successful');
|
echo "<font color='green'>".__('Test successful');
|
||||||
$setup_ok = true;
|
$setup_ok = true;
|
||||||
@@ -236,7 +235,7 @@ class PluginProcessmakerConfig extends CommonDBTM {
|
|||||||
}
|
}
|
||||||
echo "</font></span></td></tr>\n";
|
echo "</font></span></td></tr>\n";
|
||||||
|
|
||||||
echo "<tr><td colspan='4' class='center b'>".__('SQL server setup', 'processmaker')."</td></tr>";
|
echo "<tr><th colspan='2'>".__('SQL server setup', 'processmaker')."</th></tr>";
|
||||||
|
|
||||||
echo "<tr class='tab_bg_1'>";
|
echo "<tr class='tab_bg_1'>";
|
||||||
echo "<td >" . __('SQL server (MariaDB or MySQL)', 'processmaker') . "</td>";
|
echo "<td >" . __('SQL server (MariaDB or MySQL)', 'processmaker') . "</td>";
|
||||||
@@ -268,7 +267,7 @@ class PluginProcessmakerConfig extends CommonDBTM {
|
|||||||
}
|
}
|
||||||
echo "</font></span></td></tr>\n";
|
echo "</font></span></td></tr>\n";
|
||||||
|
|
||||||
echo "<tr><td colspan='4' class='center b'>".__('Settings')."</td></tr>";
|
echo "<tr><th colspan='2' >".__('Settings')."</th></tr>";
|
||||||
|
|
||||||
echo "<tr class='tab_bg_1'>";
|
echo "<tr class='tab_bg_1'>";
|
||||||
echo "<td >".__('Theme Name', 'processmaker')."</td><td >";
|
echo "<td >".__('Theme Name', 'processmaker')."</td><td >";
|
||||||
@@ -284,7 +283,7 @@ class PluginProcessmakerConfig extends CommonDBTM {
|
|||||||
echo "</td></tr>\n";
|
echo "</td></tr>\n";
|
||||||
|
|
||||||
echo "<tr class='tab_bg_1'>";
|
echo "<tr class='tab_bg_1'>";
|
||||||
echo "<td >".__('Task Writer (edit to change name)', 'processmaker')."</td><td >";
|
echo "<td >".__('Task writer (edit to change name)', 'processmaker')."</td><td >";
|
||||||
$rand = mt_rand();
|
$rand = mt_rand();
|
||||||
User::dropdown(['name' => 'users_id',
|
User::dropdown(['name' => 'users_id',
|
||||||
'display_emptychoice' => true,
|
'display_emptychoice' => true,
|
||||||
@@ -307,18 +306,10 @@ class PluginProcessmakerConfig extends CommonDBTM {
|
|||||||
echo "<td >".__('Group in ProcessMaker which will contain all GLPI users', 'processmaker')."</td><td >";
|
echo "<td >".__('Group in ProcessMaker which will contain all GLPI users', 'processmaker')."</td><td >";
|
||||||
|
|
||||||
$pmGroups = [ 0 => Dropdown::EMPTY_VALUE ];
|
$pmGroups = [ 0 => Dropdown::EMPTY_VALUE ];
|
||||||
//$res = $PM_DB->request([
|
|
||||||
// 'SELECT DISTINCT' => 'CON_ID',
|
|
||||||
// 'FIELDS' => 'CON_VALUE',
|
|
||||||
// 'FROM' => 'CONTENT',
|
|
||||||
// 'WHERE' => ['CON_CATEGORY' => 'GRP_TITLE'],
|
|
||||||
// 'ORDER' => 'CON_VALUE'
|
|
||||||
// ]);
|
|
||||||
//$query = "SELECT DISTINCT CON_ID, CON_VALUE FROM CONTENT WHERE CON_CATEGORY='GRP_TITLE' ORDER BY CON_VALUE;";
|
|
||||||
if ($PM_DB->connected) {
|
if ($PM_DB->connected) {
|
||||||
$res = $PM_DB->request([
|
$res = $PM_DB->request([
|
||||||
'SELECT DISTINCT' => 'CON_ID',
|
'DISTINCT' => 'CON_ID',
|
||||||
'FIELDS' => 'CON_VALUE',
|
'FIELDS' => ['CON_ID', 'CON_VALUE'],
|
||||||
'FROM' => 'CONTENT',
|
'FROM' => 'CONTENT',
|
||||||
'WHERE' => ['CON_CATEGORY' => 'GRP_TITLE'],
|
'WHERE' => ['CON_CATEGORY' => 'GRP_TITLE'],
|
||||||
'ORDER' => 'CON_VALUE'
|
'ORDER' => 'CON_VALUE'
|
||||||
@@ -338,21 +329,21 @@ class PluginProcessmakerConfig extends CommonDBTM {
|
|||||||
echo "</td></tr>\n";
|
echo "</td></tr>\n";
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
echo "<tr><td colspan='4' class='center b'>";
|
echo "<tr><td colspan='2' class='center b'>";
|
||||||
PluginProcessmakerProcessmaker::showUnderMaintenance();
|
PluginProcessmakerProcessmaker::showUnderMaintenance();
|
||||||
echo "</td></tr>";
|
echo "</td></tr>";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "<tr><td colspan='4' class='center b'>".__('Maintenance')."</td></tr>";
|
echo "<tr><th colspan='2'>".__('Maintenance')."</th></tr>";
|
||||||
|
|
||||||
echo "<tr class='tab_bg_1'>";
|
echo "<tr class='tab_bg_1'>";
|
||||||
echo "<td >".__('Maintenance mode')."</td><td >";
|
echo "<td >".__('Maintenance mode')."</td><td >";
|
||||||
Dropdown::showYesNo("maintenance", $config->fields['maintenance']);
|
Dropdown::showYesNo("maintenance", $config->fields['maintenance']);
|
||||||
echo "</td></tr>";
|
echo "</td></tr>";
|
||||||
|
|
||||||
echo "<tr><td colspan='4'></td></tr>";
|
echo "<tr><td colspan='2'></td></tr>";
|
||||||
|
|
||||||
echo "<tr><th colspan='4'>".__('Processmaker system information', 'processmaker')."</th></tr>";
|
echo "<tr><th colspan='2'>".__('ProcessMaker system information', 'processmaker')."</th></tr>";
|
||||||
if ($setup_ok) {
|
if ($setup_ok) {
|
||||||
$info = $PM_SOAP->systemInformation( );
|
$info = $PM_SOAP->systemInformation( );
|
||||||
echo '<tr><td>'.__('Version', 'processmaker').'</td><td>'.$info->version.'</td></tr>';
|
echo '<tr><td>'.__('Version', 'processmaker').'</td><td>'.$info->version.'</td></tr>';
|
||||||
@@ -367,7 +358,7 @@ class PluginProcessmakerConfig extends CommonDBTM {
|
|||||||
} else {
|
} else {
|
||||||
echo '<tr><td>'.__('Version', 'processmaker').'</td><td>'.__('Not yet!', 'processmaker').'</td></tr>';
|
echo '<tr><td>'.__('Version', 'processmaker').'</td><td>'.__('Not yet!', 'processmaker').'</td></tr>';
|
||||||
}
|
}
|
||||||
$config->showFormButtons(['candel' => false]);
|
$config->showFormButtons(['candel' => false, 'colspan' => 1]);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class PluginProcessmakerDB extends DBmysql {
|
|||||||
&& $config->fields['pm_workspace'] != '' ) {
|
&& $config->fields['pm_workspace'] != '' ) {
|
||||||
$this->dbhost = $config->fields['pm_dbserver_name'];
|
$this->dbhost = $config->fields['pm_dbserver_name'];
|
||||||
$this->dbuser = $config->fields['pm_dbserver_user'];
|
$this->dbuser = $config->fields['pm_dbserver_user'];
|
||||||
$this->dbpassword = Toolbox::decrypt($config->fields['pm_dbserver_passwd'], GLPIKEY);
|
$this->dbpassword = Toolbox::sodiumDecrypt($config->fields['pm_dbserver_passwd']);
|
||||||
$this->dbdefault = isset($config->fields['pm_dbname']) ? $config->fields['pm_dbname'] : '';
|
$this->dbdefault = isset($config->fields['pm_dbname']) ? $config->fields['pm_dbname'] : '';
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
}
|
}
|
||||||
|
|||||||
48
inc/glpikey.class.php
Normal file
48
inc/glpikey.class.php
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PluginProcessmakerGlpikey short summary.
|
||||||
|
*
|
||||||
|
* PluginProcessmakerGlpikey description.
|
||||||
|
*
|
||||||
|
* @version 1.0
|
||||||
|
* @author MoronO
|
||||||
|
*/
|
||||||
|
class PluginProcessmakerGlpikey extends GLPIKey {
|
||||||
|
|
||||||
|
protected $fields = [
|
||||||
|
'glpi_plugin_processmaker_configs.pm_admin_passwd',
|
||||||
|
'glpi_plugin_processmaker_configs.pm_dbserver_passwd',
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get fields
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function getFields() :array {
|
||||||
|
return $this->fields;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate GLPI security key used for decryptable passwords
|
||||||
|
* and update values in DB if necessary.
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
public function migratePasswords() {
|
||||||
|
global $DB;
|
||||||
|
|
||||||
|
// Fetch old key and migrate
|
||||||
|
$sodium_key = null;
|
||||||
|
$old_key = $this->getLegacyKey();
|
||||||
|
|
||||||
|
if ($DB instanceof DBmysql) {
|
||||||
|
return $this->migrateFieldsInDb($sodium_key, $old_key);
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -9,7 +9,7 @@ class PluginProcessmakerMenu extends CommonGLPI {
|
|||||||
static function getMenuContent() {
|
static function getMenuContent() {
|
||||||
|
|
||||||
if (!Session::haveRightsOr('plugin_processmaker_config', [READ, UPDATE])) {
|
if (!Session::haveRightsOr('plugin_processmaker_config', [READ, UPDATE])) {
|
||||||
return;
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$front_page = "/plugins/processmaker/front";
|
$front_page = "/plugins/processmaker/front";
|
||||||
@@ -20,6 +20,7 @@ class PluginProcessmakerMenu extends CommonGLPI {
|
|||||||
if (Session::haveRightsOr("config", [READ, UPDATE])) {
|
if (Session::haveRightsOr("config", [READ, UPDATE])) {
|
||||||
$menu['links']['config'] = PluginProcessmakerConfig::getFormURL(false);
|
$menu['links']['config'] = PluginProcessmakerConfig::getFormURL(false);
|
||||||
}
|
}
|
||||||
|
$menu['icon'] = "'></i><img src=\"/plugins/processmaker/pics/processmaker-xxs.png\" style=\"vertical-align: middle;\"/><i class='";
|
||||||
|
|
||||||
$itemtypes = ['PluginProcessmakerProcess' => 'processes',
|
$itemtypes = ['PluginProcessmakerProcess' => 'processes',
|
||||||
'PluginProcessmakerCaselink' => 'caselinks'
|
'PluginProcessmakerCaselink' => 'caselinks'
|
||||||
|
|||||||
@@ -45,6 +45,13 @@ class PluginProcessmakerProcess extends CommonDBTM {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// static function getIcon() {
|
||||||
|
//// return "fas fa-code-branch fa-rotate-90";
|
||||||
|
// return "fas fa-blog fa-flip-vertical";
|
||||||
|
//// return "fas fa-cogs fa-flip-vertical";
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get default values to search engine to override
|
* Get default values to search engine to override
|
||||||
**/
|
**/
|
||||||
@@ -525,7 +532,7 @@ class PluginProcessmakerProcess extends CommonDBTM {
|
|||||||
'id' => '14',
|
'id' => '14',
|
||||||
'table' => 'glpi_itilcategories',
|
'table' => 'glpi_itilcategories',
|
||||||
'field' => 'completename',
|
'field' => 'completename',
|
||||||
'name' => __('Category'),
|
'name' => __('Category (self-service)', 'processmaker'),
|
||||||
'datatype' => 'dropdown',
|
'datatype' => 'dropdown',
|
||||||
'massiveaction' => false
|
'massiveaction' => false
|
||||||
];
|
];
|
||||||
@@ -731,18 +738,41 @@ class PluginProcessmakerProcess extends CommonDBTM {
|
|||||||
Dropdown::showYesNo("is_request", $this->fields["is_request"]);
|
Dropdown::showYesNo("is_request", $this->fields["is_request"]);
|
||||||
echo "</td></tr>";
|
echo "</td></tr>";
|
||||||
|
|
||||||
|
echo "<tr class='tab_bg_1'>";
|
||||||
|
echo "<td rowspan=2>".__('Visible for Self-service interface (change ITIL Category for Self-service to enable / disable)', 'processmaker')."</td>";
|
||||||
|
echo "<td rowspan=2>".Dropdown::getYesNo($this->fields["itilcategories_id"])."</td>";
|
||||||
|
echo "<td >".__('Type for Self-service interface', 'processmaker')."</td><td>";
|
||||||
|
if (true) { // $canupdate || !$ID
|
||||||
|
|
||||||
|
$rand = Ticket::dropdownType('type',
|
||||||
|
['value' => $this->fields["type"],
|
||||||
|
]);
|
||||||
|
$params = ['type' => '__VALUE__',
|
||||||
|
'value' => $this->fields['itilcategories_id'],
|
||||||
|
'currenttype' => $this->fields['type'],
|
||||||
|
'condition' => ['is_helpdeskvisible' => '1']
|
||||||
|
];
|
||||||
|
|
||||||
|
Ajax::updateItemOnSelectEvent("dropdown_type$rand", "show_category_by_type",
|
||||||
|
$CFG_GLPI["root_doc"]."/plugins/processmaker/ajax/dropdownTicketCategories.php",
|
||||||
|
$params);
|
||||||
|
} else {
|
||||||
|
echo Ticket::getTicketTypeName($this->fields["type"]);
|
||||||
|
}
|
||||||
|
echo "</td></tr>";
|
||||||
|
|
||||||
echo "<tr class='tab_bg_1'>";
|
echo "<tr class='tab_bg_1'>";
|
||||||
echo "<td >".__('ITIL Category for Self-service interface (left empty to disable)', 'processmaker')."</td><td>";
|
echo "<td >".__('ITIL Category for Self-service interface (left empty to disable)', 'processmaker')."</td><td>";
|
||||||
if (true) { // $canupdate || !$ID || $canupdate_descr
|
if (true) { // $canupdate || !$ID || $canupdate_descr
|
||||||
$opt = ['value' => $this->fields["itilcategories_id"]];
|
$opt['value'] = $this->fields["itilcategories_id"];
|
||||||
|
$opt['condition']['is_helpdeskvisible'] = '1';
|
||||||
switch ($this->fields['type']) {
|
switch ($this->fields['type']) {
|
||||||
case Ticket::INCIDENT_TYPE :
|
case Ticket::INCIDENT_TYPE :
|
||||||
$opt['condition'] = "`is_incident`='1'";
|
$opt['condition']['is_incident'] = '1';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Ticket::DEMAND_TYPE :
|
case Ticket::DEMAND_TYPE :
|
||||||
$opt['condition'] = "`is_request`='1'";
|
$opt['condition']['is_request'] = '1';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default :
|
default :
|
||||||
@@ -750,32 +780,12 @@ class PluginProcessmakerProcess extends CommonDBTM {
|
|||||||
}
|
}
|
||||||
|
|
||||||
echo "<span id='show_category_by_type'>";
|
echo "<span id='show_category_by_type'>";
|
||||||
if (isset($idticketcategorysearch)) {
|
|
||||||
$opt['rand'] = $idticketcategorysearch;
|
|
||||||
}
|
|
||||||
Dropdown::show('ITILCategory', $opt);
|
Dropdown::show('ITILCategory', $opt);
|
||||||
echo "</span>";
|
echo "</span>";
|
||||||
} else {
|
} else {
|
||||||
echo Dropdown::getDropdownName("glpi_itilcategories", $this->fields["itilcategories_id"]);
|
echo Dropdown::getDropdownName("glpi_itilcategories", $this->fields["itilcategories_id"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "<td >".__('Type for Self-service interface', 'processmaker')."</td><td>";
|
|
||||||
if (true) { // $canupdate || !$ID
|
|
||||||
$idticketcategorysearch = mt_rand(); $opt = ['value' => $this->fields["type"]];
|
|
||||||
$rand = Ticket::dropdownType('type', $opt, [], ['toupdate' => "search_".$idticketcategorysearch ]);
|
|
||||||
$opt = ['value' => $this->fields["type"]];
|
|
||||||
$params = ['type' => '__VALUE__',
|
|
||||||
//'entity_restrict' => -1, //$this->fields['entities_id'],
|
|
||||||
'value' => $this->fields['itilcategories_id'],
|
|
||||||
'currenttype' => $this->fields['type']];
|
|
||||||
|
|
||||||
Ajax::updateItemOnSelectEvent("dropdown_type$rand", "show_category_by_type",
|
|
||||||
$CFG_GLPI["root_doc"]."/ajax/dropdownTicketCategories.php",
|
|
||||||
$params);
|
|
||||||
} else {
|
|
||||||
echo Ticket::getTicketTypeName($this->fields["type"]);
|
|
||||||
}
|
|
||||||
echo "</td>";
|
|
||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
|
|
||||||
echo "<tr class='tab_bg_1'>";
|
echo "<tr class='tab_bg_1'>";
|
||||||
|
|||||||
@@ -60,8 +60,7 @@ class PluginProcessmakerProcess_Profile extends CommonDBTM
|
|||||||
echo "</div>";
|
echo "</div>";
|
||||||
}
|
}
|
||||||
$res = $DB->request([
|
$res = $DB->request([
|
||||||
'SELECT DISTINCT' => 'gpp.id AS linkID',
|
'SELECT' => [
|
||||||
'FIELDS' => [
|
|
||||||
'gpp.id AS linkID',
|
'gpp.id AS linkID',
|
||||||
'glpi_profiles.id',
|
'glpi_profiles.id',
|
||||||
'glpi_profiles.name',
|
'glpi_profiles.name',
|
||||||
@@ -69,6 +68,7 @@ class PluginProcessmakerProcess_Profile extends CommonDBTM
|
|||||||
'glpi_entities.completename',
|
'glpi_entities.completename',
|
||||||
'gpp.entities_id'
|
'gpp.entities_id'
|
||||||
],
|
],
|
||||||
|
'DISTINCT' => true,
|
||||||
'FROM' => self::getTable() .' AS gpp',
|
'FROM' => self::getTable() .' AS gpp',
|
||||||
'LEFT JOIN' => [
|
'LEFT JOIN' => [
|
||||||
'glpi_profiles' => [
|
'glpi_profiles' => [
|
||||||
@@ -87,21 +87,6 @@ class PluginProcessmakerProcess_Profile extends CommonDBTM
|
|||||||
'WHERE' => [ 'gpp.plugin_processmaker_processes_id' => $ID ],
|
'WHERE' => [ 'gpp.plugin_processmaker_processes_id' => $ID ],
|
||||||
'ORDER' => [ 'glpi_profiles.name', 'glpi_entities.completename' ]
|
'ORDER' => [ 'glpi_profiles.name', 'glpi_entities.completename' ]
|
||||||
]);
|
]);
|
||||||
//$query = "SELECT DISTINCT gpp.`id` AS linkID,
|
|
||||||
// `glpi_profiles`.`id`,
|
|
||||||
// `glpi_profiles`.`name`,
|
|
||||||
// `gpp`.`is_recursive`,
|
|
||||||
// `glpi_entities`.`completename`,
|
|
||||||
// `gpp`.`entities_id`
|
|
||||||
// FROM `". self::getTable() ."` as gpp
|
|
||||||
// LEFT JOIN `glpi_profiles`
|
|
||||||
// ON (`gpp`.`profiles_id` = `glpi_profiles`.`id`)
|
|
||||||
// LEFT JOIN `glpi_entities`
|
|
||||||
// ON (`gpp`.`entities_id` = `glpi_entities`.`id`)
|
|
||||||
// WHERE `gpp`.`plugin_processmaker_processes_id` = '$ID'
|
|
||||||
// ORDER BY `glpi_profiles`.`name`, `glpi_entities`.`completename`";
|
|
||||||
//$result = $DB->query($query);
|
|
||||||
//$num = $DB->numrows($result);
|
|
||||||
$num = $res->numrows();
|
$num = $res->numrows();
|
||||||
echo "<div class='spaced'>";
|
echo "<div class='spaced'>";
|
||||||
Html::openMassiveActionsForm('mass'.__CLASS__.$rand);
|
Html::openMassiveActionsForm('mass'.__CLASS__.$rand);
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ class getVariableStruct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$pmHideSolution = false;
|
//$pmHideSolution = false;
|
||||||
|
|
||||||
|
|
||||||
if (!function_exists('http_formdata_flat_hierarchy')) {
|
if (!function_exists('http_formdata_flat_hierarchy')) {
|
||||||
@@ -247,7 +247,7 @@ class PluginProcessmakerProcessmaker extends CommonDBTM {
|
|||||||
}
|
}
|
||||||
if ($admin_or_user === true) { // admin rights has been requested, then force new login
|
if ($admin_or_user === true) { // admin rights has been requested, then force new login
|
||||||
$config = PluginProcessmakerConfig::getInstance();
|
$config = PluginProcessmakerConfig::getInstance();
|
||||||
$locSession = $this->pmSoapClient->login( [ 'userid' => $config->fields['pm_admin_user'], 'password' => Toolbox::decrypt($config->fields['pm_admin_passwd'], GLPIKEY)] );
|
$locSession = $this->pmSoapClient->login( [ 'userid' => $config->fields['pm_admin_user'], 'password' => Toolbox::sodiumDecrypt($config->fields['pm_admin_passwd'])] );
|
||||||
if (is_object( $locSession ) && $locSession->status_code == 0) {
|
if (is_object( $locSession ) && $locSession->status_code == 0) {
|
||||||
$_SESSION["pluginprocessmaker"]["session"]["admin"] = true;
|
$_SESSION["pluginprocessmaker"]["session"]["admin"] = true;
|
||||||
$_SESSION["pluginprocessmaker"]["session"]["id"] = $locSession->message;
|
$_SESSION["pluginprocessmaker"]["session"]["id"] = $locSession->message;
|
||||||
@@ -273,7 +273,7 @@ class PluginProcessmakerProcessmaker extends CommonDBTM {
|
|||||||
$pmusr->getFromDB($gusr->getID());
|
$pmusr->getFromDB($gusr->getID());
|
||||||
//if (!isset($pmusr->fields['password']) || $pmusr->fields['password'] == "") {
|
//if (!isset($pmusr->fields['password']) || $pmusr->fields['password'] == "") {
|
||||||
if (is_object($pmusr) && array_key_exists('pm_users_id', $pmusr->fields)) {
|
if (is_object($pmusr) && array_key_exists('pm_users_id', $pmusr->fields)) {
|
||||||
$pass = md5(Toolbox::encrypt( $gusr->getID().$gusr->getName().time(), GLPIKEY) );
|
$pass = md5(Toolbox::sodiumEncrypt($gusr->getID().$gusr->getName().time()));
|
||||||
//$pmusr->update( array('id' => $pmusr->getID(), 'password' => $pass) );
|
//$pmusr->update( array('id' => $pmusr->getID(), 'password' => $pass) );
|
||||||
// and must be updated also in PM db
|
// and must be updated also in PM db
|
||||||
$PM_DB->update('RBAC_USERS', ['USR_PASSWORD' => $pass], ['USR_UID' => $pmusr->fields['pm_users_id']]);
|
$PM_DB->update('RBAC_USERS', ['USR_PASSWORD' => $pass], ['USR_UID' => $pmusr->fields['pm_users_id']]);
|
||||||
@@ -1280,9 +1280,9 @@ class PluginProcessmakerProcessmaker extends CommonDBTM {
|
|||||||
//if($pmgrp_key = array_search($PM_SOAP->pm_group_guid, array_column($pmGroupList, 'guid'))) {
|
//if($pmgrp_key = array_search($PM_SOAP->pm_group_guid, array_column($pmGroupList, 'guid'))) {
|
||||||
// $pmgroup = $pmGroupList[$pmgrp_key];
|
// $pmgroup = $pmGroupList[$pmgrp_key];
|
||||||
//}
|
//}
|
||||||
foreach ($pmGroupList as $pmGroupList) {
|
foreach ($pmGroupList as $pmGrp) {
|
||||||
if ($pmGroupList->guid == $PM_SOAP->pm_group_guid) {
|
if ($pmGrp->guid == $PM_SOAP->pm_group_guid) {
|
||||||
$pmGroup = $pmGroupList;
|
$pmGroup = $pmGrp;
|
||||||
break; // to get the name :)
|
break; // to get the name :)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1313,7 +1313,7 @@ class PluginProcessmakerProcessmaker extends CommonDBTM {
|
|||||||
if ($user['is_active'] != 0 && $user['is_deleted'] != 1) {
|
if ($user['is_active'] != 0 && $user['is_deleted'] != 1) {
|
||||||
$status = "ACTIVE";
|
$status = "ACTIVE";
|
||||||
$task->addVolume(1);
|
$task->addVolume(1);
|
||||||
$pass = substr( Toolbox::encrypt($user['id'].$user['name'].time(), GLPIKEY), 0, 20);
|
$pass = md5(Toolbox::sodiumEncrypt($user['id'].$user['name'].time()));
|
||||||
$pmResult = $PM_SOAP->createUser($user['name'], $user['firstname'], $user['realname'], "", "PROCESSMAKER_OPERATOR", $pass, $status);
|
$pmResult = $PM_SOAP->createUser($user['name'], $user['firstname'], $user['realname'], "", "PROCESSMAKER_OPERATOR", $pass, $status);
|
||||||
if ($pmResult->status_code == 0) {
|
if ($pmResult->status_code == 0) {
|
||||||
$task->log( "Added user: '".$user['name']."'" );
|
$task->log( "Added user: '".$user['name']."'" );
|
||||||
@@ -1352,13 +1352,19 @@ class PluginProcessmakerProcessmaker extends CommonDBTM {
|
|||||||
// now should refresh the existing users
|
// now should refresh the existing users
|
||||||
$arrayIntersect = array_intersect_key( $glpiUserList, $pmUserList );
|
$arrayIntersect = array_intersect_key( $glpiUserList, $pmUserList );
|
||||||
foreach ($arrayIntersect as $user) {
|
foreach ($arrayIntersect as $user) {
|
||||||
if ($user['pmUserId'] == null || ($user['pmUserId'] != $pmUserList[strtolower($user['name'])]['guid'])) { //must be inserted into DB
|
$pmuserlistGuid = $pmUserList[strtolower($user['name'])]['guid'];
|
||||||
// insert into DB the link between glpi users and pm user
|
if ($user['pmUserId'] == null || ($user['pmUserId'] != $pmuserlistGuid)) { //must be deleted, inserted or updated into DB
|
||||||
|
$existingID = PluginProcessmakerUser::getGLPIUserId($pmuserlistGuid);
|
||||||
$pmuser = new PluginProcessmakerUser;
|
$pmuser = new PluginProcessmakerUser;
|
||||||
|
if ($existingID && $existingID != $user['id']) {
|
||||||
|
// there is already an existing record, must delete it before updating or adding
|
||||||
|
$ret = $pmuser->delete( [ 'id' => $existingID, 'pm_users_id' => $pmuserlistGuid ] );
|
||||||
|
}
|
||||||
|
// insert into DB the link between glpi users and pm user
|
||||||
if ($pmuser->getFromDB( $user['id'] )) {
|
if ($pmuser->getFromDB( $user['id'] )) {
|
||||||
$ret = $pmuser->update( [ 'id' => $user['id'], 'pm_users_id' => $pmUserList[strtolower($user['name'])]['guid'] ] );
|
$ret = $pmuser->update( [ 'id' => $user['id'], 'pm_users_id' => $pmuserlistGuid ] );
|
||||||
} else {
|
} else {
|
||||||
$ret = $pmuser->add( [ 'id' => $user['id'], 'pm_users_id' => $pmUserList[strtolower($user['name'])]['guid'] ] );
|
$ret = $pmuser->add( [ 'id' => $user['id'], 'pm_users_id' => $pmuserlistGuid ] );
|
||||||
}
|
}
|
||||||
|
|
||||||
//$query = "REPLACE INTO glpi_plugin_processmaker_users (glpi_users_id, pm_users_id) VALUES (".$user['id'].", '". $pmUserList[strtolower($user['name'])]['guid']."');" ;
|
//$query = "REPLACE INTO glpi_plugin_processmaker_users (glpi_users_id, pm_users_id) VALUES (".$user['id'].", '". $pmUserList[strtolower($user['name'])]['guid']."');" ;
|
||||||
@@ -1517,7 +1523,7 @@ class PluginProcessmakerProcessmaker extends CommonDBTM {
|
|||||||
$caseresetvariables['GLPI_ITEM_DUE_DATE'] = '';
|
$caseresetvariables['GLPI_ITEM_DUE_DATE'] = '';
|
||||||
}
|
}
|
||||||
$re = '/^(?\'date\'[0-9]{4}-[0-1][0-9]-[0-3][0-9])( (?\'time\'[0-2][0-9]:[0-5][0-9]:[0-5][0-9]))*$/';
|
$re = '/^(?\'date\'[0-9]{4}-[0-1][0-9]-[0-3][0-9])( (?\'time\'[0-2][0-9]:[0-5][0-9]:[0-5][0-9]))*$/';
|
||||||
if (preg_match($re, $parm->input['time_to_resolve'], $matches) && !array_key_exists('time', $matches)) {
|
if (isset($parm->input['time_to_resolve']) && preg_match($re, $parm->input['time_to_resolve'], $matches) && !array_key_exists('time', $matches)) {
|
||||||
$parm->input['time_to_resolve'] .= " 23:59:59";
|
$parm->input['time_to_resolve'] .= " 23:59:59";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1670,9 +1676,8 @@ class PluginProcessmakerProcessmaker extends CommonDBTM {
|
|||||||
* @param $items_id integer item id to which a task will be added
|
* @param $items_id integer item id to which a task will be added
|
||||||
* @param $caseInfo mixed getCaseInfoResponse object (see: getCaseInfo() function)
|
* @param $caseInfo mixed getCaseInfoResponse object (see: getCaseInfo() function)
|
||||||
* @param $delIndex integer index of the delegation
|
* @param $delIndex integer index of the delegation
|
||||||
* @param $techId integer GLPI user id to which a task must be assigned, if == 0 will use $groupId and/or $pmTaskId
|
* @param $techId integer GLPI user id to which a task must be assigned, if == 0 will use $pmTaskId
|
||||||
* @param $groupId string PM group guid to assign to task, used when $techId == 0
|
* @param $pmTaskId string PM task guid, used when $techID == 0 to dynamically find the group (Self-Service)
|
||||||
* @param $pmTaskId string PM task guid, used when $groupId == 0 AND $techID == 0
|
|
||||||
* @param $options array of options, default values are
|
* @param $options array of options, default values are
|
||||||
* 'txtTaskContent' => '',
|
* 'txtTaskContent' => '',
|
||||||
* 'start_date' => '',
|
* 'start_date' => '',
|
||||||
@@ -1680,7 +1685,7 @@ class PluginProcessmakerProcessmaker extends CommonDBTM {
|
|||||||
* 'notif' => true
|
* 'notif' => true
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public function addTask($cases_id, $itemtype, $items_id, $caseInfo, $delIndex, $techId, $groupId, $pmTaskId, $delThread, $options = []) {
|
public function addTask($cases_id, $itemtype, $items_id, $caseInfo, $delIndex, $techId, $pmTaskId, $delThread, $options = []) {
|
||||||
global $DB, $PM_DB, $_SESSION;
|
global $DB, $PM_DB, $_SESSION;
|
||||||
|
|
||||||
$dbu = new DbUtils;
|
$dbu = new DbUtils;
|
||||||
@@ -1739,77 +1744,9 @@ class PluginProcessmakerProcessmaker extends CommonDBTM {
|
|||||||
$input['users_id'] = $this->taskWriter;
|
$input['users_id'] = $this->taskWriter;
|
||||||
|
|
||||||
// manage groups
|
// manage groups
|
||||||
$groups_id_tech = 0;
|
if ($techId == 0) {
|
||||||
if ($techId == 0) { // then we must look-up DB to get the group that will be assigned to the task
|
// then we must look-up DB to get the group that will be assigned to the task
|
||||||
$groupname='';
|
$groups_id_tech = $this->getGLPIGroupIdForSelfServiceTask($caseInfo->caseId, $pmTaskId);
|
||||||
if ($groupId == 0) {
|
|
||||||
// TU_RELATION=2 is groups and TU_TYPE=1 means normal (= not adhoc)
|
|
||||||
$res = $PM_DB->request([
|
|
||||||
'SELECT' => 'CONTENT.CON_VALUE',
|
|
||||||
'FROM' => 'TASK_USER',
|
|
||||||
'INNER JOIN' => [
|
|
||||||
'CONTENT' => [
|
|
||||||
'AND' => [
|
|
||||||
'FKEY' => [
|
|
||||||
'CONTENT' => 'CON_ID',
|
|
||||||
'TASK_USER' => 'USR_UID'
|
|
||||||
],
|
|
||||||
['CONTENT.CON_CATEGORY' => 'GRP_TITLE'],
|
|
||||||
['CONTENT.CON_LANG' => 'en']
|
|
||||||
]
|
|
||||||
]
|
|
||||||
],
|
|
||||||
'WHERE' => [
|
|
||||||
'AND' => [
|
|
||||||
'TASK_USER.TAS_UID' => $pmTaskId,
|
|
||||||
'TASK_USER.TU_RELATION' => 2,
|
|
||||||
'TASK_USER.TU_TYPE' => 1
|
|
||||||
]
|
|
||||||
],
|
|
||||||
'LIMIT' => 1
|
|
||||||
]);
|
|
||||||
//$query = "SELECT CONTENT.CON_VALUE FROM TASK_USER
|
|
||||||
// JOIN CONTENT ON CONTENT.CON_ID=TASK_USER.USR_UID AND CONTENT.CON_CATEGORY='GRP_TITLE' AND CONTENT.CON_LANG = 'en'
|
|
||||||
// WHERE TASK_USER.TAS_UID='$pmTaskId' AND TASK_USER.TU_RELATION=2 LIMIT 1;";
|
|
||||||
} else {
|
|
||||||
$res = $PM_DB->request([
|
|
||||||
'SELECT' => 'CON_VALUE',
|
|
||||||
'FROM' => 'CONTENT',
|
|
||||||
'WHERE' => [
|
|
||||||
'AND' => [
|
|
||||||
'CONTENT.CON_ID' => $groupId,
|
|
||||||
'CONTENT.CON_CATEGORY' => 'GRP_TITLE',
|
|
||||||
'CONTENT.CON_LANG' => 'en'
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]);
|
|
||||||
//$query = "SELECT CON_VALUE FROM CONTENT
|
|
||||||
// WHERE CONTENT.CON_ID='$groupId' AND CONTENT.CON_CATEGORY='GRP_TITLE' AND CONTENT.CON_LANG='en' ;";
|
|
||||||
}
|
|
||||||
// as there is a LIMIT of 1
|
|
||||||
// or
|
|
||||||
// as there is only one group per guid
|
|
||||||
// then we should have at maximun 1 record
|
|
||||||
foreach ($res as $onlyrec) {
|
|
||||||
//foreach ($PM_DB->request($query) as $onlyrec) {
|
|
||||||
$groupname = $onlyrec['CON_VALUE'];
|
|
||||||
}
|
|
||||||
|
|
||||||
$res = $DB->request([
|
|
||||||
'SELECT' => 'id AS glpi_group_id',
|
|
||||||
'FROM' => 'glpi_groups',
|
|
||||||
'WHERE' => ['name' => ['LIKE', $groupname]]
|
|
||||||
]);
|
|
||||||
if ($row = $res->next()) {
|
|
||||||
$groups_id_tech = $row['glpi_group_id'];
|
|
||||||
}
|
|
||||||
//$query = "SELECT id AS glpi_group_id FROM glpi_groups WHERE name LIKE '$groupname';";
|
|
||||||
//$res = $DB->query($query);
|
|
||||||
//if ($DB->numrows($res) > 0) {
|
|
||||||
// $row = $DB->fetch_array( $res );
|
|
||||||
// $groups_id_tech = $row['glpi_group_id'];
|
|
||||||
//}
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// adds the user tech to ticket watcher if neccessary
|
// adds the user tech to ticket watcher if neccessary
|
||||||
self::addWatcher( $itemtype, $items_id, $techId );
|
self::addWatcher( $itemtype, $items_id, $techId );
|
||||||
@@ -1836,8 +1773,8 @@ class PluginProcessmakerProcessmaker extends CommonDBTM {
|
|||||||
$input['users_id_tech'] = 0; // by default as it can't be empty
|
$input['users_id_tech'] = 0; // by default as it can't be empty
|
||||||
if ($techId) {
|
if ($techId) {
|
||||||
$input['users_id_tech'] = $techId;
|
$input['users_id_tech'] = $techId;
|
||||||
} else if ($groups_id_tech) {
|
} else if (is_array($groups_id_tech)) {
|
||||||
$input['groups_id_tech'] = $groups_id_tech;
|
$input['groups_id_tech'] = $groups_id_tech['id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($options['reminder'] != '' && $techId) {
|
if ($options['reminder'] != '' && $techId) {
|
||||||
@@ -1881,34 +1818,17 @@ class PluginProcessmakerProcessmaker extends CommonDBTM {
|
|||||||
|
|
||||||
// send notification if needed for new task as now we have the PluginProcessmakerTask in the DB
|
// send notification if needed for new task as now we have the PluginProcessmakerTask in the DB
|
||||||
$donotif = PluginProcessmakerNotificationTargetProcessmaker::saveNotificationState($options['notif']);
|
$donotif = PluginProcessmakerNotificationTargetProcessmaker::saveNotificationState($options['notif']);
|
||||||
// Notification management
|
|
||||||
$item = new $itemtype;
|
// send notification now!
|
||||||
$item->getFromDB($items_id);
|
|
||||||
// search if at least one active notification is existing for that pm task with that event 'task_update_'.$glpi_task->fields['taskcategories_id']
|
|
||||||
$res = PluginProcessmakerNotificationTargetTask::getNotifications('task_add', $glpi_task->fields['taskcategories_id'], $item->fields['entities_id']);
|
|
||||||
if ($res['notifications'] && count($res['notifications']) > 0) {
|
|
||||||
$pm_task = new PluginProcessmakerTask($glpi_task->getType());
|
$pm_task = new PluginProcessmakerTask($glpi_task->getType());
|
||||||
$pm_task->getFromDB($glpi_task->getId());
|
$pm_task->getFromDB($glpi_task->getId());
|
||||||
NotificationEvent::raiseEvent($res['event'],
|
$glpi_item = new $itemtype;
|
||||||
$pm_task,
|
$glpi_item->getFromDB($items_id);
|
||||||
['plugin_processmaker_cases_id' => $cases_id,
|
$pm_task->sendNotification('task_add', $glpi_task, $glpi_item);
|
||||||
'itemtype' => $glpi_task->getType(),
|
|
||||||
'task_id' => $glpi_task->getID(),
|
|
||||||
'is_private' => isset($glpi_task->fields['is_private']) ? $glpi_task->fields['is_private'] : 0,
|
|
||||||
'entities_id' => $item->fields['entities_id']
|
|
||||||
]);
|
|
||||||
} else {
|
|
||||||
NotificationEvent::raiseEvent('add_task',
|
|
||||||
$item,
|
|
||||||
['plugin_processmaker_cases_id' => $cases_id,
|
|
||||||
'itemtype' => $itemtype,
|
|
||||||
'task_id' => $glpi_task->getID(),
|
|
||||||
'is_private' => isset($glpi_task->fields['is_private']) ? $glpi_task->fields['is_private'] : 0
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
PluginProcessmakerNotificationTargetProcessmaker::restoreNotificationState($donotif);
|
PluginProcessmakerNotificationTargetProcessmaker::restoreNotificationState($donotif);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1921,12 +1841,14 @@ class PluginProcessmakerProcessmaker extends CommonDBTM {
|
|||||||
*/
|
*/
|
||||||
static function getGLPIGroupId(string $pmGroupName) {
|
static function getGLPIGroupId(string $pmGroupName) {
|
||||||
global $DB;
|
global $DB;
|
||||||
|
if ($pmGroupName != '') {
|
||||||
$query = "SELECT id AS glpi_group_id FROM glpi_groups WHERE name LIKE '$pmGroupName';";
|
$query = "SELECT id AS glpi_group_id FROM glpi_groups WHERE name LIKE '$pmGroupName';";
|
||||||
$res = $DB->query($query);
|
$res = $DB->query($query);
|
||||||
if ($DB->numrows($res) > 0) {
|
if ($DB->numrows($res) > 0) {
|
||||||
$row = $DB->fetch_array($res);
|
$row = $DB->fetch_array($res);
|
||||||
return $row['glpi_group_id'];
|
return $row['glpi_group_id'];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1967,7 +1889,6 @@ class PluginProcessmakerProcessmaker extends CommonDBTM {
|
|||||||
$caseInfo,
|
$caseInfo,
|
||||||
$caseInfo->currentUsers[0]->delIndex,
|
$caseInfo->currentUsers[0]->delIndex,
|
||||||
$userId,
|
$userId,
|
||||||
0,
|
|
||||||
$caseInfo->currentUsers[0]->taskId,
|
$caseInfo->currentUsers[0]->taskId,
|
||||||
$caseInfo->currentUsers[0]->delThread,
|
$caseInfo->currentUsers[0]->delThread,
|
||||||
$options
|
$options
|
||||||
@@ -2187,29 +2108,12 @@ class PluginProcessmakerProcessmaker extends CommonDBTM {
|
|||||||
|
|
||||||
// send notification if needed for new task as now the PluginProcessmakerTask has been updated in the DB
|
// send notification if needed for new task as now the PluginProcessmakerTask has been updated in the DB
|
||||||
$donotif = PluginProcessmakerNotificationTargetProcessmaker::saveNotificationState($options['notif']);
|
$donotif = PluginProcessmakerNotificationTargetProcessmaker::saveNotificationState($options['notif']);
|
||||||
// Notification management
|
|
||||||
// search if at least one active notification is existing for that pm task with that event 'task_update_'.$glpi_task->fields['taskcategories_id']
|
// send notification now!
|
||||||
$res = PluginProcessmakerNotificationTargetTask::getNotifications('task_done', $glpi_task->fields['taskcategories_id'], $hostItem->fields['entities_id']);
|
|
||||||
if ($res['notifications'] && count($res['notifications']) > 0) {
|
|
||||||
$pm_task = new PluginProcessmakerTask($glpi_task->getType());
|
$pm_task = new PluginProcessmakerTask($glpi_task->getType());
|
||||||
$pm_task->getFromDB($glpi_task->getId());
|
$pm_task->getFromDB($glpi_task->getId());
|
||||||
NotificationEvent::raiseEvent($res['event'],
|
$pm_task->sendNotification('task_done', $glpi_task, $hostItem);
|
||||||
$pm_task,
|
|
||||||
['plugin_processmaker_cases_id' => $cases_id,
|
|
||||||
'itemtype' => $glpi_task->getType(),
|
|
||||||
'task_id' => $glpi_task->getID(),
|
|
||||||
'is_private' => isset($glpi_task->fields['is_private']) ? $glpi_task->fields['is_private'] : 0,
|
|
||||||
'entities_id' => $hostItem->fields['entities_id']
|
|
||||||
]);
|
|
||||||
} else {
|
|
||||||
NotificationEvent::raiseEvent('update_task',
|
|
||||||
$hostItem,
|
|
||||||
['plugin_processmaker_cases_id' => $cases_id,
|
|
||||||
'itemtype' => $hostItem->getType(),
|
|
||||||
'task_id' => $glpi_task->getID(),
|
|
||||||
'is_private' => isset($glpi_task->fields['is_private']) ? $glpi_task->fields['is_private'] : 0
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
PluginProcessmakerNotificationTargetProcessmaker::restoreNotificationState($donotif);
|
PluginProcessmakerNotificationTargetProcessmaker::restoreNotificationState($donotif);
|
||||||
|
|
||||||
// restore current glpi time
|
// restore current glpi time
|
||||||
@@ -2368,7 +2272,13 @@ class PluginProcessmakerProcessmaker extends CommonDBTM {
|
|||||||
// look if it is a meta task for this process
|
// look if it is a meta task for this process
|
||||||
// means a re-assign or an un-claim task info
|
// means a re-assign or an un-claim task info
|
||||||
$pm_process = new PluginProcessmakerProcess;
|
$pm_process = new PluginProcessmakerProcess;
|
||||||
if ($pm_process->getFromDBByQuery( " WHERE `taskcategories_id` = ".$params['item']->fields['taskcategories_id'])) {
|
$restrict=[
|
||||||
|
'WHERE' => [
|
||||||
|
'taskcategories_id' => $params['item']->fields['taskcategories_id']
|
||||||
|
],
|
||||||
|
];
|
||||||
|
//if ($pm_process->getFromDBByQuery( " WHERE `taskcategories_id` = ".$params['item']->fields['taskcategories_id'])) {
|
||||||
|
if ($pm_process->getFromDBByRequest($restrict)) {
|
||||||
// then look into content to get case id
|
// then look into content to get case id
|
||||||
$re = '/<input name=\'caseid\' type=\'hidden\' value=\'(?\'caseid\'\d+)\'><input name=\'taskid\' type=\'hidden\' value=\'(?\'taskid\'\d+)\'>/';
|
$re = '/<input name=\'caseid\' type=\'hidden\' value=\'(?\'caseid\'\d+)\'><input name=\'taskid\' type=\'hidden\' value=\'(?\'taskid\'\d+)\'>/';
|
||||||
if (preg_match($re, $params['item']->fields['content'], $matches)) {
|
if (preg_match($re, $params['item']->fields['content'], $matches)) {
|
||||||
@@ -2390,27 +2300,22 @@ class PluginProcessmakerProcessmaker extends CommonDBTM {
|
|||||||
} else {
|
} else {
|
||||||
$params['item']->fields['content'] = str_replace( '##processmaker.taskcomment##', $taskComment, $params['item']->fields['content'] );
|
$params['item']->fields['content'] = str_replace( '##processmaker.taskcomment##', $taskComment, $params['item']->fields['content'] );
|
||||||
}
|
}
|
||||||
$taskJSId = strtolower("viewitem".$params['item']->getType().$params['item']->getId());
|
$taskJSId = strtolower("viewitem".$params['item']->getType().$params['item']->getId()); //.$params['options']['rand']);
|
||||||
|
|
||||||
// special case for <hr> which will provoke the rendering to be split into several <p>
|
|
||||||
// add <p></p> which othervise will be missing
|
|
||||||
if (stripos($params['item']->fields['content'], '<hr>') !== false) {
|
|
||||||
$params['item']->fields['content'] = str_ireplace('<hr>', '<hr><p>', $params['item']->fields['content']).'</p>';
|
|
||||||
}
|
|
||||||
|
|
||||||
$tmpCase = new PluginProcessmakerCase;
|
$tmpCase = new PluginProcessmakerCase;
|
||||||
$tmpCase->getFromDB($pmTask->fields['plugin_processmaker_cases_id']);
|
$tmpCase->getFromDB($pmTask->fields['plugin_processmaker_cases_id']);
|
||||||
$urlLink = $tmpCase->getLinkURL().'&forcetab=PluginProcessmakerTask$'.$pmTask->fields['items_id'];
|
$urlLink = $tmpCase->getLinkURL().'&forcetab=PluginProcessmakerTask$'.$pmTask->fields['items_id'];
|
||||||
|
|
||||||
echo Html::scriptBlock( "
|
echo Html::scriptBlock( "
|
||||||
$('#$taskJSId').find('.item_content').children().not('.read_more').on('click', function ( ) {
|
function $taskJSId(ev) {
|
||||||
//debugger;
|
//debugger;
|
||||||
document.location='$urlLink'
|
if ($(ev.target).parent('.read_more').length == 0) {
|
||||||
} ).css('cursor', 'pointer') ;
|
document.location='$urlLink';
|
||||||
$('tr[id=\"$taskJSId\"]').children().on('click', function ( ) {
|
}
|
||||||
//debugger;
|
};
|
||||||
document.location='$urlLink'
|
$('#$taskJSId').find('.item_content').on('click', $taskJSId).css('cursor', 'pointer');
|
||||||
} ).css('cursor', 'pointer') ;
|
$('#$taskJSId').find('.read_more').css('cursor', 'auto');
|
||||||
|
$('tr[id=\"$taskJSId\"]').children().on('click', $taskJSId).css('cursor', 'pointer');
|
||||||
");
|
");
|
||||||
|
|
||||||
$params['item']->fields['content'] = str_replace( ["\n##processmakercase.url##", '\n##processmakercase.url##', '##processmakercase.url##'], "", $params['item']->fields['content'] );
|
$params['item']->fields['content'] = str_replace( ["\n##processmakercase.url##", '\n##processmakercase.url##', '##processmakercase.url##'], "", $params['item']->fields['content'] );
|
||||||
@@ -2425,130 +2330,64 @@ class PluginProcessmakerProcessmaker extends CommonDBTM {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Summary of pre_show_tab_arbehaviours
|
* Summary of pre_show_tab_arbehaviours
|
||||||
* @param array $params info about tab to be shown
|
* @param array $params info about tab to be shown
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
static function pre_show_tab_processmaker($params) {
|
static function pre_show_tab_processmaker($params) {
|
||||||
global $pmHideSolution;
|
//global $pmHideSolution;
|
||||||
$plugin = new Plugin();
|
$plugin = new Plugin();
|
||||||
$itemtype = $params['item']->getType();
|
$itemtype = $params['item']->getType();
|
||||||
switch ($itemtype) {
|
if (in_array($itemtype, ['Ticket', 'Problem', 'Change'])
|
||||||
case 'Ticket':
|
&& $params['options']['id']
|
||||||
case 'Problem':
|
&& $params['options']['itemtype'] == $itemtype
|
||||||
case 'Change':
|
&& $params['options']['tabnum'] == 1
|
||||||
if ($params['options']['id'] && $params['options']['itemtype'] == $itemtype) {
|
&& !PluginProcessmakerCase::canSolve($params)
|
||||||
|
&& Session::getCurrentInterface() == "central") {
|
||||||
// then we are in an ITIL Object
|
// then we are in an ITIL Object
|
||||||
if (isset($_SESSION['glpiactiveprofile']['interface']) && $_SESSION['glpiactiveprofile']['interface'] != "helpdesk") {
|
// tabnum 1 : Processing Ticket
|
||||||
$tabnum = $params['options']['tabnum'];
|
// a case may be solved or not (ex: PIR tasks for Change Management)
|
||||||
// tabnum 1 : Processing Ticket, tabnum 2 : Solution
|
|
||||||
|
|
||||||
if ($tabnum == 2 or $tabnum == 1) {
|
|
||||||
// we must check if we can solve item even if PM case is still running (ex: PIR tasks for Change Management)
|
|
||||||
$pmCanSolve = PluginProcessmakerCase::canSolve( $params );
|
|
||||||
if (!$pmCanSolve) {
|
|
||||||
// don't display message if arbehaviours is install and activated
|
// don't display message if arbehaviours is install and activated
|
||||||
if (!$plugin->isInstalled('arbehaviours') || !$plugin->isActivated('arbehaviours')) {
|
|
||||||
$messageOne = __('A \'Case\' is running!', 'processmaker');
|
|
||||||
$messageTwo = __('You must manage it first (see \'Process - Case\' tab)!', 'processmaker');
|
|
||||||
// output explicit message to explain why it's not possible to add solution
|
|
||||||
|
|
||||||
$message = "<div style='margin-bottom: 20px;' class='box'>
|
|
||||||
<div class='box-tleft'>
|
|
||||||
<div class='box-tright'>
|
|
||||||
<div class='box-tcenter'>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class='box-mleft'>
|
|
||||||
<div class='box-mright'>
|
|
||||||
<div class='box-mcenter'>
|
|
||||||
<h3>
|
|
||||||
<span class='red'>".$messageOne."
|
|
||||||
<br>
|
|
||||||
</span>
|
|
||||||
</h3>
|
|
||||||
<h3>
|
|
||||||
<span >".$messageTwo."
|
|
||||||
</span>
|
|
||||||
</h3>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class='box-bleft'>
|
|
||||||
<div class='box-bright'>
|
|
||||||
<div class='box-bcenter'>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div> ";
|
|
||||||
}
|
|
||||||
|
|
||||||
$pmHideSolution = true;
|
|
||||||
$itemtype = strtolower($itemtype);
|
$itemtype = strtolower($itemtype);
|
||||||
if ($tabnum == 1 && isset($_SESSION['glpiactiveprofile'][$itemtype.'_status'])) {
|
if ((!$plugin->isInstalled('arbehaviours') || !$plugin->isActivated('arbehaviours'))
|
||||||
// don't display message if arbehaviours is install and activated
|
&& isset($_SESSION['glpiactiveprofile'][$itemtype.'_status'])) {
|
||||||
if (!$plugin->isInstalled('arbehaviours') || !$plugin->isActivated('arbehaviours')) {
|
|
||||||
self::displayMessage($message, '', WARNING);
|
|
||||||
|
|
||||||
//save current $_SESSION['glpiactiveprofile'][$itemtype.'_status'']
|
echo Html::scriptBlock("
|
||||||
$_SESSION['glpiactiveprofile'][$itemtype.'_status_save'] = $_SESSION['glpiactiveprofile'][$itemtype.'_status'];
|
//$('head').append('<style type=\"text/css\">li.solution {pointer-events:none; opacity:0.3;}</style>');
|
||||||
// for all $params['options']['itemtype']. status, disable solved ( life cycles )
|
debugger;
|
||||||
foreach ($_SESSION['glpiactiveprofile'][$itemtype.'_status'] as $key => $value) {
|
$('li.solution').css({pointerEvents: 'none', opacity: 0.3});
|
||||||
$_SESSION['glpiactiveprofile'][$itemtype.'_status'][$key][CommonITILObject::SOLVED] = 0;
|
|
||||||
}
|
");
|
||||||
}
|
|
||||||
} else {
|
self::displayMessage(__('At least one \'Process case\' is running!<br/>Adding a solution is currently disabled!', 'processmaker'), false, INFO);
|
||||||
// then output a new div and hide solution for content
|
|
||||||
echo $message;
|
////backup current $_SESSION['glpiactiveprofile'][$itemtype.'_status']
|
||||||
echo "<div id='toHideSolution' style='display: none;'>";
|
//$_SESSION['glpiactiveprofile'][$itemtype.'_status_pm_save'] = $_SESSION['glpiactiveprofile'][$itemtype.'_status'];
|
||||||
}
|
|
||||||
}
|
//// for all $params['options']['itemtype'].status, we must disable solved (life cycles)
|
||||||
|
//foreach ($_SESSION['glpiactiveprofile'][$itemtype.'_status'] as $key => $value) {
|
||||||
|
// //$_SESSION['glpiactiveprofile'][$itemtype.'_status'][$key][CommonITILObject::SOLVED] = 0;
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
//public static function post_show_tab_processmaker($params) {
|
||||||
|
|
||||||
public static function post_show_tab_processmaker($params) {
|
// //$itemtype = strtolower($params['item']->getType());
|
||||||
global $pmHideSolution;
|
// //if (isset($_SESSION['glpiactiveprofile'][$itemtype.'_status_pm_save'])) {
|
||||||
|
// // // we must restore rigths
|
||||||
|
// // // replace $_SESSION['glpiactiveprofile'][$itemtype.'_status'] with saved value
|
||||||
|
|
||||||
$itemtype = $params['item']->getType();
|
// // $_SESSION['glpiactiveprofile'][$itemtype.'_status'] = $_SESSION['glpiactiveprofile'][$itemtype.'_status_pm_save'];
|
||||||
switch ($itemtype) {
|
// // unset($_SESSION['glpiactiveprofile'][$itemtype.'_status_save']);
|
||||||
|
// //}
|
||||||
|
|
||||||
case 'Ticket':
|
//}
|
||||||
case 'Problem':
|
|
||||||
case 'Change':
|
|
||||||
if ($params['options']['id']) {
|
|
||||||
// then we are in an itil object
|
|
||||||
if (isset($_SESSION['glpiactiveprofile']['interface']) && $_SESSION['glpiactiveprofile']['interface'] != "helpdesk") {
|
|
||||||
$tabnum = $params['options']['tabnum'];
|
|
||||||
|
|
||||||
if ($tabnum == 2 or $tabnum == 1) {
|
|
||||||
// then we are showing the Solution tab or Processing Ticket tab
|
|
||||||
|
|
||||||
if ($pmHideSolution) {
|
|
||||||
echo "</div>";
|
|
||||||
|
|
||||||
}
|
|
||||||
$itemtype = strtolower($itemtype);
|
|
||||||
// replace $_SESSION['glpiactiveprofile'][$itemtype.'_status'] with saved value
|
|
||||||
if ($tabnum == 1 && isset($_SESSION['glpiactiveprofile'][$itemtype.'_status_save'])) {
|
|
||||||
$_SESSION['glpiactiveprofile'][$itemtype.'_status'] = $_SESSION['glpiactiveprofile'][$itemtype.'_status_save'];
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2597,7 +2436,7 @@ class PluginProcessmakerProcessmaker extends CommonDBTM {
|
|||||||
*/
|
*/
|
||||||
public function saveForm($request) {
|
public function saveForm($request) {
|
||||||
|
|
||||||
$loggable = false;
|
$logtrace = false; //isset($_SESSION['glpi_use_mode']) && ($_SESSION['glpi_use_mode'] == Session::DEBUG_MODE);
|
||||||
$request = stripcslashes_deep( $request );
|
$request = stripcslashes_deep( $request );
|
||||||
|
|
||||||
$ch = curl_init();
|
$ch = curl_init();
|
||||||
@@ -2610,7 +2449,15 @@ class PluginProcessmakerProcessmaker extends CommonDBTM {
|
|||||||
//curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
|
//curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
|
||||||
curl_setopt($ch, CURLOPT_HEADER, 1);
|
curl_setopt($ch, CURLOPT_HEADER, 1);
|
||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||||
|
if ($logtrace) {
|
||||||
curl_setopt($ch, CURLOPT_VERBOSE, 1);
|
curl_setopt($ch, CURLOPT_VERBOSE, 1);
|
||||||
|
$curl_log = fopen('L:/inetpub/wwwroot/glpi/files/_log/curl.log', 'a');
|
||||||
|
Toolbox::logInFile( "pmtrace", "curl log file open: ".$curl_log );
|
||||||
|
fprintf($curl_log, "Test\n");
|
||||||
|
fflush($curl_log);
|
||||||
|
curl_setopt($ch, CURLOPT_STDERR, $curl_log);
|
||||||
|
}
|
||||||
|
|
||||||
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Expect:"]);
|
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Expect:"]);
|
||||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $this->config->fields['ssl_verify']);
|
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $this->config->fields['ssl_verify']);
|
||||||
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, $this->config->fields['ssl_verify']);
|
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, $this->config->fields['ssl_verify']);
|
||||||
@@ -2622,9 +2469,12 @@ class PluginProcessmakerProcessmaker extends CommonDBTM {
|
|||||||
|
|
||||||
// ### first call to open case and get cookies GET ###
|
// ### first call to open case and get cookies GET ###
|
||||||
curl_setopt($ch, CURLOPT_URL, $this->serverURL."/cases/cases_Open?sid=".$this->getPMSessionID()."&APP_UID=".$request['APP_UID']."&DEL_INDEX=".$request['DEL_INDEX']."&action=TO_DO" );
|
curl_setopt($ch, CURLOPT_URL, $this->serverURL."/cases/cases_Open?sid=".$this->getPMSessionID()."&APP_UID=".$request['APP_UID']."&DEL_INDEX=".$request['DEL_INDEX']."&action=TO_DO" );
|
||||||
|
if ($logtrace) {
|
||||||
|
Toolbox::logInFile( "pmtrace", "Before curl_exec: ".$this->serverURL."/cases/cases_Open?sid=".$this->getPMSessionID()."&APP_UID=".$request['APP_UID']."&DEL_INDEX=".$request['DEL_INDEX']."&action=TO_DO" );
|
||||||
|
}
|
||||||
$response = curl_exec($ch);
|
$response = curl_exec($ch);
|
||||||
if ($loggable) {
|
if ($logtrace) {
|
||||||
Toolbox::logInFile( "pmtrace", "URL:\n".$this->serverURL."/cases/cases_Open?sid=".$this->getPMSession()."\nResponse:\n".$response."\n\n\n" );
|
Toolbox::logInFile( "pmtrace", "URL:\n".$this->serverURL."/cases/cases_Open?sid=".$this->getPMSessionID()."\nResponse:\n".$response."\n\n\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
// change option to indicate that the next call will be POST
|
// change option to indicate that the next call will be POST
|
||||||
@@ -2668,8 +2518,9 @@ class PluginProcessmakerProcessmaker extends CommonDBTM {
|
|||||||
Toolbox::logInFile( "pmtrace", curl_error($ch).":".curl_errno($ch)."\n" );
|
Toolbox::logInFile( "pmtrace", curl_error($ch).":".curl_errno($ch)."\n" );
|
||||||
}
|
}
|
||||||
curl_close ($ch);
|
curl_close ($ch);
|
||||||
if ($loggable) {
|
if ($logtrace) {
|
||||||
Toolbox::logInFile( "pmtrace", "URL:\n".$this->serverURL."/cases/cases_SaveData?UID=".$request['UID']."&APP_UID=".$request['APP_UID']."\nData:\n".print_r($data, true )."\nResponse:\n".$response."\n\n\n" );
|
Toolbox::logInFile( "pmtrace", "URL:\n".$this->serverURL."/cases/cases_SaveData?UID=".$request['UID']."&APP_UID=".$request['APP_UID']."\nData:\n".print_r($data, true )."\nResponse:\n".$response."\n\n\n" );
|
||||||
|
fclose($curl_log);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ($response ? true : false);
|
return ($response ? true : false);
|
||||||
@@ -2833,9 +2684,8 @@ class PluginProcessmakerProcessmaker extends CommonDBTM {
|
|||||||
//if (strlen( $entityAncestors ) > 0) {
|
//if (strlen( $entityAncestors ) > 0) {
|
||||||
if ($category > 0) {
|
if ($category > 0) {
|
||||||
$query = [
|
$query = [
|
||||||
'SELECT DISTINCT' => ['glpi_plugin_processmaker_processes.id' ],
|
'FIELDS' => ['glpi_plugin_processmaker_processes.id', 'glpi_plugin_processmaker_processes.name'],
|
||||||
'FIELDS' => ['glpi_plugin_processmaker_processes.name'],
|
'DISTINCT' => true,
|
||||||
//'DISTINCT' => true,
|
|
||||||
'FROM' => 'glpi_plugin_processmaker_processes',
|
'FROM' => 'glpi_plugin_processmaker_processes',
|
||||||
'INNER JOIN' => [
|
'INNER JOIN' => [
|
||||||
'glpi_plugin_processmaker_processes_profiles' => [
|
'glpi_plugin_processmaker_processes_profiles' => [
|
||||||
@@ -2990,13 +2840,17 @@ class PluginProcessmakerProcessmaker extends CommonDBTM {
|
|||||||
//$cookies,
|
//$cookies,
|
||||||
global $PM_DB, $CFG_GLPI, $DB;
|
global $PM_DB, $CFG_GLPI, $DB;
|
||||||
|
|
||||||
|
$logtrace = false; //isset($_SESSION['glpi_use_mode']) && ($_SESSION['glpi_use_mode'] == Session::DEBUG_MODE);
|
||||||
|
|
||||||
|
|
||||||
$itemtype = $myCase->getField('itemtype');
|
$itemtype = $myCase->getField('itemtype');
|
||||||
$items_id = $myCase->getField('items_id');
|
$items_id = $myCase->getField('items_id');
|
||||||
$item = new $itemtype;
|
$item = new $itemtype;
|
||||||
$item->getFromDB($items_id);
|
$item->getFromDB($items_id);
|
||||||
|
|
||||||
//Toolbox::logInFile("processmaker_derivate", Toolbox::backtrace(false) . "derivateCase: myCase = " . print_r($myCase, true) . "\nrequest = " . print_r($request, true) . "\nusers_id = " . print_r($users_id, true) );
|
if ($logtrace) {
|
||||||
|
Toolbox::logInFile("pmtrace", Toolbox::backtrace(false) . "derivateCase: myCase = " . print_r($myCase, true) . "\nrequest = " . print_r($request, true) . "\nusers_id = " . print_r($users_id, true) );
|
||||||
|
}
|
||||||
// save the dynaform variables into the current case
|
// save the dynaform variables into the current case
|
||||||
if (isset($request['UID']) && isset($request['APP_UID']) && isset($request['__DynaformName__'])) {
|
if (isset($request['UID']) && isset($request['APP_UID']) && isset($request['__DynaformName__'])) {
|
||||||
$resultSave = $this->saveForm( $request );
|
$resultSave = $this->saveForm( $request );
|
||||||
@@ -3004,7 +2858,9 @@ class PluginProcessmakerProcessmaker extends CommonDBTM {
|
|||||||
|
|
||||||
// now derivate the case !!!
|
// now derivate the case !!!
|
||||||
$pmRouteCaseResponse = $this->routeCase($myCase->fields['case_guid'], $request['DEL_INDEX']);
|
$pmRouteCaseResponse = $this->routeCase($myCase->fields['case_guid'], $request['DEL_INDEX']);
|
||||||
//Toolbox::logInFile("processmaker_derivate", "routeCase: pmRouteCaseResponse = " . print_r($pmRouteCaseResponse, true));
|
if ($logtrace) {
|
||||||
|
Toolbox::logInFile("pmtrace", "routeCase: pmRouteCaseResponse = " . print_r($pmRouteCaseResponse, true));
|
||||||
|
}
|
||||||
|
|
||||||
if ($pmRouteCaseResponse->status_code != 0) {
|
if ($pmRouteCaseResponse->status_code != 0) {
|
||||||
Session::addMessageAfterRedirect(sprintf(__('Unable to derivate case! Retry in a moment, or ask your administrator.<hr>Error code: %u<br/>Error message: %s<br/>', 'processmaker'),
|
Session::addMessageAfterRedirect(sprintf(__('Unable to derivate case! Retry in a moment, or ask your administrator.<hr>Error code: %u<br/>Error message: %s<br/>', 'processmaker'),
|
||||||
@@ -3017,8 +2873,8 @@ class PluginProcessmakerProcessmaker extends CommonDBTM {
|
|||||||
|
|
||||||
$casevariables = ["GLPI_ITEM_TASK_CONTENT",
|
$casevariables = ["GLPI_ITEM_TASK_CONTENT",
|
||||||
"GLPI_ITEM_APPEND_TO_TASK",
|
"GLPI_ITEM_APPEND_TO_TASK",
|
||||||
"GLPI_NEXT_GROUP_TO_BE_ASSIGNED",
|
//"GLPI_NEXT_GROUP_TO_BE_ASSIGNED",
|
||||||
"GLPI_ITEM_TASK_GROUP",
|
//"GLPI_ITEM_TASK_GROUP",
|
||||||
"GLPI_ITEM_TITLE",
|
"GLPI_ITEM_TITLE",
|
||||||
"GLPI_TICKET_FOLLOWUP_CONTENT",
|
"GLPI_TICKET_FOLLOWUP_CONTENT",
|
||||||
"GLPI_ITEM_FOLLOWUP_CONTENT",
|
"GLPI_ITEM_FOLLOWUP_CONTENT",
|
||||||
@@ -3079,13 +2935,13 @@ class PluginProcessmakerProcessmaker extends CommonDBTM {
|
|||||||
$txtTaskContent = $casevariablevalues[ 'GLPI_ITEM_TASK_CONTENT' ];
|
$txtTaskContent = $casevariablevalues[ 'GLPI_ITEM_TASK_CONTENT' ];
|
||||||
}
|
}
|
||||||
|
|
||||||
$groupId = 0;
|
//$groupId = 0;
|
||||||
if (array_key_exists( 'GLPI_NEXT_GROUP_TO_BE_ASSIGNED', $casevariablevalues )) {
|
//if (array_key_exists( 'GLPI_NEXT_GROUP_TO_BE_ASSIGNED', $casevariablevalues )) {
|
||||||
$groupId = $casevariablevalues[ 'GLPI_NEXT_GROUP_TO_BE_ASSIGNED' ];
|
// $groupId = $casevariablevalues[ 'GLPI_NEXT_GROUP_TO_BE_ASSIGNED' ];
|
||||||
}
|
//}
|
||||||
if (array_key_exists( 'GLPI_ITEM_TASK_GROUP', $casevariablevalues )) {
|
//if (array_key_exists( 'GLPI_ITEM_TASK_GROUP', $casevariablevalues )) {
|
||||||
$groupId = $casevariablevalues[ 'GLPI_ITEM_TASK_GROUP' ];
|
// $groupId = $casevariablevalues[ 'GLPI_ITEM_TASK_GROUP' ];
|
||||||
}
|
//}
|
||||||
|
|
||||||
$taskStartDate = '';
|
$taskStartDate = '';
|
||||||
$taskEndDate = '';
|
$taskEndDate = '';
|
||||||
@@ -3277,7 +3133,6 @@ class PluginProcessmakerProcessmaker extends CommonDBTM {
|
|||||||
$sub_caseInfo,
|
$sub_caseInfo,
|
||||||
$sub_route->delIndex,
|
$sub_route->delIndex,
|
||||||
PluginProcessmakerUser::getGLPIUserId($sub_route->userId),
|
PluginProcessmakerUser::getGLPIUserId($sub_route->userId),
|
||||||
0,
|
|
||||||
$sub_route->taskId,
|
$sub_route->taskId,
|
||||||
$sub_route->delThread,
|
$sub_route->delThread,
|
||||||
[ 'txtTaskContent' => $txtTaskContent,
|
[ 'txtTaskContent' => $txtTaskContent,
|
||||||
@@ -3354,13 +3209,12 @@ class PluginProcessmakerProcessmaker extends CommonDBTM {
|
|||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
$this->addTask($myCase->getID(),
|
||||||
$this->addTask( $myCase->getID(), $itemtype,
|
$itemtype,
|
||||||
$items_id,
|
$items_id,
|
||||||
$caseInfo,
|
$caseInfo,
|
||||||
$route->delIndex,
|
$route->delIndex,
|
||||||
PluginProcessmakerUser::getGLPIUserId($route->userId),
|
PluginProcessmakerUser::getGLPIUserId($route->userId),
|
||||||
$groupId,
|
|
||||||
$route->taskId,
|
$route->taskId,
|
||||||
$route->delThread,
|
$route->delThread,
|
||||||
['txtTaskContent' => $txtTaskContent,
|
['txtTaskContent' => $txtTaskContent,
|
||||||
@@ -3416,7 +3270,6 @@ class PluginProcessmakerProcessmaker extends CommonDBTM {
|
|||||||
$parentCaseInfo,
|
$parentCaseInfo,
|
||||||
$open_task->delIndex,
|
$open_task->delIndex,
|
||||||
PluginProcessmakerUser::getGLPIUserId($open_task->userId),
|
PluginProcessmakerUser::getGLPIUserId($open_task->userId),
|
||||||
$groupId,
|
|
||||||
$open_task->taskId,
|
$open_task->taskId,
|
||||||
$open_task->delThread,
|
$open_task->delThread,
|
||||||
[ 'txtTaskContent' => $txtTaskContent,
|
[ 'txtTaskContent' => $txtTaskContent,
|
||||||
@@ -3488,15 +3341,15 @@ class PluginProcessmakerProcessmaker extends CommonDBTM {
|
|||||||
//set title and css class
|
//set title and css class
|
||||||
switch ($msgtype) {
|
switch ($msgtype) {
|
||||||
case ERROR:
|
case ERROR:
|
||||||
$title = __('Error');
|
$title = __s('Error');
|
||||||
$class = 'err_msg';
|
$class = 'err_msg';
|
||||||
break;
|
break;
|
||||||
case WARNING:
|
case WARNING:
|
||||||
$title = __('Warning');
|
$title = __s('Warning');
|
||||||
$class = 'warn_msg';
|
$class = 'warn_msg';
|
||||||
break;
|
break;
|
||||||
case INFO:
|
case INFO:
|
||||||
$title = __('Information');
|
$title = _sn('Information', 'Information', 1);
|
||||||
$class = 'info_msg';
|
$class = 'info_msg';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -3506,7 +3359,7 @@ class PluginProcessmakerProcessmaker extends CommonDBTM {
|
|||||||
echo "</div>";
|
echo "</div>";
|
||||||
|
|
||||||
$scriptblock = "
|
$scriptblock = "
|
||||||
$(document).ready(function() {
|
$(function() {
|
||||||
var _of = window;
|
var _of = window;
|
||||||
var _at = 'right-20 bottom-20';
|
var _at = 'right-20 bottom-20';
|
||||||
//calculate relative dialog position
|
//calculate relative dialog position
|
||||||
@@ -3598,4 +3451,76 @@ class PluginProcessmakerProcessmaker extends CommonDBTM {
|
|||||||
echo Html::scriptBlock($script);
|
echo Html::scriptBlock($script);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Summary of getGLPIGroupIDForSelfServiceTask
|
||||||
|
* Gets GLPI group ID that is assigned to a task for a case when task is Self-Service
|
||||||
|
* @param string $caseId is the UID of the case
|
||||||
|
* @param string $pmTaskId is the UID of the task must be currently in SELF-SERVICE
|
||||||
|
* @return bool|array false if not found, otherwise is an array containing the 'name', GLPI 'id' and the PM 'uid' of the group
|
||||||
|
*/
|
||||||
|
public function getGLPIGroupIdForSelfServiceTask ($caseId, $pmTaskId) {
|
||||||
|
global $PM_DB;
|
||||||
|
|
||||||
|
$groupname = NULL;
|
||||||
|
|
||||||
|
// we must differentiate if rule assignement is self-service or self-service value based
|
||||||
|
//$query = "SELECT TAS_GROUP_VARIABLE
|
||||||
|
// FROM TASK
|
||||||
|
// WHERE TAS_UID='$pmTaskId'
|
||||||
|
// AND TAS_ASSIGN_TYPE='SELF_SERVICE';";
|
||||||
|
$query = ['SELECT' => 'TAS_GROUP_VARIABLE',
|
||||||
|
'FROM' => 'TASK',
|
||||||
|
'WHERE' => ['TAS_UID' => '$pmTaskId',
|
||||||
|
'TAS_ASSIGN_TYPE' => 'SELF_SERVICE']];
|
||||||
|
//$req = $PM_DB->query($query);
|
||||||
|
//$row = $PM_DB->fetchAssoc($req);
|
||||||
|
foreach ($PM_DB->request($query) as $row) {
|
||||||
|
// there is only one row
|
||||||
|
|
||||||
|
if ($row['TAS_GROUP_VARIABLE'] == '') {
|
||||||
|
// Assignement is Self-Service
|
||||||
|
// the group title can be found in the GROUPWF table when the assignement rule is Self-Service
|
||||||
|
// TU_RELATION=2 is groups and TU_TYPE=1 means normal (= not adhoc)
|
||||||
|
$queryname = "SELECT GROUPWF.GRP_TITLE AS 'GRP_TITLE', GROUPWF.GRP_UID AS 'GRP_UID' FROM TASK_USER
|
||||||
|
JOIN GROUPWF ON GROUPWF.GRP_UID = TASK_USER.USR_UID
|
||||||
|
WHERE TASK_USER.TAS_UID = '$pmTaskId'
|
||||||
|
AND TASK_USER.TU_RELATION = 2
|
||||||
|
AND TASK_USER.TU_TYPE = 1
|
||||||
|
LIMIT 1;";
|
||||||
|
} else {
|
||||||
|
// Assignement is Self-Service Value Based
|
||||||
|
// in this case we must retreive the group from the case variable which is in if the TASK table
|
||||||
|
$casevariable = substr($row['TAS_GROUP_VARIABLE'], 2);
|
||||||
|
$vars = $this->getVariables($caseId, [$casevariable]);
|
||||||
|
if (array_key_exists($casevariable, $vars) && $vars[$casevariable] != '') {
|
||||||
|
// here is the UID of the group that needs to be assigned to the task
|
||||||
|
// then we need the name of the group
|
||||||
|
// the group title can be found in the GROUPWF table
|
||||||
|
$queryname = "SELECT GRP_TITLE, GRP_UID
|
||||||
|
FROM GROUPWF
|
||||||
|
WHERE GRP_UID = '{$vars[$casevariable]}';";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// as there is a LIMIT of 1
|
||||||
|
// or
|
||||||
|
// as there is only one group per guid
|
||||||
|
// then we should have at maximun 1 record
|
||||||
|
foreach ($PM_DB->request($queryname) as $onlyrec) {
|
||||||
|
$groupname = $onlyrec;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($groupname)) {
|
||||||
|
return ['name' => $groupname['GRP_TITLE'],
|
||||||
|
'id' => self::getGLPIGroupId($groupname['GRP_TITLE']),
|
||||||
|
'uid' => $groupname['GRP_UID']
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -115,7 +115,7 @@ class PluginProcessmakerTask extends CommonITILTask
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static function populatePlanning($params) {
|
static function populatePlanning($params = []) :array {
|
||||||
//global $CFG_GLPI;
|
//global $CFG_GLPI;
|
||||||
|
|
||||||
$events = [];
|
$events = [];
|
||||||
@@ -423,6 +423,7 @@ class PluginProcessmakerTask extends CommonITILTask
|
|||||||
tasktype : '{$task[$tabnum]['itemtype']}',
|
tasktype : '{$task[$tabnum]['itemtype']}',
|
||||||
tasks_id : {$task[$tabnum]['items_id']},
|
tasks_id : {$task[$tabnum]['items_id']},
|
||||||
users_id : {$current_assigned_user},
|
users_id : {$current_assigned_user},
|
||||||
|
caseGuid : '{$case->fields['case_guid']}',
|
||||||
taskGuid : '{$currentUser->taskId}',
|
taskGuid : '{$currentUser->taskId}',
|
||||||
delIndex : {$task[$tabnum]['del_index']},
|
delIndex : {$task[$tabnum]['del_index']},
|
||||||
delThread : {$currentUser->delThread},
|
delThread : {$currentUser->delThread},
|
||||||
|
|||||||
@@ -36,11 +36,11 @@ class PluginProcessmakerTaskCategory extends CommonDBTM
|
|||||||
self::title($item);
|
self::title($item);
|
||||||
|
|
||||||
echo "<div class='center'><br><table class='tab_cadre_fixehov'>";
|
echo "<div class='center'><br><table class='tab_cadre_fixehov'>";
|
||||||
echo "<tr><th colspan='7'>".__('Task List', 'processmaker')."</th></tr>";
|
echo "<tr><th colspan='7'>".__('Task list', 'processmaker')."</th></tr>";
|
||||||
echo "<tr><th>".__('Task name', 'processmaker')."</th>".
|
echo "<tr><th>".__('Task name', 'processmaker')."</th>".
|
||||||
"<th>".__('Complete name')."</th>" .
|
"<th>".__('Complete name')."</th>" .
|
||||||
"<th>".__('Start', 'processmaker')."</th>" .
|
"<th>".__('Start', 'processmaker')."</th>" .
|
||||||
"<th>".__('Task GUID', 'processmaker')."</th>" .
|
"<th>".__('Task guid', 'processmaker')."</th>" .
|
||||||
"<th>".__('Comments')."</th>" .
|
"<th>".__('Comments')."</th>" .
|
||||||
"<th>".__('Active')."</th>" .
|
"<th>".__('Active')."</th>" .
|
||||||
"<th>".__('Sub-process', 'processmaker')."</th>" .
|
"<th>".__('Sub-process', 'processmaker')."</th>" .
|
||||||
@@ -144,7 +144,7 @@ class PluginProcessmakerTaskCategory extends CommonDBTM
|
|||||||
|
|
||||||
echo "<th>".__('Complete name')."</th>" .
|
echo "<th>".__('Complete name')."</th>" .
|
||||||
"<th>".__('Start', 'processmaker')."</th>" .
|
"<th>".__('Start', 'processmaker')."</th>" .
|
||||||
"<th>".__('Task GUID', 'processmaker')."</th>" .
|
"<th>".__('Task guid', 'processmaker')."</th>" .
|
||||||
"<th>".__('Comments')."</th>" .
|
"<th>".__('Comments')."</th>" .
|
||||||
"<th>".__('Active')."</th>" .
|
"<th>".__('Active')."</th>" .
|
||||||
"<th>".__('Sub-process', 'processmaker')."</th>" .
|
"<th>".__('Sub-process', 'processmaker')."</th>" .
|
||||||
|
|||||||
@@ -16,22 +16,31 @@ class PluginProcessmakerUser extends CommonDBTM {
|
|||||||
*
|
*
|
||||||
* Internaly used by showGroup_Users, dropdownUsers and ajax/dropdownUsers.php
|
* Internaly used by showGroup_Users, dropdownUsers and ajax/dropdownUsers.php
|
||||||
*
|
*
|
||||||
* @param $count true if execute an count(*),
|
* @param array $tags contains taskGuid and grpGuid (task UID and Group UID)
|
||||||
* @param $right limit user who have specific right
|
* @param boolean $count true if execute an count(*),
|
||||||
* @param $entity_restrict Restrict to a defined entity
|
* @param string|string[] $right limit user who have specific right
|
||||||
* @param $value default value
|
* @param integer $entity_restrict Restrict to a defined entity
|
||||||
* @param $used array: Already used items ID: not to display in dropdown
|
* @param integer $value default value
|
||||||
* @param $search pattern
|
* @param integer[] $used array: Already used items ID: not to display in dropdown
|
||||||
*
|
* @param string $search pattern
|
||||||
|
* @param integer $start start LIMIT value (default 0)
|
||||||
|
* @param integer $limit limit LIMIT value (default -1 no limit)
|
||||||
|
* @param boolean $inactive_deleted true to retreive also inactive or deleted users
|
||||||
* @return DBmysqlIterator
|
* @return DBmysqlIterator
|
||||||
**/
|
**/
|
||||||
static function getSqlSearchResult ($taskId, $count = true, $right = "all", $entity_restrict = -1, $value = 0,
|
static function getSqlSearchResult (array $tags, $count = true, $right = "all", $entity_restrict = -1, $value = 0,
|
||||||
$used = [], $search = '', $limit = '') {
|
array $used = [], $search = '',$start = 0, $limit = -1,
|
||||||
|
$inactive_deleted = 0) {
|
||||||
global $DB, $PM_DB, $CFG_GLPI;
|
global $DB, $PM_DB, $CFG_GLPI;
|
||||||
|
|
||||||
// first need to get all users from $taskId
|
// first need to get all users from $taskId
|
||||||
$adhoc_users = Session::haveRight('plugin_processmaker_case', ADHOC_REASSIGN) ? 2 : -1;
|
|
||||||
// TU_TYPE in (1, 2) means 1 is normal, 2 is for adhoc
|
// TU_TYPE in (1, 2) means 1 is normal user, 2 is for adhoc users
|
||||||
// TU_RELATION is 1 for user, and 2 for group
|
$tu_type = [];
|
||||||
|
$tu_type[] = Session::haveRight('plugin_processmaker_case', ADHOC_REASSIGN) ? 2 : -1; // by default get (or not if no rights) the ad-hoc users
|
||||||
|
if ($tags['grpGuid'] == 0) {
|
||||||
|
$tu_type[] = 1; // if no group for selfservice value based assignment then get also the users
|
||||||
|
}
|
||||||
$res1 = new QuerySubQuery([
|
$res1 = new QuerySubQuery([
|
||||||
'SELECT' => 'GROUP_USER.USR_UID AS pm_user_id',
|
'SELECT' => 'GROUP_USER.USR_UID AS pm_user_id',
|
||||||
'FROM' => 'TASK_USER',
|
'FROM' => 'TASK_USER',
|
||||||
@@ -42,14 +51,14 @@ class PluginProcessmakerUser extends CommonDBTM {
|
|||||||
'TASK_USER' => 'USR_UID',
|
'TASK_USER' => 'USR_UID',
|
||||||
['AND' => [
|
['AND' => [
|
||||||
'TASK_USER.TU_RELATION' => 2,
|
'TASK_USER.TU_RELATION' => 2,
|
||||||
'TASK_USER.TU_TYPE' => [1, $adhoc_users]
|
'TASK_USER.TU_TYPE' => $tu_type
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
'WHERE' => [
|
'WHERE' => [
|
||||||
'TAS_UID' => $taskId,
|
'TAS_UID' => $tags['taskGuid'],
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
$res2 = new QuerySubQuery([
|
$res2 = new QuerySubQuery([
|
||||||
@@ -57,92 +66,75 @@ class PluginProcessmakerUser extends CommonDBTM {
|
|||||||
'FROM' => 'TASK_USER',
|
'FROM' => 'TASK_USER',
|
||||||
'WHERE' => [
|
'WHERE' => [
|
||||||
'AND' => [
|
'AND' => [
|
||||||
'TAS_UID' => $taskId,
|
'TAS_UID' => $tags['taskGuid'],
|
||||||
'TASK_USER.TU_RELATION' => 1,
|
'TASK_USER.TU_RELATION' => 1,
|
||||||
'TASK_USER.TU_TYPE' => [1, $adhoc_users]
|
'TASK_USER.TU_TYPE' => $tu_type
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
$union = new QueryUnion([$res1, $res2]);
|
|
||||||
|
$subqueries = [$res1, $res2];
|
||||||
|
|
||||||
|
if ($tags['grpGuid'] != 0) {
|
||||||
|
// then add the user for the selfservice value based assignement
|
||||||
|
$res3 = new QuerySubQuery([
|
||||||
|
'SELECT' => 'GROUP_USER.USR_UID AS pm_user_id',
|
||||||
|
'FROM' => 'GROUP_USER',
|
||||||
|
'WHERE' => ['GROUP_USER.GRP_UID' => $tags['grpGuid']]
|
||||||
|
|
||||||
|
]);
|
||||||
|
|
||||||
|
$subqueries[] = $res3;
|
||||||
|
}
|
||||||
|
|
||||||
|
$union = new QueryUnion($subqueries);
|
||||||
|
|
||||||
$res = $PM_DB->request([
|
$res = $PM_DB->request([
|
||||||
'FROM' => $union
|
'FROM' => $union
|
||||||
]);
|
]);
|
||||||
//$db_pm = PluginProcessmakerConfig::getInstance()->getProcessMakerDB();
|
|
||||||
//$pmQuery = "SELECT GROUP_USER.USR_UID AS pm_user_id FROM TASK_USER
|
|
||||||
// JOIN GROUP_USER ON GROUP_USER.GRP_UID=TASK_USER.USR_UID AND TASK_USER.TU_RELATION = 2 AND TASK_USER.TU_TYPE=1
|
|
||||||
// WHERE TAS_UID = '$taskId'
|
|
||||||
// UNION
|
|
||||||
// SELECT TASK_USER.USR_UID AS pm_user_id FROM TASK_USER
|
|
||||||
// WHERE TAS_UID = '$taskId' AND TASK_USER.TU_RELATION = 1 AND TASK_USER.TU_TYPE=1 ; ";
|
|
||||||
$pmUsers = [ ];
|
$pmUsers = [ ];
|
||||||
//foreach ($PM_DB->request( $pmQuery ) as $pmUser) {
|
|
||||||
foreach ($res as $pmUser) {
|
foreach ($res as $pmUser) {
|
||||||
$pmUsers[ ] = $pmUser[ 'pm_user_id' ];
|
$pmUsers[ ] = $pmUser[ 'pm_user_id' ];
|
||||||
}
|
}
|
||||||
|
|
||||||
//$where = '';
|
|
||||||
$joinprofile = false;
|
$joinprofile = false;
|
||||||
|
|
||||||
switch ($right) {
|
switch ($right) {
|
||||||
case "id" :
|
case "id" :
|
||||||
$used[] = Session::getLoginUserID();
|
$used[] = Session::getLoginUserID();
|
||||||
//$where = " `glpi_users`.`id` = '".Session::getLoginUserID()."' ";
|
$query['WHERE']['AND']['glpi_users.id'] = Session::getLoginUserID();
|
||||||
$query2['WHERE']['AND']['glpi_users.id'] = Session::getLoginUserID();
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "all" :
|
case "all" :
|
||||||
//$where = " `glpi_users`.`id` > '0' ";
|
$query['WHERE']['AND']['glpi_users.id'] = ['>', 0];
|
||||||
$query2['WHERE']['AND']['glpi_users.id'] = ['>', 0];
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//$where .= " AND glpi_plugin_processmaker_users.pm_users_id IN ('".join("', '", $pmUsers)."') ";
|
$query['WHERE']['AND']['glpi_plugin_processmaker_users.pm_users_id'] = $pmUsers;
|
||||||
|
$query['WHERE']['AND']['glpi_users.is_deleted'] = 0;
|
||||||
//$where .= " AND `glpi_users`.`is_deleted` = '0'
|
$query['WHERE']['AND']['glpi_users.is_active'] = 1;
|
||||||
// AND `glpi_users`.`is_active` = '1' ";
|
|
||||||
|
|
||||||
$query2['WHERE']['AND']['glpi_plugin_processmaker_users.pm_users_id'] = $pmUsers;
|
|
||||||
$query2['WHERE']['AND']['glpi_users.is_deleted'] = 0;
|
|
||||||
$query2['WHERE']['AND']['glpi_users.is_active'] = 1;
|
|
||||||
|
|
||||||
if ((is_numeric($value) && $value)
|
if ((is_numeric($value) && $value)
|
||||||
|| count($used)) {
|
|| count($used)) {
|
||||||
|
|
||||||
//$where .= " AND `glpi_users`.`id` NOT IN (";
|
|
||||||
if (is_numeric($value)) {
|
if (is_numeric($value)) {
|
||||||
//$first = false;
|
|
||||||
//$where .= $value;
|
|
||||||
$used[] = $value;
|
$used[] = $value;
|
||||||
//$query2['WHERE']['AND']['NOT']['glpi_users.id'] = $value;
|
|
||||||
} else {
|
|
||||||
//$first = true;
|
|
||||||
}
|
}
|
||||||
//$query2['WHERE']['AND']['NOT']['glpi_users.id'] = $used;
|
|
||||||
//foreach ($used as $val) {
|
|
||||||
// if ($first) {
|
|
||||||
// $first = false;
|
|
||||||
// } else {
|
|
||||||
// $where .= ",";
|
|
||||||
// }
|
|
||||||
// $where .= $val;
|
|
||||||
//}
|
|
||||||
//$where .= ")";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($count) {
|
if ($count) {
|
||||||
//$query = "SELECT COUNT(DISTINCT glpi_users.id ) AS cpt ";
|
$query['FIELDS'] = 'glpi_users.id';
|
||||||
$query2['SELECT'] = ['COUNT DISTINCT' => 'glpi_users.id AS cpt'];
|
$query['COUNT'] = 'cpt';
|
||||||
|
$query['DISTINCT'] = true;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
//$query = "SELECT DISTINCT glpi_users.id , `glpi_users`.`realname`, `glpi_users`.`firstname`, `glpi_users`.`name`, `glpi_useremails`.`email` ";
|
$query['FIELDS'] = ['glpi_users.id', 'glpi_users.realname', 'glpi_users.firstname', 'glpi_users.name', 'glpi_useremails.email'];
|
||||||
$query2['SELECT DISTINCT'] = 'glpi_users.id';
|
$query['DISTINCT'] = true;
|
||||||
$query2['FIELDS'] = ['glpi_users.realname', 'glpi_users.firstname', 'glpi_users.name', 'glpi_useremails.email'];
|
|
||||||
}
|
}
|
||||||
$query2['FROM'] = 'glpi_plugin_processmaker_users';
|
$query['FROM'] = 'glpi_plugin_processmaker_users';
|
||||||
//$query .= "FROM glpi_plugin_processmaker_users
|
$query['FROM'] = 'glpi_plugin_processmaker_users';
|
||||||
// JOIN glpi_users ON glpi_users.id=glpi_plugin_processmaker_users.id ";
|
$query['INNER JOIN'] = [
|
||||||
$query2['FROM'] = 'glpi_plugin_processmaker_users';
|
|
||||||
$query2['INNER JOIN'] = [
|
|
||||||
'glpi_users' => [
|
'glpi_users' => [
|
||||||
'FKEY' => [
|
'FKEY' => [
|
||||||
'glpi_users' => 'id',
|
'glpi_users' => 'id',
|
||||||
@@ -151,9 +143,7 @@ class PluginProcessmakerUser extends CommonDBTM {
|
|||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
//$query .= " LEFT JOIN `glpi_useremails`
|
$query['LEFT JOIN'] = [
|
||||||
// ON (`glpi_users`.`id` = `glpi_useremails`.`users_id` AND `glpi_useremails`.is_default = 1)";
|
|
||||||
$query2['LEFT JOIN'] = [
|
|
||||||
'glpi_useremails' => [
|
'glpi_useremails' => [
|
||||||
'FKEY' => [
|
'FKEY' => [
|
||||||
'glpi_users' => 'id',
|
'glpi_users' => 'id',
|
||||||
@@ -171,11 +161,9 @@ class PluginProcessmakerUser extends CommonDBTM {
|
|||||||
]
|
]
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
//$query .= " LEFT JOIN `glpi_profiles_users`
|
|
||||||
// ON (`glpi_users`.`id` = `glpi_profiles_users`.`users_id`)";
|
|
||||||
|
|
||||||
if ($joinprofile) {
|
if ($joinprofile) {
|
||||||
$query2['LEFT JOIN'] = [
|
$query['LEFT JOIN'] = [
|
||||||
'glpi_profiles' => [
|
'glpi_profiles' => [
|
||||||
'FKEY' => [
|
'FKEY' => [
|
||||||
'glpi_profiles' => 'id',
|
'glpi_profiles' => 'id',
|
||||||
@@ -183,58 +171,49 @@ class PluginProcessmakerUser extends CommonDBTM {
|
|||||||
]
|
]
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
//$query .= " LEFT JOIN `glpi_profiles`
|
|
||||||
// ON (`glpi_profiles`.`id` = `glpi_profiles_users`.`profiles_id`) ";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($count) {
|
if ($count) {
|
||||||
$query2['WHERE']['AND']['NOT']['glpi_users.id'] = $used;
|
$query['WHERE']['AND']['NOT']['glpi_users.id'] = $used;
|
||||||
//$query .= " WHERE $where ";
|
|
||||||
} else {
|
} else {
|
||||||
if (strlen($search)>0 && $search!=$CFG_GLPI["ajax_wildcard"]) {
|
if (strlen($search)>0 && $search!=$CFG_GLPI["ajax_wildcard"]) {
|
||||||
$query2['WHERE']['AND'] = [
|
$txt_search = Search::makeTextSearchValue($search);
|
||||||
'glpi_users.name' => ['LIKE',Search::makeTextSearchValue($search)],
|
|
||||||
|
$firstname_field = $DB->quoteName(User::getTableField('firstname'));
|
||||||
|
$realname_field = $DB->quoteName(User::getTableField('realname'));
|
||||||
|
$fields = $_SESSION["glpinames_format"] == User::FIRSTNAME_BEFORE
|
||||||
|
? [$firstname_field, $realname_field]
|
||||||
|
: [$realname_field, $firstname_field];
|
||||||
|
$concat = new \QueryExpression(
|
||||||
|
'CONCAT(' . implode(',' . $DB->quoteValue(' ') . ',', $fields) . ')'
|
||||||
|
. ' LIKE ' . $DB->quoteValue($txt_search)
|
||||||
|
);
|
||||||
|
$query['WHERE']['AND'] = [
|
||||||
|
'glpi_users.name' => ['LIKE', $txt_search],
|
||||||
'OR' => [
|
'OR' => [
|
||||||
'glpi_users.realname' => ['LIKE',Search::makeTextSearchValue($search)],
|
'glpi_users.realname' => ['LIKE', $txt_search],
|
||||||
'glpi_users.firstname' => ['LIKE',Search::makeTextSearchValue($search)],
|
'glpi_users.firstname' => ['LIKE', $txt_search],
|
||||||
'glpi_users.phone' => ['LIKE',Search::makeTextSearchValue($search)],
|
'glpi_users.phone' => ['LIKE', $txt_search],
|
||||||
'glpi_useremails.email' => ['LIKE',Search::makeTextSearchValue($search)],
|
'glpi_useremails.email' => ['LIKE', $txt_search],
|
||||||
'RAW' => [
|
$concat
|
||||||
"CONCAT(`glpi_users`.`realname`,' ',`glpi_users`.`firstname`)".Search::makeTextSearch($search)
|
|
||||||
]
|
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
//$where .= " AND (`glpi_users`.`name` ".Search::makeTextSearch($search)."
|
|
||||||
// OR `glpi_users`.`realname` ".Search::makeTextSearch($search)."
|
|
||||||
// OR `glpi_users`.`firstname` ".Search::makeTextSearch($search)."
|
|
||||||
// OR `glpi_users`.`phone` ".Search::makeTextSearch($search)."
|
|
||||||
// OR `glpi_useremails`.`email` ".Search::makeTextSearch($search)."
|
|
||||||
// OR CONCAT(`glpi_users`.`realname`,' ',`glpi_users`.`firstname`) ".
|
|
||||||
// Search::makeTextSearch($search).")";
|
|
||||||
}
|
}
|
||||||
$query2['WHERE']['AND']['NOT']['glpi_users.id'] = $used;
|
$query['WHERE']['AND']['NOT']['glpi_users.id'] = $used;
|
||||||
//$query .= " WHERE $where ";
|
|
||||||
|
|
||||||
if ($_SESSION["glpinames_format"] == User::FIRSTNAME_BEFORE) {
|
if ($_SESSION["glpinames_format"] == User::FIRSTNAME_BEFORE) {
|
||||||
//$query.=" ORDER BY `glpi_users`.`firstname`,
|
$query['ORDER'] = ['glpi_users.firstname', 'glpi_users.realname', 'glpi_users.name'];
|
||||||
// `glpi_users`.`realname`,
|
|
||||||
// `glpi_users`.`name` ";
|
|
||||||
$query2['ORDER'] = ['glpi_users.firstname', 'glpi_users.realname', 'glpi_users.name'];
|
|
||||||
} else {
|
} else {
|
||||||
//$query.=" ORDER BY `glpi_users`.`realname`,
|
$query['ORDER'] = ['glpi_users.realname', 'glpi_users.firstname', 'glpi_users.name'];
|
||||||
// `glpi_users`.`firstname`,
|
|
||||||
// `glpi_users`.`name` ";
|
|
||||||
$query2['ORDER'] = ['glpi_users.realname', 'glpi_users.firstname', 'glpi_users.name'];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($search != $CFG_GLPI["ajax_wildcard"]) {
|
if ($search != $CFG_GLPI["ajax_wildcard"]) {
|
||||||
//$query .= " $limit";
|
$query['LIMIT'] = $limit;
|
||||||
$query2['LIMIT'] = 200;
|
$query['START'] = $start;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $DB->request($query2);
|
return $DB->request($query);
|
||||||
//return $DB->query($query);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_configs` (
|
|||||||
`domain` varchar(50) DEFAULT '',
|
`domain` varchar(50) DEFAULT '',
|
||||||
`maintenance` tinyint(1) NOT NULL DEFAULT '0',
|
`maintenance` tinyint(1) NOT NULL DEFAULT '0',
|
||||||
`ssl_verify` tinyint(1) NOT NULL DEFAULT '0',
|
`ssl_verify` tinyint(1) NOT NULL DEFAULT '0',
|
||||||
`db_version` varchar(10) NOT NULL DEFAULT '3.4.10',
|
`db_version` varchar(10) NOT NULL DEFAULT '4.0.0',
|
||||||
`max_cases_per_item` int(11) NOT NULL DEFAULT '0',
|
`max_cases_per_item` int(11) NOT NULL DEFAULT '0',
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||||
|
|||||||
@@ -48,9 +48,13 @@ function processmaker_update() {
|
|||||||
// will upgrade 3.4.9 to 3.4.10
|
// will upgrade 3.4.9 to 3.4.10
|
||||||
include_once(GLPI_ROOT."/plugins/processmaker/install/update_3_4_9_to_3_4_10.php");
|
include_once(GLPI_ROOT."/plugins/processmaker/install/update_3_4_9_to_3_4_10.php");
|
||||||
$new_version = update_3_4_9_to_3_4_10();
|
$new_version = update_3_4_9_to_3_4_10();
|
||||||
|
case '3.4.10' :
|
||||||
|
// will upgrade 3.4.10 to 4.0.0
|
||||||
|
include_once(GLPI_ROOT."/plugins/processmaker/install/update_3_4_10_to_4_0_0.php");
|
||||||
|
$new_version = update_3_4_10_to_4_0_0();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($new_version)) {
|
if (isset($new_version) && $new_version !== false) {
|
||||||
// end update by updating the db version number
|
// end update by updating the db version number
|
||||||
$query = "UPDATE `glpi_plugin_processmaker_configs` SET `db_version` = '$new_version' WHERE `id` = 1;";
|
$query = "UPDATE `glpi_plugin_processmaker_configs` SET `db_version` = '$new_version' WHERE `id` = 1;";
|
||||||
|
|
||||||
|
|||||||
14
install/update_3_4_10_to_4_0_0.php
Normal file
14
install/update_3_4_10_to_4_0_0.php
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
function update_3_4_10_to_4_0_0() {
|
||||||
|
global $DB;
|
||||||
|
|
||||||
|
// needs to change password encryption
|
||||||
|
$pmglpikey = new PluginProcessmakerGlpikey;
|
||||||
|
|
||||||
|
if ($pmglpikey->migratePasswords()) {
|
||||||
|
return '4.0.0';
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
BIN
locales/cs_CZ.mo
BIN
locales/cs_CZ.mo
Binary file not shown.
@@ -2,7 +2,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: processmaker-plugin\n"
|
"Project-Id-Version: processmaker-plugin\n"
|
||||||
"POT-Creation-Date: 2018-08-06 14:32+0200\n"
|
"POT-Creation-Date: 2018-08-06 14:32+0200\n"
|
||||||
"PO-Revision-Date: 2018-08-06 14:43+0200\n"
|
"PO-Revision-Date: 2021-02-15 14:25\n"
|
||||||
"Last-Translator: tomolimo\n"
|
"Last-Translator: tomolimo\n"
|
||||||
"Language-Team: Czech\n"
|
"Language-Team: Czech\n"
|
||||||
"Language: cs_CZ\n"
|
"Language: cs_CZ\n"
|
||||||
@@ -12,11 +12,7 @@ msgstr ""
|
|||||||
"X-Generator: Poedit 2.1.1\n"
|
"X-Generator: Poedit 2.1.1\n"
|
||||||
"X-Poedit-Basepath: ..\n"
|
"X-Poedit-Basepath: ..\n"
|
||||||
"Plural-Forms: nplurals=4; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 3;\n"
|
"Plural-Forms: nplurals=4; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 3;\n"
|
||||||
"X-Poedit-KeywordsList: ;__:1,2t;_e:1,2t;_x:1c,2,3t;_n:1,2,4t;__s:1,2t;"
|
"X-Poedit-KeywordsList: ;__:1,2t;_e:1,2t;_x:1c,2,3t;_n:1,2,4t;__s:1,2t;_ex:1c,2,3t;_sx:1c,2,3t;_nx:1c,2,3,5t\n"
|
||||||
"_ex:1c,2,3t;_sx:1c,2,3t;_nx:1c,2,3,5t\n"
|
|
||||||
"X-Crowdin-Project: processmaker-plugin\n"
|
|
||||||
"X-Crowdin-Language: cs\n"
|
|
||||||
"X-Crowdin-File: /3.3.0/source.po\n"
|
|
||||||
"X-Poedit-SearchPath-0: ajax\n"
|
"X-Poedit-SearchPath-0: ajax\n"
|
||||||
"X-Poedit-SearchPath-1: front\n"
|
"X-Poedit-SearchPath-1: front\n"
|
||||||
"X-Poedit-SearchPath-2: inc\n"
|
"X-Poedit-SearchPath-2: inc\n"
|
||||||
@@ -24,6 +20,11 @@ msgstr ""
|
|||||||
"X-Poedit-SearchPath-4: js\n"
|
"X-Poedit-SearchPath-4: js\n"
|
||||||
"X-Poedit-SearchPath-5: hook.php\n"
|
"X-Poedit-SearchPath-5: hook.php\n"
|
||||||
"X-Poedit-SearchPath-6: setup.php\n"
|
"X-Poedit-SearchPath-6: setup.php\n"
|
||||||
|
"X-Crowdin-Project: processmaker-plugin\n"
|
||||||
|
"X-Crowdin-Project-ID: 310131\n"
|
||||||
|
"X-Crowdin-Language: cs\n"
|
||||||
|
"X-Crowdin-File: /3.3.0/source.po\n"
|
||||||
|
"X-Crowdin-File-ID: 15\n"
|
||||||
|
|
||||||
#: ajax/task_users.php:25
|
#: ajax/task_users.php:25
|
||||||
msgid "Re-assign task to"
|
msgid "Re-assign task to"
|
||||||
@@ -102,7 +103,7 @@ msgstr[3] "Případy procesu"
|
|||||||
|
|
||||||
#: inc/case.class.php:80
|
#: inc/case.class.php:80
|
||||||
msgid "Sub-case"
|
msgid "Sub-case"
|
||||||
msgstr ""
|
msgstr "Dílčí případ"
|
||||||
|
|
||||||
#: inc/case.class.php:312
|
#: inc/case.class.php:312
|
||||||
msgid "Current task(s) properties"
|
msgid "Current task(s) properties"
|
||||||
@@ -130,11 +131,11 @@ msgstr "Chcete-li uplatnit"
|
|||||||
|
|
||||||
#: inc/case.class.php:377
|
#: inc/case.class.php:377
|
||||||
msgid "Sub-case properties"
|
msgid "Sub-case properties"
|
||||||
msgstr ""
|
msgstr "Vlastnosti dílčího případu"
|
||||||
|
|
||||||
#: inc/case.class.php:380
|
#: inc/case.class.php:380
|
||||||
msgid "Parent case properties"
|
msgid "Parent case properties"
|
||||||
msgstr ""
|
msgstr "Vlastnosti nadřazeného případu"
|
||||||
|
|
||||||
#: inc/case.class.php:382
|
#: inc/case.class.php:382
|
||||||
msgid "Case properties"
|
msgid "Case properties"
|
||||||
@@ -176,12 +177,12 @@ msgstr "Poslední úprava"
|
|||||||
#: inc/case.class.php:479
|
#: inc/case.class.php:479
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Case is linked to a %1s"
|
msgid "Case is linked to a %1s"
|
||||||
msgstr ""
|
msgstr "Případ je propojen s %1s"
|
||||||
|
|
||||||
#: inc/case.class.php:481
|
#: inc/case.class.php:481
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Sub-case is linked to a %1s"
|
msgid "Sub-case is linked to a %1s"
|
||||||
msgstr ""
|
msgstr "Dílčí případ je propojen s %1s"
|
||||||
|
|
||||||
#: inc/case.class.php:506
|
#: inc/case.class.php:506
|
||||||
msgid "Case cancellation"
|
msgid "Case cancellation"
|
||||||
@@ -213,7 +214,7 @@ msgstr "Titulek"
|
|||||||
|
|
||||||
#: inc/case.class.php:587 inc/case.class.php:1070
|
#: inc/case.class.php:587 inc/case.class.php:1070
|
||||||
msgid "Sub-case of"
|
msgid "Sub-case of"
|
||||||
msgstr ""
|
msgstr "Dílčí případ z"
|
||||||
|
|
||||||
#: inc/case.class.php:602
|
#: inc/case.class.php:602
|
||||||
msgid "Add a new case"
|
msgid "Add a new case"
|
||||||
@@ -433,11 +434,11 @@ msgstr "Nikde se neopakující identif. procesu"
|
|||||||
|
|
||||||
#: inc/process.class.php:433
|
#: inc/process.class.php:433
|
||||||
msgid "Process type"
|
msgid "Process type"
|
||||||
msgstr ""
|
msgstr "Typ procesu"
|
||||||
|
|
||||||
#: inc/process.class.php:439
|
#: inc/process.class.php:439
|
||||||
msgid "Hide case num. & title"
|
msgid "Hide case num. & title"
|
||||||
msgstr ""
|
msgstr "Skrýt číslo případu a nadpis"
|
||||||
|
|
||||||
#: inc/process.class.php:445
|
#: inc/process.class.php:445
|
||||||
msgid "Insert Task Category"
|
msgid "Insert Task Category"
|
||||||
@@ -449,19 +450,19 @@ msgstr "Typ požadavku (samoobslužné)"
|
|||||||
|
|
||||||
#: inc/process.class.php:464 inc/process.class.php:609
|
#: inc/process.class.php:464 inc/process.class.php:609
|
||||||
msgid "Visible in Incident for Central interface"
|
msgid "Visible in Incident for Central interface"
|
||||||
msgstr ""
|
msgstr "Viditelné v incidentu pro ústřední rozhraní"
|
||||||
|
|
||||||
#: inc/process.class.php:470 inc/process.class.php:614
|
#: inc/process.class.php:470 inc/process.class.php:614
|
||||||
msgid "Visible in Request for Central interface"
|
msgid "Visible in Request for Central interface"
|
||||||
msgstr ""
|
msgstr "Viditelné v požadavku pro ústřední rozhraní"
|
||||||
|
|
||||||
#: inc/process.class.php:476 inc/process.class.php:666
|
#: inc/process.class.php:476 inc/process.class.php:666
|
||||||
msgid "Visible in Change"
|
msgid "Visible in Change"
|
||||||
msgstr ""
|
msgstr "Viditelné ve změně"
|
||||||
|
|
||||||
#: inc/process.class.php:482 inc/process.class.php:671
|
#: inc/process.class.php:482 inc/process.class.php:671
|
||||||
msgid "Visible in Problem"
|
msgid "Visible in Problem"
|
||||||
msgstr ""
|
msgstr "Viditelné v problému"
|
||||||
|
|
||||||
#: inc/process.class.php:519
|
#: inc/process.class.php:519
|
||||||
msgctxt "process_type"
|
msgctxt "process_type"
|
||||||
@@ -487,15 +488,15 @@ msgstr "Vložit komentáře kategorie úkolu do jeho popisu"
|
|||||||
|
|
||||||
#: inc/process.class.php:619
|
#: inc/process.class.php:619
|
||||||
msgid "ITIL Category for Self-service interface (left empty to disable)"
|
msgid "ITIL Category for Self-service interface (left empty to disable)"
|
||||||
msgstr ""
|
msgstr "ITIL kategorie pro samoobslužné rozhraní (ponecháním nevyplněného bude vypnuto)"
|
||||||
|
|
||||||
#: inc/process.class.php:646
|
#: inc/process.class.php:646
|
||||||
msgid "Type for Self-service interface"
|
msgid "Type for Self-service interface"
|
||||||
msgstr ""
|
msgstr "Typ samoobslužného rozhraní"
|
||||||
|
|
||||||
#: inc/process.class.php:676
|
#: inc/process.class.php:676
|
||||||
msgid "Process type (to be changed only if not up-to-date)"
|
msgid "Process type (to be changed only if not up-to-date)"
|
||||||
msgstr ""
|
msgstr "Typ procesu (který má být změněno pouze pokud není aktuální)"
|
||||||
|
|
||||||
#: inc/process_profile.class.php:26 inc/process_profile.class.php:45
|
#: inc/process_profile.class.php:26 inc/process_profile.class.php:45
|
||||||
msgid "Authorizations"
|
msgid "Authorizations"
|
||||||
@@ -544,11 +545,8 @@ msgid "You must manage it first (see 'Process - Case' tab)!"
|
|||||||
msgstr "Nejprve je třeba toto spravovat (viz panel „Proces – případ“)!"
|
msgstr "Nejprve je třeba toto spravovat (viz panel „Proces – případ“)!"
|
||||||
|
|
||||||
#: inc/processmaker.class.php:3038
|
#: inc/processmaker.class.php:3038
|
||||||
msgid ""
|
msgid "ProcessMaker plugin is under maintenance, please retry later, thank you."
|
||||||
"ProcessMaker plugin is under maintenance, please retry later, thank you."
|
msgstr "Na zásuvném modulu ProcessMaker probíhá údržba, zkuste to prosím později – děkujeme."
|
||||||
msgstr ""
|
|
||||||
"Na zásuvném modulu ProcessMaker probíhá údržba, zkuste to prosím později – "
|
|
||||||
"děkujeme."
|
|
||||||
|
|
||||||
#: inc/profile.class.php:17
|
#: inc/profile.class.php:17
|
||||||
msgid "Process configuration"
|
msgid "Process configuration"
|
||||||
@@ -568,7 +566,7 @@ msgstr[3] "Process case tasks"
|
|||||||
|
|
||||||
#: inc/task.class.php:258
|
#: inc/task.class.php:258
|
||||||
msgid "Sub-case task(s)"
|
msgid "Sub-case task(s)"
|
||||||
msgstr ""
|
msgstr "Úkoly dílčího případu"
|
||||||
|
|
||||||
#: inc/taskcategory.class.php:21 inc/taskcategory.class.php:31
|
#: inc/taskcategory.class.php:21 inc/taskcategory.class.php:31
|
||||||
msgid "Task List"
|
msgid "Task List"
|
||||||
@@ -610,3 +608,4 @@ msgstr "Dílčí proces"
|
|||||||
|
|
||||||
#~ msgid "Plugin is under maintenance, please retry later, thank you."
|
#~ msgid "Plugin is under maintenance, please retry later, thank you."
|
||||||
#~ msgstr "Plugin is under maintenance, please retry later, thank you."
|
#~ msgstr "Plugin is under maintenance, please retry later, thank you."
|
||||||
|
|
||||||
|
|||||||
BIN
locales/en_GB.mo
BIN
locales/en_GB.mo
Binary file not shown.
635
locales/en_GB.po
635
locales/en_GB.po
File diff suppressed because it is too large
Load Diff
BIN
locales/fr_FR.mo
BIN
locales/fr_FR.mo
Binary file not shown.
458
locales/fr_FR.po
458
locales/fr_FR.po
@@ -1,18 +1,19 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: processmaker-plugin\n"
|
"Project-Id-Version: processmaker-plugin\n"
|
||||||
"POT-Creation-Date: 2020-07-13 09:41+0200\n"
|
"POT-Creation-Date: 2021-02-15 17:32+0100\n"
|
||||||
"PO-Revision-Date: 2020-07-13 11:02+0200\n"
|
"PO-Revision-Date: 2021-02-15 17:34+0100\n"
|
||||||
"Last-Translator: tomolimo\n"
|
"Last-Translator: tomolimo\n"
|
||||||
"Language-Team: French\n"
|
"Language-Team: French\n"
|
||||||
"Language: fr_FR\n"
|
"Language: fr_FR\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"X-Generator: Poedit 2.3.1\n"
|
"X-Generator: Poedit 2.4.2\n"
|
||||||
"X-Poedit-Basepath: ..\n"
|
"X-Poedit-Basepath: ..\n"
|
||||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||||
"X-Poedit-KeywordsList: ;__:1,2t;_e:1,2t;_x:1c,2,3t;_n:1,2,4t;__s:1,2t;_ex:1c,2,3t;_sx:1c,2,3t;_nx:1c,2,3,5t\n"
|
"X-Poedit-KeywordsList: ;__:1,2t;_e:1,2t;_x:1c,2,3t;_n:1,2,4t;__s:1,2t;"
|
||||||
|
"_ex:1c,2,3t;_sx:1c,2,3t;_nx:1c,2,3,5t\n"
|
||||||
"X-Crowdin-Project: processmaker-plugin\n"
|
"X-Crowdin-Project: processmaker-plugin\n"
|
||||||
"X-Crowdin-Project-ID: 310131\n"
|
"X-Crowdin-Project-ID: 310131\n"
|
||||||
"X-Crowdin-Language: fr\n"
|
"X-Crowdin-Language: fr\n"
|
||||||
@@ -28,54 +29,63 @@ msgstr ""
|
|||||||
|
|
||||||
#: ajax/task_users.php:36
|
#: ajax/task_users.php:36
|
||||||
msgid "Re-assign task to"
|
msgid "Re-assign task to"
|
||||||
msgstr "Ré-affecter tâche à"
|
msgstr "Réattribuer la tâche à"
|
||||||
|
|
||||||
#: ajax/task_users.php:60 ajax/task_users.php:61 ajax/task_users.php:124
|
#: ajax/task_users.php:67 ajax/task_users.php:68 ajax/task_users.php:135
|
||||||
msgid "Re-assign"
|
msgid "Re-assign"
|
||||||
msgstr "Ré-affecter"
|
msgstr "Réattribuer"
|
||||||
|
|
||||||
#: ajax/task_users.php:110
|
#: ajax/task_users.php:100
|
||||||
#| msgid "Task already assigned to this person!"
|
msgid "Input at least 10 words in English to justify."
|
||||||
msgid "Task is already assigned to this user or group!"
|
msgstr "Entrez au moins 10 mots en anglais pour justifier."
|
||||||
msgstr "La tâche est déjà affectée à cet utilisateur (ou ce groupe) !"
|
|
||||||
|
|
||||||
#: ajax/task_users.php:110 ajax/task_users.php:122
|
#: ajax/task_users.php:118
|
||||||
#| msgid "Re-assign task to"
|
msgid "Task is already un-assigned!"
|
||||||
|
msgstr "L'attribution de cette tâche est déjà supprimée !"
|
||||||
|
|
||||||
|
#: ajax/task_users.php:118 ajax/task_users.php:120 ajax/task_users.php:133
|
||||||
msgid "Re-assign task"
|
msgid "Re-assign task"
|
||||||
msgstr "Ré-affecter tâche"
|
msgstr "Réattribuer la tâche"
|
||||||
|
|
||||||
#: ajax/task_users.php:114 ajax/task_users.php:119
|
#: ajax/task_users.php:120
|
||||||
#| msgid "Claim target task"
|
msgid "Task is already assigned to this user!"
|
||||||
|
msgstr "La tâche est déjà attribuée à cet utilisateur !"
|
||||||
|
|
||||||
|
#: ajax/task_users.php:125 ajax/task_users.php:130
|
||||||
msgid "Un-claim task"
|
msgid "Un-claim task"
|
||||||
msgstr "Annuler affectation de la tâche"
|
msgstr "Supprimer l'attribution de la tâche"
|
||||||
|
|
||||||
#: ajax/task_users.php:115
|
#: ajax/task_users.php:126
|
||||||
msgid "Please input reason to un-claim<br/>(task will be re-assigned to former group):"
|
msgid ""
|
||||||
msgstr "Saisir la raison pour l'annulation de l'affectation<br/>(la tâche sera ré-affectée au groupe précédent) :"
|
"Please input reason to un-claim<br/>(task will be re-assigned to former "
|
||||||
|
"group):"
|
||||||
|
msgstr ""
|
||||||
|
"Saisir la raison pour l'annulation de l'attribution<br/>(la tâche sera "
|
||||||
|
"réattribuée au groupe précédent) :"
|
||||||
|
|
||||||
#: ajax/task_users.php:116
|
#: ajax/task_users.php:127
|
||||||
msgid "Un-claim"
|
msgid "Un-claim"
|
||||||
msgstr "Annulation de l'affectation"
|
msgstr "Suppression de l'attribution"
|
||||||
|
|
||||||
#: ajax/task_users.php:119
|
#: ajax/task_users.php:130
|
||||||
msgid "Can\\'t un-assign Task!"
|
msgid "Can't un-assign task!"
|
||||||
msgstr "Annulation de l'affectation impossible !"
|
msgstr "Suppression de l'attribution impossible !"
|
||||||
|
|
||||||
#: ajax/task_users.php:123
|
|
||||||
msgid "Please input reason to re-assign:"
|
|
||||||
msgstr "Saisir la raison pour la ré-affectation :"
|
|
||||||
|
|
||||||
#: ajax/task_users.php:134
|
#: ajax/task_users.php:134
|
||||||
|
msgid "Please input reason to re-assign:"
|
||||||
|
msgstr "Saisir la raison pour la réattribution :"
|
||||||
|
|
||||||
|
#: ajax/task_users.php:145
|
||||||
msgid "Send reminder"
|
msgid "Send reminder"
|
||||||
msgstr "Envoyer un rappel"
|
msgstr "Envoyer un rappel"
|
||||||
|
|
||||||
#: front/case.form.php:32
|
#: front/case.form.php:32
|
||||||
msgid "Case has been deleted!"
|
msgid "Case has been deleted!"
|
||||||
msgstr "Le cas a été effacé !"
|
msgstr "Le cas a été supprimé !"
|
||||||
|
|
||||||
#: front/case.form.php:34
|
#: front/case.form.php:34
|
||||||
msgid "Unable to delete case!"
|
msgid "Unable to delete case!"
|
||||||
msgstr "Impossible d'effacer le cas !"
|
msgstr "Impossible de supprimer le cas !"
|
||||||
|
|
||||||
#: front/case.form.php:46
|
#: front/case.form.php:46
|
||||||
msgid "Case has been cancelled!"
|
msgid "Case has been cancelled!"
|
||||||
@@ -85,12 +95,12 @@ msgstr "Le cas a été annulé !"
|
|||||||
msgid "Unable to cancel case!"
|
msgid "Unable to cancel case!"
|
||||||
msgstr "Impossible d'annuler le cas !"
|
msgstr "Impossible d'annuler le cas !"
|
||||||
|
|
||||||
#: front/case.form.php:70 front/case.form.php:72 inc/case.class.php:1310
|
#: front/case.form.php:70 front/case.form.php:72 inc/case.class.php:1272
|
||||||
msgid "Process cases"
|
msgid "Process cases"
|
||||||
msgstr "Cas des processus"
|
msgstr "Cas des processus"
|
||||||
|
|
||||||
#: front/case.php:5 front/caselink.form.php:29 front/caselink.php:5
|
#: front/case.php:5 front/caselink.form.php:29 front/caselink.php:5
|
||||||
#: front/process.form.php:27 front/process.php:5 inc/caselink.class.php:157
|
#: front/process.form.php:27 front/process.php:5 inc/caselink.class.php:158
|
||||||
#: inc/config.class.php:50 inc/config.class.php:363 inc/process.class.php:409
|
#: inc/config.class.php:50 inc/config.class.php:363 inc/process.class.php:409
|
||||||
#: inc/profile.class.php:52 inc/profile.class.php:83
|
#: inc/profile.class.php:52 inc/profile.class.php:83
|
||||||
msgid "ProcessMaker"
|
msgid "ProcessMaker"
|
||||||
@@ -98,222 +108,235 @@ msgstr "ProcessMaker"
|
|||||||
|
|
||||||
#: front/processmaker.form.php:80
|
#: front/processmaker.form.php:80
|
||||||
msgid "Task re-assigned!"
|
msgid "Task re-assigned!"
|
||||||
msgstr "Tâche ré-affectée !"
|
msgstr "Tâche réattribuée !"
|
||||||
|
|
||||||
#: front/processmaker.form.php:82
|
#: front/processmaker.form.php:82
|
||||||
msgid "Error re-assigning task: "
|
msgid "Error re-assigning task: "
|
||||||
msgstr "Impossible de ré-affecter cette tâche :"
|
msgstr "Impossible de réattribuer cette tâche :"
|
||||||
|
|
||||||
#: front/processmaker.form.php:93
|
#: front/processmaker.form.php:93
|
||||||
#| msgid "Task name"
|
|
||||||
msgid "Task un-claimed!"
|
msgid "Task un-claimed!"
|
||||||
msgstr "Annulation de l'affectation de la tâche effectuée !"
|
msgstr "Annulation de l'attribution de la tâche effectuée !"
|
||||||
|
|
||||||
#: front/processmaker.form.php:95
|
#: front/processmaker.form.php:95
|
||||||
msgid "Can't un-claim task! Verify 'Assignement Rules' in the process definition."
|
msgid ""
|
||||||
msgstr "Annulation de l'affectation impossible ! Vérifiez les règles d'assignation dans la définition du Processus."
|
"Can't un-claim task! Verify 'Assignement Rules' in the process definition."
|
||||||
|
msgstr ""
|
||||||
|
"Annulation de l'attribution impossible ! Vérifiez les règles d'attribution "
|
||||||
|
"dans la définition du Processus."
|
||||||
|
|
||||||
#: front/processmaker.helpdesk.form.php:21
|
#: front/processmaker.helpdesk.form.php:21
|
||||||
msgid "Process - Case"
|
msgid "Process - Case"
|
||||||
msgstr "Processus - Cas"
|
msgstr "Processus - Cas"
|
||||||
|
|
||||||
#: front/processmaker.helpdesk.form.php:24 inc/case.class.php:799
|
#: front/processmaker.helpdesk.form.php:24 inc/case.class.php:761
|
||||||
msgid "Select the process you want to add"
|
msgid "Select the process you want to add"
|
||||||
msgstr "Choisir le processus à démarrer"
|
msgstr "Choisir le processus à ajouter"
|
||||||
|
|
||||||
#: hook.php:9 inc/taskcategory.class.php:214
|
#: hook.php:9 inc/taskcategory.class.php:214
|
||||||
msgid "Synchronize Task List"
|
msgid "Synchronize Task List"
|
||||||
msgstr "Synchroniser la liste des Tâches"
|
msgstr "Synchroniser la liste des tâches"
|
||||||
|
|
||||||
#: hook.php:76 inc/case.class.php:89
|
#: hook.php:76 inc/case.class.php:89
|
||||||
msgid "Case"
|
msgid "Case"
|
||||||
msgstr "Cas"
|
msgstr "Cas"
|
||||||
|
|
||||||
#: hook.php:76 inc/case.class.php:778 inc/case.class.php:1355
|
#: hook.php:76 inc/case.class.php:740 inc/case.class.php:1317
|
||||||
msgid "Status"
|
msgid "Status"
|
||||||
msgstr "Statut"
|
msgstr "Statut"
|
||||||
|
|
||||||
#: inc/case.class.php:25 inc/case.class.php:102 inc/case.class.php:104
|
#: inc/case.class.php:25
|
||||||
msgid "Process case"
|
msgid "Process case"
|
||||||
msgid_plural "Process cases"
|
msgid_plural "Process cases"
|
||||||
msgstr[0] "Cas du processus"
|
msgstr[0] "Cas du processus"
|
||||||
msgstr[1] "Cas des processus"
|
msgstr[1] "Cas du processus"
|
||||||
|
|
||||||
#: inc/case.class.php:92
|
#: inc/case.class.php:92
|
||||||
msgid "Sub-case"
|
msgid "Sub-case"
|
||||||
msgstr "Sous-cas"
|
msgstr "Sous-cas"
|
||||||
|
|
||||||
#: inc/case.class.php:303
|
#: inc/case.class.php:265
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "<b>Task un-claimed!</b><br/><b>Case: </b>%s<br/><b>Task: </b>\"%s\" has been un-assigned from \"%s\" and assigned to \"%s\" group.<br/><b>Reason: </b>%s"
|
msgid ""
|
||||||
msgstr "<b>Annulation de l'affection de la tâche effectuée !</b><br/><b>Cas : </b>%s<br/><b>Tâche : </b>\"%s\" a été libérée de \"%s\" et assignée au groupe \"%s\".<br/><b>Motif : </b>%s"
|
"<b>Task un-claimed!</b><br/><b>Case: </b>%s<br/><b>Task: </b>\"%s\" has been "
|
||||||
|
"un-assigned from \"%s\" and assigned to \"%s\" group.<br/><b>Reason: </b>%s"
|
||||||
|
msgstr ""
|
||||||
|
"<b>Suppression de l'attribution de la tâche effectuée !</b><br/><b>Cas : </b>"
|
||||||
|
"%s<br/><b>Tâche : </b>\"%s\" a été libérée de \"%s\" et attribuée au groupe "
|
||||||
|
"\"%s\".<br/><b>Motif : </b>%s"
|
||||||
|
|
||||||
#: inc/case.class.php:420
|
#: inc/case.class.php:382
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "<b>Task re-assigned!</b><br/><b>Case: </b>%s<br/><b>Task: </b>\"%s\" has been re-assigned from \"%s\" to \"%s\".<br/><b>Reason: </b>%s"
|
msgid ""
|
||||||
msgstr "<b>Tâche ré-assignée !</b><br/><b>Cas : </b>%s<br/><b>Tâche : </b>\"%s\" a été ré-assignée de \"%s\" à \"%s\".<br/><b>Motif : </b>%s"
|
"<b>Task re-assigned!</b><br/><b>Case: </b>%s<br/><b>Task: </b>\"%s\" has "
|
||||||
|
"been re-assigned from \"%s\" to \"%s\".<br/><b>Reason: </b>%s"
|
||||||
|
msgstr ""
|
||||||
|
"<b>Tâche réattribuée !</b><br/><b>Cas : </b>%s<br/><b>Tâche : </b>\"%s\" a "
|
||||||
|
"été réattribuée de \"%s\" à \"%s\".<br/><b>Motif : </b>%s"
|
||||||
|
|
||||||
#: inc/case.class.php:429
|
#: inc/case.class.php:391
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "<b>Task assigned!</b><br/><b>Case: </b>%s<br/><b>Task: </b>\"%s\" has been assigned to \"%s\".<br/><b>Reason: </b>%s"
|
msgid ""
|
||||||
msgstr "<b>Tâche assignée !</b><br/><b>Cas : </b>%s<br/><b>Tâche : </b>\"%s\" a été asignée à \"%s\".<br/><b>Motif : </b>%s"
|
"<b>Task assigned!</b><br/><b>Case: </b>%s<br/><b>Task: </b>\"%s\" has been "
|
||||||
|
"assigned to \"%s\".<br/><b>Reason: </b>%s"
|
||||||
|
msgstr ""
|
||||||
|
"<b>Tâche attribuée !</b><br/><b>Cas : </b>%s<br/><b>Tâche : </b>\"%s\" a été "
|
||||||
|
"attribuée à \"%s\".<br/><b>Motif : </b>%s"
|
||||||
|
|
||||||
#: inc/case.class.php:510
|
#: inc/case.class.php:472
|
||||||
msgid "Current task(s) properties"
|
msgid "Current task(s) properties"
|
||||||
msgstr "Propriétés des tâches en cours"
|
msgstr "Propriétés des tâches en cours"
|
||||||
|
|
||||||
#: inc/case.class.php:514 inc/task.class.php:283
|
#: inc/case.class.php:476 inc/task.class.php:283
|
||||||
msgid "Task"
|
msgid "Task"
|
||||||
msgstr "Tâche"
|
msgstr "Tâche"
|
||||||
|
|
||||||
#: inc/case.class.php:515 inc/task.class.php:284
|
#: inc/case.class.php:477 inc/task.class.php:284 inc/taskcategory.class.php:43
|
||||||
|
#: inc/taskcategory.class.php:122
|
||||||
msgid "Task guid"
|
msgid "Task guid"
|
||||||
msgstr "Guid de la tâche"
|
msgstr "Guid de la tâche"
|
||||||
|
|
||||||
#: inc/case.class.php:516 inc/task.class.php:285
|
#: inc/case.class.php:478 inc/task.class.php:285
|
||||||
msgid "Current user"
|
msgid "Current user"
|
||||||
msgstr "Utilisateur actuel"
|
msgstr "Utilisateur actuel"
|
||||||
|
|
||||||
#: inc/case.class.php:517 inc/task.class.php:286
|
#: inc/case.class.php:479 inc/task.class.php:286
|
||||||
msgid "Task delegation date"
|
msgid "Task delegation date"
|
||||||
msgstr "Date de délégation de tâche"
|
msgstr "Date d'attribution de tâche"
|
||||||
|
|
||||||
#: inc/case.class.php:539 inc/task.class.php:295
|
#: inc/case.class.php:501 inc/task.class.php:295
|
||||||
msgid "To be claimed"
|
msgid "To be claimed"
|
||||||
msgstr "A réclamer"
|
msgstr "A réclamer"
|
||||||
|
|
||||||
#: inc/case.class.php:575
|
#: inc/case.class.php:537
|
||||||
msgid "Sub-case properties"
|
msgid "Sub-case properties"
|
||||||
msgstr "Propriétés du sous-cas"
|
msgstr "Propriétés du sous-cas"
|
||||||
|
|
||||||
#: inc/case.class.php:578
|
#: inc/case.class.php:540
|
||||||
msgid "Parent case properties"
|
msgid "Parent case properties"
|
||||||
msgstr "Propriétés du cas parent"
|
msgstr "Propriétés du cas parent"
|
||||||
|
|
||||||
#: inc/case.class.php:580
|
#: inc/case.class.php:542
|
||||||
msgid "Case properties"
|
msgid "Case properties"
|
||||||
msgstr "Propriétés du cas"
|
msgstr "Propriétés du cas"
|
||||||
|
|
||||||
#: inc/case.class.php:585 inc/case.class.php:776 inc/case.class.php:1328
|
#: inc/case.class.php:547 inc/case.class.php:738 inc/case.class.php:1290
|
||||||
#: inc/process.class.php:576
|
#: inc/process.class.php:576
|
||||||
msgid "Process"
|
msgid "Process"
|
||||||
msgstr "Processus"
|
msgstr "Processus"
|
||||||
|
|
||||||
#: inc/case.class.php:586 inc/notificationtargetprocessmaker.class.php:64
|
#: inc/case.class.php:548 inc/notificationtargetprocessmaker.class.php:64
|
||||||
msgid "Case title"
|
msgid "Case title"
|
||||||
msgstr "Titre du cas"
|
msgstr "Titre du cas"
|
||||||
|
|
||||||
#: inc/case.class.php:587
|
#: inc/case.class.php:549
|
||||||
msgid "Case number"
|
msgid "Case number"
|
||||||
msgstr "Numéro du cas"
|
msgstr "Numéro du cas"
|
||||||
|
|
||||||
#: inc/case.class.php:588
|
#: inc/case.class.php:550
|
||||||
msgid "Case status"
|
msgid "Case status"
|
||||||
msgstr "Statut du cas"
|
msgstr "Statut du cas"
|
||||||
|
|
||||||
#: inc/case.class.php:589
|
#: inc/case.class.php:551
|
||||||
msgid "Case guid"
|
msgid "Case guid"
|
||||||
msgstr "Guid du cas"
|
msgstr "Guid du cas"
|
||||||
|
|
||||||
#: inc/case.class.php:590
|
#: inc/case.class.php:552
|
||||||
msgid "Creator"
|
msgid "Creator"
|
||||||
msgstr "Créateur"
|
msgstr "Créateur"
|
||||||
|
|
||||||
#: inc/case.class.php:591 inc/case.class.php:1370
|
#: inc/case.class.php:553 inc/case.class.php:1332
|
||||||
msgid "Creation date"
|
msgid "Creation date"
|
||||||
msgstr "Date de création"
|
msgstr "Date de création"
|
||||||
|
|
||||||
#: inc/case.class.php:592
|
#: inc/case.class.php:554
|
||||||
msgid "Last update"
|
msgid "Last update"
|
||||||
msgstr "Dernière mise à jour"
|
msgstr "Dernière mise à jour"
|
||||||
|
|
||||||
#: inc/case.class.php:675
|
#: inc/case.class.php:637
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Case is linked to a %1s"
|
msgid "Case is linked to a %1s"
|
||||||
msgstr "Le cas est lié à un %1s"
|
msgstr "Le cas est lié à un %1s"
|
||||||
|
|
||||||
#: inc/case.class.php:677
|
#: inc/case.class.php:639
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Sub-case is linked to a %1s"
|
msgid "Sub-case is linked to a %1s"
|
||||||
msgstr "Le sous-cas est lié à un %1s"
|
msgstr "Le sous-cas est lié à un %1s"
|
||||||
|
|
||||||
#: inc/case.class.php:698
|
#: inc/case.class.php:660
|
||||||
msgid "Case cancellation"
|
msgid "Case cancellation"
|
||||||
msgstr "Annulation du cas"
|
msgstr "Annulation du cas"
|
||||||
|
|
||||||
#: inc/case.class.php:699
|
#: inc/case.class.php:661
|
||||||
msgid "Cancel case"
|
msgid "Cancel case"
|
||||||
msgstr "Annuler cas"
|
msgstr "Annuler cas"
|
||||||
|
|
||||||
#: inc/case.class.php:703
|
#: inc/case.class.php:665
|
||||||
msgid "Confirm cancellation?"
|
msgid "Confirm cancellation?"
|
||||||
msgstr "Confirmer l’annulation ?"
|
msgstr "Confirmer l’annulation ?"
|
||||||
|
|
||||||
#: inc/case.class.php:703 inc/profile.class.php:23
|
#: inc/case.class.php:665 inc/profile.class.php:23
|
||||||
msgid "Cancel"
|
msgid "Cancel"
|
||||||
msgstr "Annuler"
|
msgstr "Annuler"
|
||||||
|
|
||||||
#: inc/case.class.php:717
|
#: inc/case.class.php:679
|
||||||
msgid "Case deletion"
|
msgid "Case deletion"
|
||||||
msgstr "Suppression du cas"
|
msgstr "Suppression du cas"
|
||||||
|
|
||||||
#: inc/case.class.php:777 inc/case.class.php:1321
|
#: inc/case.class.php:739 inc/case.class.php:1283
|
||||||
msgid "Title"
|
msgid "Title"
|
||||||
msgstr "Titre"
|
msgstr "Titre"
|
||||||
|
|
||||||
#: inc/case.class.php:779 inc/case.class.php:1362
|
#: inc/case.class.php:741 inc/case.class.php:1324
|
||||||
msgid "Sub-case of"
|
msgid "Sub-case of"
|
||||||
msgstr "Sous-cas de"
|
msgstr "Sous-cas de"
|
||||||
|
|
||||||
#: inc/case.class.php:796
|
#: inc/case.class.php:758
|
||||||
msgid "Add a new case"
|
msgid "Add a new case"
|
||||||
msgstr "Ajouter un nouveau cas"
|
msgstr "Ajouter un nouveau cas"
|
||||||
|
|
||||||
#: inc/case.class.php:1227
|
#: inc/case.class.php:1189
|
||||||
msgctxt "case_status"
|
msgctxt "case_status"
|
||||||
msgid "Draft"
|
msgid "Draft"
|
||||||
msgstr "Brouillon"
|
msgstr "Brouillon"
|
||||||
|
|
||||||
#: inc/case.class.php:1228
|
#: inc/case.class.php:1190
|
||||||
msgctxt "case_status"
|
msgctxt "case_status"
|
||||||
msgid "To do"
|
msgid "To do"
|
||||||
msgstr "A faire"
|
msgstr "A faire"
|
||||||
|
|
||||||
#: inc/case.class.php:1229
|
#: inc/case.class.php:1191
|
||||||
msgctxt "case_status"
|
msgctxt "case_status"
|
||||||
msgid "Completed"
|
msgid "Completed"
|
||||||
msgstr "Terminé"
|
msgstr "Terminé"
|
||||||
|
|
||||||
#: inc/case.class.php:1230
|
#: inc/case.class.php:1192
|
||||||
msgctxt "case_status"
|
msgctxt "case_status"
|
||||||
msgid "Cancelled"
|
msgid "Cancelled"
|
||||||
msgstr "Annulé"
|
msgstr "Annulé"
|
||||||
|
|
||||||
#: inc/case.class.php:1314
|
#: inc/case.class.php:1276
|
||||||
msgid "ID"
|
msgid "ID"
|
||||||
msgstr "ID"
|
msgstr "ID"
|
||||||
|
|
||||||
#: inc/case.class.php:1335 inc/notificationtargetprocessmaker.class.php:72
|
#: inc/case.class.php:1297 inc/notificationtargetprocessmaker.class.php:72
|
||||||
#| msgid "Item entity"
|
|
||||||
msgid "Item type"
|
msgid "Item type"
|
||||||
msgstr "Type de l'item"
|
msgstr "Type de l'item"
|
||||||
|
|
||||||
#: inc/case.class.php:1342
|
#: inc/case.class.php:1304
|
||||||
msgid "Item"
|
msgid "Item"
|
||||||
msgstr "Item"
|
msgstr "Item"
|
||||||
|
|
||||||
#: inc/case.class.php:1349
|
#: inc/case.class.php:1311
|
||||||
msgid "Item entity"
|
msgid "Item entity"
|
||||||
msgstr "Entité de l'item"
|
msgstr "Entité de l'item"
|
||||||
|
|
||||||
#: inc/case.class.php:1379
|
#: inc/case.class.php:1341
|
||||||
#| msgid "Last update"
|
|
||||||
msgid "Last update date"
|
msgid "Last update date"
|
||||||
msgstr "Date de dernière mise à jour"
|
msgstr "Date de dernière mise à jour"
|
||||||
|
|
||||||
#: inc/case.class.php:1392
|
#: inc/case.class.php:1354
|
||||||
#, php-format
|
#, php-format
|
||||||
#| msgid "Case status"
|
|
||||||
msgid "Case status is '%s'"
|
msgid "Case status is '%s'"
|
||||||
msgstr "L'état du cas est '%s'"
|
msgstr "L'état du cas est '%s'"
|
||||||
|
|
||||||
@@ -341,43 +364,43 @@ msgstr "Lien-cas"
|
|||||||
msgid "Synchronous"
|
msgid "Synchronous"
|
||||||
msgstr "Synchrone"
|
msgstr "Synchrone"
|
||||||
|
|
||||||
#: inc/caselink.class.php:80 inc/caselink.class.php:179
|
#: inc/caselink.class.php:80 inc/caselink.class.php:180
|
||||||
msgid "External data"
|
msgid "External data"
|
||||||
msgstr "Données externes"
|
msgstr "Données externes"
|
||||||
|
|
||||||
#: inc/caselink.class.php:85 inc/caselink.class.php:185
|
#: inc/caselink.class.php:85 inc/caselink.class.php:186
|
||||||
msgid "Self"
|
msgid "Self"
|
||||||
msgstr "Self"
|
msgstr "Self"
|
||||||
|
|
||||||
#: inc/caselink.class.php:90 inc/caselink.class.php:203
|
#: inc/caselink.class.php:90 inc/caselink.class.php:204
|
||||||
msgid "Source task GUID"
|
msgid "Source task GUID"
|
||||||
msgstr "GUID de la tâche source"
|
msgstr "GUID de la tâche source"
|
||||||
|
|
||||||
#: inc/caselink.class.php:98 inc/caselink.class.php:209
|
#: inc/caselink.class.php:99 inc/caselink.class.php:210
|
||||||
msgid "Target task GUID"
|
msgid "Target task GUID"
|
||||||
msgstr "GUID de la tâche cible"
|
msgstr "GUID de la tâche cible"
|
||||||
|
|
||||||
#: inc/caselink.class.php:106 inc/caselink.class.php:221
|
#: inc/caselink.class.php:107 inc/caselink.class.php:222
|
||||||
msgid "Target process GUID"
|
msgid "Target process GUID"
|
||||||
msgstr "GUID du Processus cible"
|
msgstr "GUID du Processus cible"
|
||||||
|
|
||||||
#: inc/caselink.class.php:115 inc/caselink.class.php:215
|
#: inc/caselink.class.php:116 inc/caselink.class.php:216
|
||||||
msgid "Target dynaform GUID"
|
msgid "Target dynaform GUID"
|
||||||
msgstr "GUID du dynaform cible"
|
msgstr "GUID du dynaform cible"
|
||||||
|
|
||||||
#: inc/caselink.class.php:120 inc/caselink.class.php:227
|
#: inc/caselink.class.php:121 inc/caselink.class.php:228
|
||||||
msgid "Source condition"
|
msgid "Source condition"
|
||||||
msgstr "Condition d'activation du lien"
|
msgstr "Condition d'activation du lien"
|
||||||
|
|
||||||
#: inc/caselink.class.php:126 inc/caselink.class.php:191
|
#: inc/caselink.class.php:127 inc/caselink.class.php:192
|
||||||
msgid "Claim target task"
|
msgid "Claim target task"
|
||||||
msgstr "Tâche cible 'à réclamer'"
|
msgstr "Tâche cible 'à réclamer'"
|
||||||
|
|
||||||
#: inc/caselink.class.php:136
|
#: inc/caselink.class.php:137
|
||||||
msgid "Impersonate target task user"
|
msgid "Impersonate target task user"
|
||||||
msgstr "Personnifier l'utilisateur de la tâche cible"
|
msgstr "Personnifier l'utilisateur de la tâche cible"
|
||||||
|
|
||||||
#: inc/caselink.class.php:141 inc/caselink.class.php:197
|
#: inc/caselink.class.php:142 inc/caselink.class.php:198
|
||||||
msgid "External application JSON config"
|
msgid "External application JSON config"
|
||||||
msgstr "Configuration JSON de l'application externe"
|
msgstr "Configuration JSON de l'application externe"
|
||||||
|
|
||||||
@@ -390,9 +413,12 @@ msgid "ProcessMaker setup"
|
|||||||
msgstr "Configuration du serveur ProcessMaker"
|
msgstr "Configuration du serveur ProcessMaker"
|
||||||
|
|
||||||
#: inc/config.class.php:159
|
#: inc/config.class.php:159
|
||||||
#| msgid "Server URL (must be in same domain than GLPI)"
|
msgid ""
|
||||||
msgid "Server URL (must be in same domain than GLPI, if GLPI is using HTTPS, PM server must also use HTTPS)"
|
"Server URL (must be in same domain than GLPI, if GLPI is using HTTPS, PM "
|
||||||
msgstr "URL du serveur (doit être dans le même domaine que GLPI, si GLPI utilise HTTPS, alors PM doit aussi utiliser HTTPS)"
|
"server must also use HTTPS)"
|
||||||
|
msgstr ""
|
||||||
|
"URL du serveur (doit être dans le même domaine que GLPI, si GLPI utilise "
|
||||||
|
"HTTPS, alors PM doit aussi utiliser HTTPS)"
|
||||||
|
|
||||||
#: inc/config.class.php:163
|
#: inc/config.class.php:163
|
||||||
msgid "Common domain with GLPI"
|
msgid "Common domain with GLPI"
|
||||||
@@ -412,7 +438,7 @@ msgstr "Nom du Workspace"
|
|||||||
|
|
||||||
#: inc/config.class.php:211
|
#: inc/config.class.php:211
|
||||||
msgid "Server administrator name"
|
msgid "Server administrator name"
|
||||||
msgstr "Non de l'administreur du server ProcessMaker"
|
msgstr "Nom de l'administrateur du server ProcessMaker"
|
||||||
|
|
||||||
#: inc/config.class.php:216
|
#: inc/config.class.php:216
|
||||||
msgid "Server administrator password"
|
msgid "Server administrator password"
|
||||||
@@ -451,7 +477,7 @@ msgid "Main Task Category (edit to change name)"
|
|||||||
msgstr "Catégorie principale des tâches (éditer pour changer le nom)"
|
msgstr "Catégorie principale des tâches (éditer pour changer le nom)"
|
||||||
|
|
||||||
#: inc/config.class.php:286
|
#: inc/config.class.php:286
|
||||||
msgid "Task Writer (edit to change name)"
|
msgid "Task writer (edit to change name)"
|
||||||
msgstr "Auteur des tâches (éditer pour changer le nom)"
|
msgstr "Auteur des tâches (éditer pour changer le nom)"
|
||||||
|
|
||||||
#: inc/config.class.php:306
|
#: inc/config.class.php:306
|
||||||
@@ -484,7 +510,7 @@ msgstr "Version de PHP"
|
|||||||
|
|
||||||
#: inc/config.class.php:347
|
#: inc/config.class.php:347
|
||||||
msgid "DB version"
|
msgid "DB version"
|
||||||
msgstr "Version de la Db"
|
msgstr "Version de la DB"
|
||||||
|
|
||||||
#: inc/config.class.php:348
|
#: inc/config.class.php:348
|
||||||
msgid "DB server IP"
|
msgid "DB server IP"
|
||||||
@@ -515,30 +541,22 @@ msgid "eMail recipients"
|
|||||||
msgstr "Destinataires des emails"
|
msgstr "Destinataires des emails"
|
||||||
|
|
||||||
#: inc/notificationtargetprocessmaker.class.php:60
|
#: inc/notificationtargetprocessmaker.class.php:60
|
||||||
#| msgid "Process case"
|
|
||||||
#| msgid_plural "Process cases"
|
|
||||||
msgid "Process category"
|
msgid "Process category"
|
||||||
msgstr "Catégorie du processus"
|
msgstr "Catégorie du processus"
|
||||||
|
|
||||||
#: inc/notificationtargetprocessmaker.class.php:61
|
#: inc/notificationtargetprocessmaker.class.php:61
|
||||||
#| msgid "Process case"
|
|
||||||
#| msgid_plural "Process cases"
|
|
||||||
msgid "Process category id"
|
msgid "Process category id"
|
||||||
msgstr "ID de la catégorie du processus"
|
msgstr "ID de la catégorie du processus"
|
||||||
|
|
||||||
#: inc/notificationtargetprocessmaker.class.php:62
|
#: inc/notificationtargetprocessmaker.class.php:62
|
||||||
#| msgid "Process case task"
|
|
||||||
#| msgid_plural "Process case tasks"
|
|
||||||
msgid "Process category comment"
|
msgid "Process category comment"
|
||||||
msgstr "Commentaire de la catégorie du processus"
|
msgstr "Commentaire de la catégorie du processus"
|
||||||
|
|
||||||
#: inc/notificationtargetprocessmaker.class.php:63
|
#: inc/notificationtargetprocessmaker.class.php:63
|
||||||
#| msgid "Case guid"
|
|
||||||
msgid "Case id"
|
msgid "Case id"
|
||||||
msgstr "ID du cas"
|
msgstr "ID du cas"
|
||||||
|
|
||||||
#: inc/notificationtargetprocessmaker.class.php:65
|
#: inc/notificationtargetprocessmaker.class.php:65
|
||||||
#| msgid "Case deletion"
|
|
||||||
msgid "Case description"
|
msgid "Case description"
|
||||||
msgstr "Description du cas"
|
msgstr "Description du cas"
|
||||||
|
|
||||||
@@ -563,17 +581,14 @@ msgid "Value for key in 'ZZZ' assoc array (1-dimension array)"
|
|||||||
msgstr "Valeur pour la clé 'key' du tableau associatif à une dimension 'ZZZ'"
|
msgstr "Valeur pour la clé 'key' du tableau associatif à une dimension 'ZZZ'"
|
||||||
|
|
||||||
#: inc/notificationtargetprocessmaker.class.php:73
|
#: inc/notificationtargetprocessmaker.class.php:73
|
||||||
#| msgid "Item"
|
|
||||||
msgid "Item id"
|
msgid "Item id"
|
||||||
msgstr "ID de l'item"
|
msgstr "ID de l'item"
|
||||||
|
|
||||||
#: inc/notificationtargetprocessmaker.class.php:74
|
#: inc/notificationtargetprocessmaker.class.php:74
|
||||||
#| msgid "Item"
|
|
||||||
msgid "Item URL"
|
msgid "Item URL"
|
||||||
msgstr "URL de l'item"
|
msgstr "URL de l'item"
|
||||||
|
|
||||||
#: inc/notificationtargetprocessmaker.class.php:75
|
#: inc/notificationtargetprocessmaker.class.php:75
|
||||||
#| msgid "Item entity"
|
|
||||||
msgid "Item title"
|
msgid "Item title"
|
||||||
msgstr "Titre de l'item"
|
msgstr "Titre de l'item"
|
||||||
|
|
||||||
@@ -586,11 +601,14 @@ msgid "YYY is to be replaced by any array variables"
|
|||||||
msgstr "YYY doit être remplacé par n'importe quel nom de tableau"
|
msgstr "YYY doit être remplacé par n'importe quel nom de tableau"
|
||||||
|
|
||||||
#: inc/notificationtargetprocessmaker.class.php:90
|
#: inc/notificationtargetprocessmaker.class.php:90
|
||||||
msgid "ZZZ is to be replaced by any assoc array variables (1-dimension array with key/value pairs)"
|
msgid ""
|
||||||
msgstr "ZZZ doit être replacé par n'importe quel nom de tableau associatif à une dimension (paire clé/valeur)"
|
"ZZZ is to be replaced by any assoc array variables (1-dimension array with "
|
||||||
|
"key/value pairs)"
|
||||||
|
msgstr ""
|
||||||
|
"ZZZ doit être replacé par n'importe quel nom de tableau associatif à une "
|
||||||
|
"dimension (paire clé/valeur)"
|
||||||
|
|
||||||
#: inc/notificationtargettask.class.php:195
|
#: inc/notificationtargettask.class.php:195
|
||||||
#| msgid "Task delegation date"
|
|
||||||
msgid "Task action"
|
msgid "Task action"
|
||||||
msgstr "Action de la tâche"
|
msgstr "Action de la tâche"
|
||||||
|
|
||||||
@@ -608,7 +626,7 @@ msgstr "Type de processus"
|
|||||||
|
|
||||||
#: inc/process.class.php:455
|
#: inc/process.class.php:455
|
||||||
msgid "Hide case num. & title"
|
msgid "Hide case num. & title"
|
||||||
msgstr "Cacher num. et titre du cas"
|
msgstr "Cacher le numéro et le titre du cas"
|
||||||
|
|
||||||
#: inc/process.class.php:461
|
#: inc/process.class.php:461
|
||||||
msgid "Insert Task Category"
|
msgid "Insert Task Category"
|
||||||
@@ -654,15 +672,18 @@ msgstr "Processus"
|
|||||||
|
|
||||||
#: inc/process.class.php:627
|
#: inc/process.class.php:627
|
||||||
msgid "Hide case number and title in task descriptions"
|
msgid "Hide case number and title in task descriptions"
|
||||||
msgstr "Masquer numéro et titre des cas dans les descriptions des tâches"
|
msgstr "Masquer le numéro et le titre des cas dans les descriptions des tâches"
|
||||||
|
|
||||||
#: inc/process.class.php:632
|
#: inc/process.class.php:632
|
||||||
msgid "Insert Task Category comments in Task Description"
|
msgid "Insert Task Category comments in Task Description"
|
||||||
msgstr "Insérer les commentaires des Catégories de Tâches dans les descriptions des Tâches"
|
msgstr ""
|
||||||
|
"Insérer les commentaires des catégories de tâches dans les descriptions des "
|
||||||
|
"tâches"
|
||||||
|
|
||||||
#: inc/process.class.php:652
|
#: inc/process.class.php:652
|
||||||
msgid "ITIL Category for Self-service interface (left empty to disable)"
|
msgid "ITIL Category for Self-service interface (left empty to disable)"
|
||||||
msgstr "Catégorie ITIL pour l'interface libre-service (laissez vide pour désactiver)"
|
msgstr ""
|
||||||
|
"Catégorie ITIL pour l'interface libre-service (laissez vide pour désactiver)"
|
||||||
|
|
||||||
#: inc/process.class.php:679
|
#: inc/process.class.php:679
|
||||||
msgid "Type for Self-service interface"
|
msgid "Type for Self-service interface"
|
||||||
@@ -674,7 +695,6 @@ msgstr "Type de processus (à modifier uniquement si pas à jour)"
|
|||||||
|
|
||||||
#: inc/process.class.php:862
|
#: inc/process.class.php:862
|
||||||
#, php-format
|
#, php-format
|
||||||
#| msgid "ProcessMaker plugin is under maintenance, please retry later, thank you."
|
|
||||||
msgid "Process '%s' is under maintenance, please retry later, thank you."
|
msgid "Process '%s' is under maintenance, please retry later, thank you."
|
||||||
msgstr "Le processus '%s' est en maintenance, ré-essayez plus tard, merci."
|
msgstr "Le processus '%s' est en maintenance, ré-essayez plus tard, merci."
|
||||||
|
|
||||||
@@ -698,7 +718,8 @@ msgstr "Impossible de créer le cas : pas de droits pour cela !"
|
|||||||
|
|
||||||
#: inc/processmaker.class.php:1012
|
#: inc/processmaker.class.php:1012
|
||||||
msgid "Syncs GLPI users and groups into ProcessMaker."
|
msgid "Syncs GLPI users and groups into ProcessMaker."
|
||||||
msgstr "Synchronisation des utilisateurs GLPI et des groups avec ProcessMaker."
|
msgstr ""
|
||||||
|
"Synchronisation des utilisateurs GLPI et des groupes avec ProcessMaker."
|
||||||
|
|
||||||
#: inc/processmaker.class.php:1014
|
#: inc/processmaker.class.php:1014
|
||||||
msgid "Cleaning of orphan cases."
|
msgid "Cleaning of orphan cases."
|
||||||
@@ -712,26 +733,33 @@ msgstr "Nombre de jours avant nettoyage des cas orphelins"
|
|||||||
msgid "To apply task actions between cases."
|
msgid "To apply task actions between cases."
|
||||||
msgstr "Pour appliquer des actions de tâches entre cas."
|
msgstr "Pour appliquer des actions de tâches entre cas."
|
||||||
|
|
||||||
#: inc/processmaker.class.php:1720
|
#: inc/processmaker.class.php:1707
|
||||||
msgid "Case title: "
|
msgid "Case title: "
|
||||||
msgstr "Titre du cas : "
|
msgstr "Titre du cas : "
|
||||||
|
|
||||||
#: inc/processmaker.class.php:2275
|
#: inc/processmaker.class.php:2262
|
||||||
msgid "A 'Case' is running!"
|
msgid "A 'Case' is running!"
|
||||||
msgstr "Un 'Cas' est en cours !"
|
msgstr "Un 'Cas' est en cours !"
|
||||||
|
|
||||||
#: inc/processmaker.class.php:2276
|
#: inc/processmaker.class.php:2263
|
||||||
msgid "You must manage it first (see 'Process - Case' tab)!"
|
msgid "You must manage it first (see 'Process - Case' tab)!"
|
||||||
msgstr "Vous devez d'abord le terminer (voir onglet 'Processus - Cas') !"
|
msgstr "Vous devez d'abord le terminer (voir onglet 'Processus - Cas') !"
|
||||||
|
|
||||||
#: inc/processmaker.class.php:2774
|
#: inc/processmaker.class.php:2779
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "Unable to derivate case! Retry in a moment, or ask your administrator.<hr>Error code: %u<br/>Error message: %s<br/>"
|
msgid ""
|
||||||
msgstr "Impossible de dériver le cas ! Ré-essayez dans un moment, ou demandez à votre administrateur.<hr>Code d'erreur : %u<br/>Message d'erreur : %s<br/>"
|
"Unable to derivate case! Retry in a moment, or ask your administrator."
|
||||||
|
"<hr>Error code: %u<br/>Error message: %s<br/>"
|
||||||
|
msgstr ""
|
||||||
|
"Impossible de dériver le cas ! Ré-essayez dans un moment, ou demandez à "
|
||||||
|
"votre administrateur.<hr>Code d'erreur : %u<br/>Message d'erreur : %s<br/>"
|
||||||
|
|
||||||
#: inc/processmaker.class.php:3281
|
#: inc/processmaker.class.php:3283
|
||||||
msgid "ProcessMaker plugin is under maintenance, please retry later, thank you."
|
msgid ""
|
||||||
msgstr "Le plugin ProcessMaker est en maintenance, veuillez ré-essayer plus tard, merci."
|
"ProcessMaker plugin is under maintenance, please retry later, thank you."
|
||||||
|
msgstr ""
|
||||||
|
"Le plugin ProcessMaker est en maintenance, veuillez ré-essayer plus tard, "
|
||||||
|
"merci."
|
||||||
|
|
||||||
#: inc/profile.class.php:17
|
#: inc/profile.class.php:17
|
||||||
msgid "Process configuration"
|
msgid "Process configuration"
|
||||||
@@ -743,7 +771,7 @@ msgstr "Cas"
|
|||||||
|
|
||||||
#: inc/profile.class.php:23
|
#: inc/profile.class.php:23
|
||||||
msgid "Ad Hoc user re-assign"
|
msgid "Ad Hoc user re-assign"
|
||||||
msgstr "Ré-assignation d'un utilisateur Ad Hoc"
|
msgstr "Réattribution d'un utilisateur Ad Hoc"
|
||||||
|
|
||||||
#: inc/task.class.php:29
|
#: inc/task.class.php:29
|
||||||
msgid "Process case task"
|
msgid "Process case task"
|
||||||
@@ -756,47 +784,161 @@ msgid "Sub-case task(s)"
|
|||||||
msgstr "Tache(s) du sous-cas"
|
msgstr "Tache(s) du sous-cas"
|
||||||
|
|
||||||
#: inc/taskcategory.class.php:24 inc/taskcategory.class.php:116
|
#: inc/taskcategory.class.php:24 inc/taskcategory.class.php:116
|
||||||
#| msgid "Process case"
|
|
||||||
#| msgid_plural "Process cases"
|
|
||||||
msgid "Process task"
|
msgid "Process task"
|
||||||
msgstr "Tâche du processus"
|
msgstr "Tâche du processus"
|
||||||
|
|
||||||
#: inc/taskcategory.class.php:29
|
#: inc/taskcategory.class.php:29 inc/taskcategory.class.php:39
|
||||||
#| msgid "Task List"
|
|
||||||
msgid "Task list"
|
msgid "Task list"
|
||||||
msgstr "List des tâches"
|
msgstr "List des tâches"
|
||||||
|
|
||||||
#: inc/taskcategory.class.php:39
|
|
||||||
msgid "Task List"
|
|
||||||
msgstr "Liste des tâches"
|
|
||||||
|
|
||||||
#: inc/taskcategory.class.php:40 inc/taskcategory.class.php:118
|
#: inc/taskcategory.class.php:40 inc/taskcategory.class.php:118
|
||||||
msgid "Task name"
|
msgid "Task name"
|
||||||
msgstr "Nom de la Tâche"
|
msgstr "Nom de la tâche"
|
||||||
|
|
||||||
#: inc/taskcategory.class.php:42 inc/taskcategory.class.php:68
|
#: inc/taskcategory.class.php:42 inc/taskcategory.class.php:68
|
||||||
#: inc/taskcategory.class.php:121 inc/taskcategory.class.php:155
|
#: inc/taskcategory.class.php:121 inc/taskcategory.class.php:155
|
||||||
msgid "Start"
|
msgid "Start"
|
||||||
msgstr "Démarrer"
|
msgstr "Démarrer"
|
||||||
|
|
||||||
#: inc/taskcategory.class.php:43 inc/taskcategory.class.php:122
|
|
||||||
msgid "Task GUID"
|
|
||||||
msgstr "GUID de la Tâche"
|
|
||||||
|
|
||||||
#: inc/taskcategory.class.php:46 inc/taskcategory.class.php:86
|
#: inc/taskcategory.class.php:46 inc/taskcategory.class.php:86
|
||||||
#: inc/taskcategory.class.php:125 inc/taskcategory.class.php:173
|
#: inc/taskcategory.class.php:125 inc/taskcategory.class.php:173
|
||||||
msgid "Sub-process"
|
msgid "Sub-process"
|
||||||
msgstr "Sous-processus"
|
msgstr "Sous-processus"
|
||||||
|
|
||||||
#: inc/taskcategory.class.php:117
|
#: inc/taskcategory.class.php:117
|
||||||
#| msgid "Process case"
|
|
||||||
#| msgid_plural "Process cases"
|
|
||||||
msgid "Process name"
|
msgid "Process name"
|
||||||
msgstr "Nom du procesus"
|
msgstr "Nom du processus"
|
||||||
|
|
||||||
#~ msgid "Delete case"
|
#, fuzzy
|
||||||
|
#~| msgid "Delete case"
|
||||||
|
#~ msgid "Delete permanently"
|
||||||
#~ msgstr "Delete case"
|
#~ msgstr "Delete case"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "None!"
|
||||||
|
#~ msgid "None"
|
||||||
|
#~ msgstr "Aucun !"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Maintenance"
|
||||||
|
#~ msgid "Maintenance mode"
|
||||||
|
#~ msgstr "Maintenance"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Case id"
|
||||||
|
#~ msgid "Case URL"
|
||||||
|
#~ msgstr "ID du cas"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Task guid"
|
||||||
|
#~ msgid "Task add"
|
||||||
|
#~ msgstr "Guid de la tâche"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Task re-assigned!"
|
||||||
|
#~ msgid "Task re-assign"
|
||||||
|
#~ msgstr "Tâche réattribuée !"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Task un-claimed!"
|
||||||
|
#~ msgid "Task un-claim"
|
||||||
|
#~ msgstr "Annulation de l'attribution de la tâche effectuée !"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Task name"
|
||||||
|
#~ msgid "Task done"
|
||||||
|
#~ msgstr "Nom de la tâche"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Send reminder"
|
||||||
|
#~ msgid "Task reminder"
|
||||||
|
#~ msgstr "Envoyer un rappel"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Creation date"
|
||||||
|
#~ msgid "Opening date"
|
||||||
|
#~ msgstr "Date de création"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Case description"
|
||||||
|
#~ msgid "Description"
|
||||||
|
#~ msgstr "Description du cas"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Process category id"
|
||||||
|
#~ msgid "Category id"
|
||||||
|
#~ msgstr "ID de la catégorie du processus"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Process category comment"
|
||||||
|
#~ msgid "Category comment"
|
||||||
|
#~ msgstr "Commentaire de la catégorie du processus"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Task action"
|
||||||
|
#~ msgid "Total duration"
|
||||||
|
#~ msgstr "Action de la tâche"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Re-assign task"
|
||||||
|
#~ msgid "User assigned to task"
|
||||||
|
#~ msgstr "Réattribuer la tâche"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Case is linked to a %1s"
|
||||||
|
#~ msgid "User login assigned to task"
|
||||||
|
#~ msgstr "Le cas est lié à un %1s"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Re-assign task"
|
||||||
|
#~ msgid "Group assigned to task"
|
||||||
|
#~ msgstr "Réattribuer la tâche"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Start"
|
||||||
|
#~ msgid "Start date"
|
||||||
|
#~ msgstr "Démarrer"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Last update"
|
||||||
|
#~ msgid "Last updater"
|
||||||
|
#~ msgstr "Dernière mise à jour"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Task delegation date"
|
||||||
|
#~ msgid "Delegation index"
|
||||||
|
#~ msgstr "Date d'attribution de tâche"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Delete case"
|
||||||
|
#~ msgid "Delete"
|
||||||
|
#~ msgstr "Delete case"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgctxt "case_status"
|
||||||
|
#~| msgid "Completed"
|
||||||
|
#~ msgid "Complete name"
|
||||||
|
#~ msgstr "Terminé"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Re-assign"
|
||||||
|
#~ msgctxt "processmaker"
|
||||||
|
#~ msgid "Re-assign"
|
||||||
|
#~ msgstr "Réattribuer"
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
#~| msgid "Process case"
|
||||||
|
#~| msgid_plural "Process cases"
|
||||||
|
#~ msgctxt "processmaker"
|
||||||
|
#~ msgid "Process case"
|
||||||
|
#~ msgstr "Cas du processus"
|
||||||
|
|
||||||
|
#~ msgid "Task GUID"
|
||||||
|
#~ msgstr "Task GUID"
|
||||||
|
|
||||||
|
#~ msgid "Task List"
|
||||||
|
#~ msgstr "Task List"
|
||||||
|
|
||||||
#~ msgid "Case item"
|
#~ msgid "Case item"
|
||||||
#~ msgstr "Case item"
|
#~ msgstr "Case item"
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
BIN
pics/processmaker-mid.png
Normal file
BIN
pics/processmaker-mid.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
BIN
pics/processmaker-tiny.png
Normal file
BIN
pics/processmaker-tiny.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
BIN
pics/processmaker-xxs.png
Normal file
BIN
pics/processmaker-xxs.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 783 B |
BIN
pics/processmaker.png
Normal file
BIN
pics/processmaker.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.7 KiB |
@@ -29,17 +29,21 @@
|
|||||||
<compatibility>9.1</compatibility>
|
<compatibility>9.1</compatibility>
|
||||||
</version>
|
</version>
|
||||||
<version>
|
<version>
|
||||||
<num>3.4.26</num>
|
<num>3.4.30</num>
|
||||||
<compatibility>9.2</compatibility>
|
<compatibility>9.2</compatibility>
|
||||||
</version>
|
</version>
|
||||||
<version>
|
<version>
|
||||||
<num>3.5.11</num>
|
<num>3.5.15</num>
|
||||||
<compatibility>9.3</compatibility>
|
<compatibility>9.3</compatibility>
|
||||||
</version>
|
</version>
|
||||||
<version>
|
<version>
|
||||||
<num>3.6.17</num>
|
<num>3.6.21</num>
|
||||||
<compatibility>9.4</compatibility>
|
<compatibility>9.4</compatibility>
|
||||||
</version>
|
</version>
|
||||||
|
<version>
|
||||||
|
<num>4.0.0</num>
|
||||||
|
<compatibility>9.5</compatibility>
|
||||||
|
</version>
|
||||||
</versions>
|
</versions>
|
||||||
<langs>
|
<langs>
|
||||||
<lang>en_gb</lang>
|
<lang>en_gb</lang>
|
||||||
|
|||||||
27
setup.php
27
setup.php
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
define('PROCESSMAKER_VERSION', '3.6.17');
|
define('PROCESSMAKER_VERSION', '4.0.0');
|
||||||
|
|
||||||
// used for case cancellation
|
// used for case cancellation
|
||||||
define("CANCEL", 256);
|
define("CANCEL", 256);
|
||||||
@@ -13,6 +13,9 @@ function plugin_init_processmaker() {
|
|||||||
|
|
||||||
$PLUGIN_HOOKS['csrf_compliant']['processmaker'] = true;
|
$PLUGIN_HOOKS['csrf_compliant']['processmaker'] = true;
|
||||||
|
|
||||||
|
$plugin = new Plugin();
|
||||||
|
if ($plugin->isActivated('processmaker')) {
|
||||||
|
|
||||||
$objects = ['Ticket', 'Change', 'Problem'];
|
$objects = ['Ticket', 'Change', 'Problem'];
|
||||||
|
|
||||||
Plugin::registerClass('PluginProcessmakerProcessmaker');
|
Plugin::registerClass('PluginProcessmakerProcessmaker');
|
||||||
@@ -39,8 +42,8 @@ function plugin_init_processmaker() {
|
|||||||
|
|
||||||
$PLUGIN_HOOKS['pre_show_tab']['processmaker']
|
$PLUGIN_HOOKS['pre_show_tab']['processmaker']
|
||||||
= ['PluginProcessmakerProcessmaker', 'pre_show_tab_processmaker'];
|
= ['PluginProcessmakerProcessmaker', 'pre_show_tab_processmaker'];
|
||||||
$PLUGIN_HOOKS['post_show_tab']['processmaker']
|
//$PLUGIN_HOOKS['post_show_tab']['processmaker']
|
||||||
= ['PluginProcessmakerProcessmaker', 'post_show_tab_processmaker'];
|
// = ['PluginProcessmakerProcessmaker', 'post_show_tab_processmaker'];
|
||||||
|
|
||||||
// Display a menu entry ?
|
// Display a menu entry ?
|
||||||
if (Session::haveRightsOr('plugin_processmaker_config', [READ, UPDATE])) {
|
if (Session::haveRightsOr('plugin_processmaker_config', [READ, UPDATE])) {
|
||||||
@@ -122,6 +125,16 @@ function plugin_init_processmaker() {
|
|||||||
// otherwise post-only users can't see cases and then can't act on a case task.
|
// otherwise post-only users can't see cases and then can't act on a case task.
|
||||||
$PLUGIN_HOOKS['change_profile']['processmaker'] = 'plugin_processmaker_change_profile';
|
$PLUGIN_HOOKS['change_profile']['processmaker'] = 'plugin_processmaker_change_profile';
|
||||||
|
|
||||||
|
//if ($plugin->isActivated('processmaker')) {
|
||||||
|
|
||||||
|
// in order to manage the password encryption
|
||||||
|
$pmglpikey = new PluginProcessmakerGlpikey;
|
||||||
|
foreach ($pmglpikey->getFields() as $fld) {
|
||||||
|
$PLUGIN_HOOKS['secured_fields'][] = $fld;
|
||||||
|
}
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -135,8 +148,8 @@ function plugin_version_processmaker() {
|
|||||||
'homepage' => 'https://github.com/tomolimo/processmaker',
|
'homepage' => 'https://github.com/tomolimo/processmaker',
|
||||||
'requirements' => [
|
'requirements' => [
|
||||||
'glpi' => [
|
'glpi' => [
|
||||||
'min' => '9.4',
|
'min' => '9.5',
|
||||||
'max' => '9.5'
|
'max' => '9.6'
|
||||||
],
|
],
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
@@ -144,8 +157,8 @@ function plugin_version_processmaker() {
|
|||||||
|
|
||||||
// Optional : check prerequisites before install : may print errors or add to message after redirect
|
// Optional : check prerequisites before install : may print errors or add to message after redirect
|
||||||
function plugin_processmaker_check_prerequisites() {
|
function plugin_processmaker_check_prerequisites() {
|
||||||
if (version_compare(GLPI_VERSION, '9.4', 'lt') || version_compare(GLPI_VERSION, '9.5', 'ge')) {
|
if (version_compare(GLPI_VERSION, '9.5', 'lt') || version_compare(GLPI_VERSION, '9.6', 'ge')) {
|
||||||
echo "This plugin requires GLPI >= 9.4 and < 9.5";
|
echo "This plugin requires GLPI >= 9.5 and < 9.6";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user