3
0

Added adhoc users re-assign rights

Added possibility to assign a task to an adhoc user
Added task del_index tag to notification template
Added missing GLPI_ITEM_TASK_GROUP
Deleted extra-email sending
Fixed issue on users for re-assignment
Set version to 3.6.4
This commit is contained in:
tomolimo
2019-08-06 15:26:07 +02:00
parent e30ecf3a0b
commit fbd0239e4e
9 changed files with 67 additions and 34 deletions

View File

@@ -377,8 +377,8 @@ class PluginProcessmakerTask extends CommonITILTask
}
if (isset($currentUser)) {
if ($currentUser->userId && $task[$tabnum]['del_index']) {
// to load users for task re-assign only when task is not to be 'claimed' and if task is not a sub-case
if (/*$currentUser->userId &&*/ $task[$tabnum]['del_index']) {
// to load users for task re-assign only when task is not a sub-case
echo "<div class='tab_bg_2' id='divUsers-".$currentUser->delIndex."'><div class='loadingindicator'>".__('Loading...')."</div></div>";
echo "<script>$('#divUsers-{$task[$tabnum]['del_index']}').load( '".$CFG_GLPI["root_doc"]."/plugins/processmaker/ajax/task_users.php?cases_id="
@@ -392,7 +392,19 @@ class PluginProcessmakerTask extends CommonITILTask
."&taskGuid="
.$currentUser->taskId
."&delIndex={$task[$tabnum]['del_index']}&delThread={$currentUser->delThread}&rand=$rand' ); </script>";
} else {
//} else {
// // manages the claim
// // current task is to be claimed
// // get the assigned group to the item task
// $itemtask = $dbu->getItemForItemtype( $task[$tabnum]['itemtype'] );
// $itemtask->getFromDB( $task[$tabnum]['items_id'] );
// // check if this group can be found in the current user's groups
// if (!isset($_SESSION['glpigroups']) || !in_array( $itemtask->fields['groups_id_tech'], $_SESSION['glpigroups'] )) {
// $hide_claim_button=true;
// }
}
if (!$currentUser->userId || !$task[$tabnum]['del_index']) {
// manages the claim
// current task is to be claimed
// get the assigned group to the item task