diff --git a/hook.php b/hook.php index 922a66e..477982f 100644 --- a/hook.php +++ b/hook.php @@ -147,7 +147,7 @@ function plugin_processmaker_uninstall() { function plugin_processmaker_getAddSearchOptions($itemtype) { - + $sopt = array(); // TODO add Change and Problem + other fields to the search if ($itemtype == 'Ticket') { @@ -260,10 +260,13 @@ function plugin_pre_item_update_processmaker(CommonITILObject $parm) { */ function plugin_item_update_processmaker_satisfaction($parm) { - $locCase = new PluginProcessmakerCase; - if ($locCase->getFromItem( 'Ticket', $parm->fields['tickets_id'] )) { - // case is existing for this item - $locCase->sendVariables( ['GLPI_SATISFACTION_QUALITY' => $parm->fields['satisfaction']] ); + $cases = PluginProcessmakerCase::getIDsFromItem('Ticket', $parm->fields['tickets_id']); + foreach ($cases as $cases_id) { + $locCase = new PluginProcessmakerCase; + if ($locCase->getFromDB($cases_id)) { + // case is existing for this item + $locCase->sendVariables( ['GLPI_SATISFACTION_QUALITY' => $parm->fields['satisfaction']] ); + } } } @@ -299,60 +302,38 @@ function plugin_item_purge_processmaker($parm) { // We just deleted a tech from this ticket then we must if needed "de-assign" the tasks assigned to this tech // and re-assign them to the first tech in the list !!!! - $locCase = new PluginProcessmakerCase; + $itemType = strtolower(explode('_', $parm->getType())[0]); // $parm->getType() returns 'Ticket_User'; + $itemId = $parm->fields[$itemType.'s_id']; + $cases = PluginProcessmakerCase::getIDsFromItem($itemType, $itemId); + foreach ($cases as $cases_id) { + // cases are existing for this item + $locCase = new PluginProcessmakerCase; + if ($locCase->getFromDB($cases_id)) { + $technicians = PluginProcessmakerProcessmaker::getItemUsers($itemType, $itemId, CommonITILActor::ASSIGN); - $itemId = $parm->fields['tickets_id']; - $itemType = explode('_', $parm->getType())[0]; // 'Ticket'; + $locVars = array( 'GLPI_TICKET_TECHNICIAN_GLPI_ID' => $technicians[0]['glpi_id'], + 'GLPI_ITEM_TECHNICIAN_GLPI_ID' => $technicians[0]['glpi_id'], + 'GLPI_TICKET_TECHNICIAN_PM_ID' => $technicians[0]['pm_id'], + 'GLPI_ITEM_TECHNICIAN_PM_ID' => $technicians[0]['pm_id'] + ); - if ($locCase->getFromItem( $itemType, $itemId )) { - // case is existing for this item - $technicians = PluginProcessmakerProcessmaker::getItemUsers( $itemType, $itemId, CommonITILActor::ASSIGN ); // 2 for technicians - //$locPM = new PluginProcessmakerProcessmaker; - //$locPM->login(); - $locVars = array( 'GLPI_TICKET_TECHNICIAN_GLPI_ID' => $technicians[0]['glpi_id'], - 'GLPI_ITEM_TECHNICIAN_GLPI_ID' => $technicians[0]['glpi_id'], - 'GLPI_TICKET_TECHNICIAN_PM_ID' => $technicians[0]['pm_id'], - 'GLPI_ITEM_TECHNICIAN_PM_ID' => $technicians[0]['pm_id'] - ); - - // and we must find all tasks assigned to this former user and re-assigned them to new user (if any :))! - //$caseInfo = $locPM->getCaseInfo( $locCase->getID() ); - $caseInfo = $locCase->getCaseInfo( ); - if ($caseInfo !== false) { - //$locPM->sendVariables( $locCase->getID( ), $locVars ); - $locCase->sendVariables( $locVars); - // need to get info on the thread of the GLPI current user - // we must retreive currentGLPI user from this array - $GLPICurrentPMUserId = PluginProcessmakerUser::getPMUserId( $parm->fields['users_id'] ); - if (property_exists($caseInfo, 'currentUsers') && is_array( $caseInfo->currentUsers )) { - foreach ($caseInfo->currentUsers as $caseUser) { - if ($caseUser->userId == $GLPICurrentPMUserId && in_array( $caseUser->delThreadStatus, array('DRAFT', 'OPEN', 'PAUSE' ) )) { - - //$pmResponse = $locPM->reassignCase( $locCase->getID(), $caseUser->delIndex, $GLPICurrentPMUserId, $technicians[0]['pm_id'] ); - $locCase->reassignCase($caseUser->delIndex, $caseUser->taskId, $caseUser->delThread, $parm->fields['users_id'], $technicians[0]['pm_id'] ); - //// now should managed GLPI Tasks previously assigned to the $GLPICurrentPMUserId - //if ($pmResponse->status_code == 0) { - // // ATTENTION: should be aware of: ticket tech == task tech - // // In this particular flow due to 'Change Management' - - // // we need to change the delindex of the glpi task and the assigned tech to prevent creation of new tasks - // // we need the delindex of the current glpi task, and the delindex of the new one - // // search for new delindex - // $newCaseInfo = $locPM->getCaseInfo( $locCase->getID() ); - // $newDelIndex = 0; - // foreach ($newCaseInfo->currentUsers as $newCaseUser) { - // if ($newCaseUser->taskId == $caseUser->taskId && $newCaseUser->delThread == $caseUser->delThread) { - // $newDelIndex = $newCaseUser->delIndex; - // break; - // } - // } - // $locPM->reassignTask( $locCase->getID(), $caseUser->delIndex, $newDelIndex, $technicians[0]['glpi_id'] ); - //} + // and we must find all tasks assigned to this former user and re-assigned them to new user (if any :))! + $caseInfo = $locCase->getCaseInfo( ); + if ($caseInfo !== false) { + $locCase->sendVariables( $locVars); + // need to get info on the thread of the GLPI current user + // we must retreive currentGLPI user from this array + $GLPICurrentPMUserId = PluginProcessmakerUser::getPMUserId( $parm->fields['users_id'] ); + if (property_exists($caseInfo, 'currentUsers') && is_array( $caseInfo->currentUsers )) { + foreach ($caseInfo->currentUsers as $caseUser) { + if ($caseUser->userId == $GLPICurrentPMUserId && in_array( $caseUser->delThreadStatus, array('DRAFT', 'OPEN', 'PAUSE' ) )) { + $locCase->reassignCase($caseUser->delIndex, $caseUser->taskId, $caseUser->delThread, $parm->fields['users_id'], $technicians[0]['pm_id'] ); + } } } } - } + } } } } diff --git a/inc/case.class.php b/inc/case.class.php index 9dbbf93..1ebcf2e 100644 --- a/inc/case.class.php +++ b/inc/case.class.php @@ -74,7 +74,12 @@ class PluginProcessmakerCase extends CommonDBTM { function getTabNameForItem(CommonGLPI $item, $withtemplate=0) { if ($item->getType() == __CLASS__) { // get tab name for a case itself - return [ __CLASS__ => __('Case', 'processmaker')." ".self::getStatus($item->fields['case_status']).""]; + $tabname = __('Case', 'processmaker'); + if ($item->fields['plugin_processmaker_cases_id'] > 0) { + // case is a sub-case + $tabname = __('Sub-case', 'processmaker'); + } + return [ __CLASS__ => $tabname." ".self::getStatus($item->fields['case_status']).""]; } else { $items_id = $item->getID(); $itemtype = $item->getType(); @@ -135,9 +140,9 @@ class PluginProcessmakerCase extends CommonDBTM { * @param mixed $items_id is the item id * @return mixed: returns false when there is no case associated with the item, else fills in the item fields from DB, and returns true */ - function getFromItem($itemtype, $items_id) { - return $this->getFromDBByQuery(" WHERE items_id=$items_id and itemtype='$itemtype'"); - } + //function getFromItem($itemtype, $items_id) { + // return $this->getFromDBByQuery(" WHERE items_id=$items_id and itemtype='$itemtype'"); + //} /** @@ -265,7 +270,24 @@ class PluginProcessmakerCase extends CommonDBTM { * Summary of showCaseProperties */ function showCaseProperties() { - global $PM_DB; + global $DB, $PM_DB; + + // get all tasks that are OPEN for any sub-case of this case + $case_tasks = []; + $query = "SELECT `glpi_plugin_processmaker_tasks`.* FROM `glpi_plugin_processmaker_tasks` + WHERE `glpi_plugin_processmaker_tasks`.`plugin_processmaker_cases_id`={$this->getID()} AND `del_thread_status`='OPEN'"; + foreach($DB->request($query) as $task) { + $case_tasks[$task['del_index']] = $task; + } + + //// get all tasks that are OPEN for any sub-case of this case + //$sub_cases = []; + //$query = "SELECT `glpi_plugin_processmaker_tasks`.* FROM `glpi_plugin_processmaker_tasks` + // JOIN `glpi_plugin_processmaker_cases` on `glpi_plugin_processmaker_cases`.`id`=`glpi_plugin_processmaker_tasks`.`plugin_processmaker_cases_id` + // WHERE `glpi_plugin_processmaker_cases`.`plugin_processmaker_cases_id`={$this->getID()} AND `del_thread_status`='OPEN'"; + //foreach($DB->request($query) as $task) { + // $sub_cases[$task['plugin_processmaker_cases_id']][$task['del_index']] = $task; + //} $caseInfo = $this->getCaseInfo(); if (property_exists($caseInfo, 'currentUsers')) { @@ -278,43 +300,10 @@ class PluginProcessmakerCase extends CommonDBTM { } echo "

"; + // show the case properties like given by PM server + $this->showShort($caseInfo); - echo "
"; - echo ""; - - echo ""; - - echo ""; - echo ""; - - echo ""; - echo ""; - - echo ""; - echo ""; - - echo ""; - echo ""; - - echo ""; - echo ""; - - echo ""; - echo ""; - - echo ""; - echo ""; - - echo ""; - echo ""; - - //echo ""; - //echo ""; - - echo "
".__('Case properties', 'processmaker')."
".__('Process', 'processmaker')."".$caseInfo->processName."
".__('Case title', 'processmaker')."".$caseInfo->caseName."
".__('Case number', 'processmaker')."".$caseInfo->caseNumber."
".__('Case status', 'processmaker')."".self::getStatus($caseInfo->caseStatus)."
".__('Case guid', 'processmaker')."".$caseInfo->caseId."
".__('Creator', 'processmaker')."".$caseInfo->caseCreatorUserName."
".__('Creation date', 'processmaker')."".$caseInfo->createDate."
".__('Last update', 'processmaker')."".$caseInfo->updateDate."
".__('Case description', 'processmaker')."".$caseInfo->????."
"; - - echo "
"; - + // show current (running) tasks properties echo "

"; echo "
"; @@ -329,10 +318,24 @@ class PluginProcessmakerCase extends CommonDBTM { ".__('Current user', 'processmaker')." ".__('Task delegation date', 'processmaker')." "; - foreach($caseInfo->currentUsers as $currentTask) { + $case_url = $this->getLinkURL().'&forcetab=PluginProcessmakerTask$'; echo ""; - echo "".$currentTask->taskName.""; + if (isset($case_tasks[$currentTask->delIndex])) { + $case_url .= $case_tasks[$currentTask->delIndex]['id']; + echo "".$currentTask->taskName.""; + } else { + $res = $PM_DB->query("SELECT APP_UID FROM SUB_APPLICATION WHERE APP_PARENT='{$this->fields['case_guid']}' AND DEL_INDEX_PARENT={$currentTask->delIndex} AND SA_STATUS='ACTIVE'"); + if ($res && $PM_DB->numrows($res) == 1) { + $row = $PM_DB->fetch_assoc($res); + $sub_case = new PluginProcessmakerCase; + $sub_case->getFromGUID($row['APP_UID']); + $case_url .= $sub_case->getID()."-".$currentTask->delIndex; + echo "> ".$currentTask->taskName.""; + } else { + echo "".$currentTask->taskName.""; + } + } echo "".$currentTask->taskId.""; if ($currentTask->userName == '') { echo "".__('To be claimed', 'processmaker').""; @@ -350,9 +353,78 @@ class PluginProcessmakerCase extends CommonDBTM { echo "
"; + // show the parent case if it's a sub-case + if ($this->fields['plugin_processmaker_cases_id'] > 0) { + echo "

"; + $sub_case = new self; + $sub_case->getFromDB($this->fields['plugin_processmaker_cases_id']); + $sub_case->showShort($sub_case->getCaseInfo(), true); + } + + } + + /** + * Summary of showShort + * @param mixed $caseInfo + * @param mixed $showparenturl + */ + function showShort($caseInfo, $showparenturl=false) { + + echo "
"; + echo ""; + + if ($this->fields['plugin_processmaker_cases_id'] > 0) { + echo ""; + } else { + if ($showparenturl) { + echo ""; + } else { + echo ""; + } + } + + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + //echo ""; + echo ""; + + echo ""; + echo ""; + if ($showparenturl){ + echo ""; + } else { + echo ""; + } + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + //echo ""; + echo ""; + + echo "
".__('Sub-case properties', 'processmaker')."
".__('Parent case properties', 'processmaker')."
".__('Case properties', 'processmaker')."
".__('Process', 'processmaker')."".__('Case title', 'processmaker')."".__('Case number', 'processmaker')."".__('Case status', 'processmaker')."".__('Case guid', 'processmaker')."".__('Creator', 'processmaker')."".__('Creation date', 'processmaker')."".__('Last update', 'processmaker')."".__('Case description', 'processmaker')."
".$caseInfo->processName."".$this->getLink()."".$caseInfo->caseName."".$caseInfo->caseNumber."".self::getStatus($caseInfo->caseStatus)."".$caseInfo->caseId."".$caseInfo->caseCreatorUserName."".$caseInfo->createDate."".$caseInfo->updateDate."".$caseInfo->????."
"; + + echo "
"; + } + /** + * Summary of localSortTasks + * used to sort array of tasks in a currenUsers object + * @param mixed $a + * @param mixed $b + * @return integer + */ static private function localSortTasks ($a, $b) { return $a->delIndex - $b->delIndex; } @@ -404,7 +476,12 @@ class PluginProcessmakerCase extends CommonDBTM { $itemtype = $case->fields['itemtype']; - echo "".__('Case item', 'processmaker')." > ".$itemtype::getTypeName(1).""; + $maintitle = __('Case is linked to a %1s', 'processmaker'); + if ($case->fields['plugin_processmaker_cases_id'] > 0) { + $maintitle = __('Sub-case is linked to a %1s', 'processmaker'); + } + + echo "".sprintf($maintitle, $itemtype::getTypeName(1)).""; Ticket::commonListHeader(Search::HTML_OUTPUT); @@ -418,7 +495,7 @@ class PluginProcessmakerCase extends CommonDBTM { if ($case->fields['plugin_processmaker_cases_id'] == 0 && self::canCancel() && $case->fields['case_status'] == self::TO_DO) { // it's a main case, not a sub-case - // and we have the rightr to cancel cases + // and we have the rights to cancel cases // show a form to be able to cancel the case $rand = rand(); @@ -507,7 +584,7 @@ class PluginProcessmakerCase extends CommonDBTM { $columns = array('pname' => __('Process', 'processmaker'), 'name' => __('Title', 'processmaker'), 'status' => __('Status', 'processmaker'), - 'sub' => __('Subcase of', 'processmaker') + 'sub' => __('Sub-case of', 'processmaker') ); // check if item is not solved nor closed @@ -527,7 +604,19 @@ class PluginProcessmakerCase extends CommonDBTM { echo ""; _e('Select the process you want to add', 'processmaker'); echo ""; - PluginProcessmakerProcess::dropdown(array( 'value' => 0, 'entity' => $item->fields['entities_id'], 'name' => 'plugin_processmaker_processes_id', 'condition' => "is_active=1")); + if ($itemtype == 'Ticket') { + $is_itemtype = "AND is_incident=1"; + if ($item->fields['type'] == Ticket::DEMAND_TYPE) { + $is_itemtype = "AND is_request=1"; + } + } else { + $is_itemtype = "AND is_".strtolower($itemtype)."=1"; + } + PluginProcessmakerProcess::dropdown(['value' => 0, + 'entity' => $item->fields['entities_id'], + 'name' => 'plugin_processmaker_processes_id', + 'condition' => "is_active=1 $is_itemtype" + ]); echo ""; echo ""; echo ""; @@ -723,17 +812,22 @@ class PluginProcessmakerCase extends CommonDBTM { * Summary of canSolve * To know if a Ticket (Problem or Change) can be solved * i.e. the case permits solving of item - * @param mixed $item is the item + * @param mixed $param is an array containing the item * @return bool true to permit solve, false otherwise */ - public static function canSolve ($item) { - $myCase = new self; - if ($myCase->getFromItem( $item['item']->getType(), $item['item']->getID() )) { - $pmVar = $myCase->getVariables(['GLPI_ITEM_CAN_BE_SOLVED']); - // TODO also manage sub-cases - if ($myCase->fields['case_status'] != self::COMPLETED && $myCase->fields['case_status'] != self::CANCELLED && (!isset($pmVar['GLPI_ITEM_CAN_BE_SOLVED']) || $pmVar['GLPI_ITEM_CAN_BE_SOLVED'] != 1)) { - // then item can't be solved - return false; + public static function canSolve ($param) { + $item = $param['item']; + $cases = self::getIDsFromItem($item->getType(), $item->getID()); + foreach ($cases as $cases_id) { + $myCase = new self; + if ($myCase->getFromDB($cases_id)) { + $pmVar = $myCase->getVariables(['GLPI_ITEM_CAN_BE_SOLVED']); + if ($myCase->fields['case_status'] != self::COMPLETED + && $myCase->fields['case_status'] != self::CANCELLED + && (!isset($pmVar['GLPI_ITEM_CAN_BE_SOLVED']) || $pmVar['GLPI_ITEM_CAN_BE_SOLVED'] != 1)) { + // then item can't be solved + return false; + } } } return true; @@ -741,16 +835,18 @@ class PluginProcessmakerCase extends CommonDBTM { /** * Summary of getToDoTasks - * @param mixed $parm is a Ticket, a Problem or a Change + * @param mixed $item is a Ticket, a Problem or a Change * @return array list of tasks with status 'to do' for case associated with item */ - public static function getToDoTasks($parm) { - $myCase = new self; + public static function getToDoTasks($item) { + $ret = []; - if ($myCase->getFromItem( $parm->getType(), $parm->getID() )) { - return PluginProcessmakerTask::getToDoTasks( $myCase->getID(), $parm->getType()."Task" ); + $cases = self::getIDsFromItem($item->getType(), $item->getID()); + foreach ($cases as $cases_id) { + $ret = array_merge($ret, PluginProcessmakerTask::getToDoTasks($cases_id, $item->getType()."Task")); } - return array(); + + return $ret; } @@ -971,7 +1067,7 @@ class PluginProcessmakerCase extends CommonDBTM { $tab[14]['table'] = self::getTable(); $tab[14]['field'] = 'plugin_processmaker_cases_id'; - $tab[14]['name'] = __('Subcase of', 'processmaker'); + $tab[14]['name'] = __('Sub-case of', 'processmaker'); $tab[14]['datatype'] = 'itemlink'; $tab[14]['massiveaction'] = false; diff --git a/inc/process.class.php b/inc/process.class.php index e4122a5..977ad65 100644 --- a/inc/process.class.php +++ b/inc/process.class.php @@ -430,13 +430,13 @@ class PluginProcessmakerProcess extends CommonDBTM { $tab[11]['table'] = 'glpi_plugin_processmaker_processes'; $tab[11]['field'] = 'project_type'; - $tab[11]['name'] = __('Project type', 'processmaker'); + $tab[11]['name'] = __('Process type', 'processmaker'); $tab[11]['massiveaction'] = false; $tab[11]['datatype'] = 'specific'; $tab[12]['table'] = 'glpi_plugin_processmaker_processes'; $tab[12]['field'] = 'hide_case_num_title'; - $tab[12]['name'] = __('Hide case number and title', 'processmaker'); + $tab[12]['name'] = __('Hide case num. & title', 'processmaker'); $tab[12]['massiveaction'] = true; $tab[12]['datatype'] = 'bool'; @@ -459,6 +459,30 @@ class PluginProcessmakerProcess extends CommonDBTM { $tab[15]['datatype'] = 'specific'; $tab[15]['massiveaction'] = false; + $tab[16]['table'] = 'glpi_plugin_processmaker_processes'; + $tab[16]['field'] = 'is_incident'; + $tab[16]['name'] = __('Visible in Incident for Central interface', 'processmaker'); + $tab[16]['massiveaction'] = true; + $tab[16]['datatype'] = 'bool'; + + $tab[17]['table'] = 'glpi_plugin_processmaker_processes'; + $tab[17]['field'] = 'is_request'; + $tab[17]['name'] = __('Visible in Request for Central interface', 'processmaker'); + $tab[17]['massiveaction'] = true; + $tab[17]['datatype'] = 'bool'; + + $tab[18]['table'] = 'glpi_plugin_processmaker_processes'; + $tab[18]['field'] = 'is_change'; + $tab[18]['name'] = __('Visible in Change', 'processmaker'); + $tab[18]['massiveaction'] = true; + $tab[18]['datatype'] = 'bool'; + + $tab[19]['table'] = 'glpi_plugin_processmaker_processes'; + $tab[19]['field'] = 'is_problem'; + $tab[19]['name'] = __('Visible in Problem', 'processmaker'); + $tab[19]['massiveaction'] = true; + $tab[19]['datatype'] = 'bool'; + return $tab; } @@ -501,7 +525,7 @@ class PluginProcessmakerProcess extends CommonDBTM { /** * Summary of getProcessTypeName - * @param mixed $value + * @param mixed $value * @return mixed */ static function getProcessTypeName($value) { @@ -582,25 +606,17 @@ class PluginProcessmakerProcess extends CommonDBTM { echo ""; echo ""; - echo "".__('Ticket type (self-service)', 'processmaker').""; - if (true) { // $canupdate || !$ID - $idticketcategorysearch = mt_rand(); $opt = array('value' => $this->fields["type"]); - $rand = Ticket::dropdownType('type', $opt, array(), array('toupdate' => "search_".$idticketcategorysearch )); - $opt = array('value' => $this->fields["type"]); - $params = array('type' => '__VALUE__', - //'entity_restrict' => -1, //$this->fields['entities_id'], - 'value' => $this->fields['itilcategories_id'], - 'currenttype' => $this->fields['type']); + echo "".__('Visible in Incident for Central interface', 'processmaker').""; + Dropdown::showYesNo("is_incident", $this->fields["is_incident"]); + echo ""; - 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 ""; + echo ""; + echo "".__('Visible in Request for Central interface', 'processmaker').""; + Dropdown::showYesNo("is_request", $this->fields["is_request"]); + echo ""; - echo "".__('ITIL Category (self-service)', 'processmaker').""; + echo ""; + echo "".__('ITIL Category for Self-service interface (left empty to disable)', 'processmaker').""; if (true) { // $canupdate || !$ID || $canupdate_descr $opt = array('value' => $this->fields["itilcategories_id"]); @@ -626,17 +642,40 @@ class PluginProcessmakerProcess extends CommonDBTM { } else { echo Dropdown::getDropdownName("glpi_itilcategories", $this->fields["itilcategories_id"]); } + + echo "".__('Type for Self-service interface', 'processmaker').""; + if (true) { // $canupdate || !$ID + $idticketcategorysearch = mt_rand(); $opt = array('value' => $this->fields["type"]); + $rand = Ticket::dropdownType('type', $opt, array(), array('toupdate' => "search_".$idticketcategorysearch )); + $opt = array('value' => $this->fields["type"]); + $params = array('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 ""; + echo ""; + + echo ""; + echo "".__('Visible in Change', 'processmaker').""; + Dropdown::showYesNo("is_change", $this->fields["is_change"]); echo ""; echo ""; - echo "".__('Project type (to be changed if not up-to-date)', 'processmaker').""; - Dropdown::showFromArray( 'project_type', self::getAllTypeArray(), array( 'value' => $this->fields["project_type"] ) ); + echo "".__('Visible in Problem', 'processmaker').""; + Dropdown::showYesNo("is_problem", $this->fields["is_problem"]); echo ""; - //echo ""; - //echo "".__("Last update").""; - //echo Html::convDateTime($this->fields["date_mod"]); - //echo ""; + echo ""; + echo "".__('Process type (to be changed only if not up-to-date)', 'processmaker').""; + Dropdown::showFromArray( 'project_type', self::getAllTypeArray(), array( 'value' => $this->fields["project_type"] ) ); + echo ""; $this->showFormButtons($options); } @@ -658,7 +697,9 @@ class PluginProcessmakerProcess extends CommonDBTM { $orderby = ''; - $where = ' WHERE glpi_plugin_processmaker_processes.is_active=1 '; + if (isset($_REQUEST['condition']) && isset($_SESSION['glpicondition'][$_REQUEST['condition']])) { + $where = ' WHERE '.$_SESSION['glpicondition'][$_REQUEST['condition']]; //glpi_plugin_processmaker_processes.is_active=1 '; + } if ($count) { $fields = " COUNT(DISTINCT glpi_plugin_processmaker_processes.id) AS cpt "; diff --git a/inc/processmaker.class.php b/inc/processmaker.class.php index 6ffbe4c..1dccf8c 100644 --- a/inc/processmaker.class.php +++ b/inc/processmaker.class.php @@ -2163,7 +2163,7 @@ class PluginProcessmakerProcessmaker extends CommonDBTM { case 'Ticket': case 'Problem': case 'Change': - if ($params['options']['id']) { + if ($params['options']['id'] && $params['options']['itemtype'] == $itemtype) { // then we are in an ITIL Object if (isset($_SESSION['glpiactiveprofile']['interface']) && $_SESSION['glpiactiveprofile']['interface'] != "helpdesk") { $tabnum = $params['options']['tabnum']; @@ -2173,8 +2173,8 @@ class PluginProcessmakerProcessmaker extends CommonDBTM { // 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 - if (!($plugin->isInstalled('arbehaviours') && $plugin->isActivated('arbehaviours'))) { + // 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 @@ -2213,8 +2213,8 @@ class PluginProcessmakerProcessmaker extends CommonDBTM { $pmHideSolution = true; $itemtype = strtolower($itemtype); if ($tabnum == 1 && isset($_SESSION['glpiactiveprofile'][$itemtype.'_status'])) { - // don't display message if arbehaviours is install - if (!($plugin->isInstalled('arbehaviours') && $plugin->isActivated('arbehaviours'))) { + // don't display message if arbehaviours is install and activated + if (!$plugin->isInstalled('arbehaviours') || !$plugin->isActivated('arbehaviours')) { self::displayMessage($message, '', WARNING); //save current $_SESSION['glpiactiveprofile'][$itemtype.'_status''] diff --git a/inc/task.class.php b/inc/task.class.php index 7cecddf..2e6fbfe 100644 --- a/inc/task.class.php +++ b/inc/task.class.php @@ -16,6 +16,10 @@ class PluginProcessmakerTask extends CommonITILTask $this->itemtype=$itemtype; } + + const OPEN = 'OPEN'; + const CLOSED = 'CLOSED'; + /** * Name of the type * @@ -66,11 +70,14 @@ class PluginProcessmakerTask extends CommonITILTask global $DB; $ret = array(); $selfTable = getTableForItemType( __CLASS__); - $itemTypeTaskTable = getTableForItemType( $itemtype ); + //$itemTypeTaskTable = getTableForItemType( $itemtype ); - $query = "SELECT glpi_tickettasks.id as taskID from $itemTypeTaskTable - INNER JOIN $selfTable on $selfTable.items_id=$itemTypeTaskTable.id - WHERE $itemTypeTaskTable.state=1 and $selfTable.plugin_processmaker_cases_id='$case_id';"; + $query = "SELECT `$selfTable``items_id` as taskID from $selfTable + WHERE `$selfTable`.`del_thread_status` = '".self::OPEN."' AND `$selfTable`.`plugin_processmaker_cases_id` = '$case_id';"; + + //$query = "SELECT $itemTypeTaskTable.id as taskID from $itemTypeTaskTable + // INNER JOIN $selfTable on $selfTable.items_id=$itemTypeTaskTable.id + // WHERE $itemTypeTaskTable.state=1 and $selfTable.plugin_processmaker_cases_id='$case_id';"; foreach ($DB->request($query) as $row) { $ret[$row['taskID']]=$row['taskID']; } @@ -129,7 +136,7 @@ class PluginProcessmakerTask extends CommonITILTask function getTabNameForItem(CommonGLPI $case, $withtemplate = 0){ - global $DB; + global $DB, $PM_DB; $tab = []; @@ -146,18 +153,19 @@ class PluginProcessmakerTask extends CommonITILTask $tasks[$task['del_index']] = $task; } - // get all tasks that are OPEN for any sub-case of this case - $sub_tasks = []; - $query = "SELECT `glpi_plugin_processmaker_tasks`.* FROM `glpi_plugin_processmaker_tasks` - JOIN `glpi_plugin_processmaker_cases` on `glpi_plugin_processmaker_cases`.`id`=`glpi_plugin_processmaker_tasks`.`plugin_processmaker_cases_id` - WHERE `glpi_plugin_processmaker_cases`.`plugin_processmaker_cases_id`={$case->fields['id']} AND `del_thread_status`='OPEN'"; - foreach($DB->request($query) as $task) { - $sub_tasks[$task['plugin_processmaker_cases_id']][$task['del_index']] = $task; - } + //// get all tasks that are OPEN for any sub-case of this case + //$sub_cases = []; + //$query = "SELECT `glpi_plugin_processmaker_tasks`.* FROM `glpi_plugin_processmaker_tasks` + // JOIN `glpi_plugin_processmaker_cases` on `glpi_plugin_processmaker_cases`.`id`=`glpi_plugin_processmaker_tasks`.`plugin_processmaker_cases_id` + // WHERE `glpi_plugin_processmaker_cases`.`plugin_processmaker_cases_id`={$case->fields['id']} AND `del_thread_status`='OPEN'"; + //foreach($DB->request($query) as $task) { + // $sub_cases[$task['plugin_processmaker_cases_id']][$task['del_index']] = $task; + //} $caseInfo->currentUsers = $case->sortTasks($caseInfo->currentUsers, $GLPICurrentPMUserId); - foreach ($caseInfo->currentUsers as $key => $caseUser) { + $main_tasks = []; //will contains the tasks that are main-processes + foreach ($caseInfo->currentUsers as $caseUser) { $title = $caseUser->taskName; if (isset($tasks[$caseUser->delIndex])) { $hide_claim_button = false; @@ -170,17 +178,45 @@ class PluginProcessmakerTask extends CommonITILTask } } $tab[$tasks[$caseUser->delIndex]['id']] = ($caseUser->userId != '' && $caseUser->userId != $GLPICurrentPMUserId) || $hide_claim_button ? "$title" : $title; + } else { + $main_tasks[$caseUser->delIndex] = $caseUser; } } + + foreach ($main_tasks as $task) { + $res = $PM_DB->query("SELECT APP_UID FROM SUB_APPLICATION WHERE APP_PARENT='{$case->fields['case_guid']}' AND DEL_INDEX_PARENT={$task->delIndex} AND SA_STATUS='ACTIVE'"); + if ($res && $PM_DB->numrows($res) == 1) { + $row = $PM_DB->fetch_assoc($res); + $loc_case = new PluginProcessmakerCase; + $loc_case->getFromGUID($row['APP_UID']); + $tab[$loc_case->getID()."-".$task->delIndex] = "> ".$task->taskName.""; + } + } + //$sub_case = new PluginProcessmakerCase; + //foreach ($sub_cases as $sub_cases_id => $sub_tasks) { + // $sub_case->getFromDB($sub_cases_id); + // $sub_case_info = $sub_case->getCaseInfo(); + // $sub_case_info->currentUsers = $sub_case->sortTasks($sub_case_info->currentUsers, $GLPICurrentPMUserId); + // foreach ($sub_case_info->currentUsers as $caseUser) { + // $title = $caseUser->taskName; + // if (isset($sub_tasks[$caseUser->delIndex])) { + // $hide_claim_button = false; + // if ($caseUser->userId == '') { // task to be claimed + // $itemtask = getItemForItemtype($sub_tasks[$caseUser->delIndex]['itemtype']); + // $itemtask->getFromDB($sub_tasks[$caseUser->delIndex]['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; + // } + // } + // $tab["$sub_cases_id-".$sub_tasks[$caseUser->delIndex]['id']] = ($caseUser->userId != '' && $caseUser->userId != $GLPICurrentPMUserId) || $hide_claim_button ? "> $title" : "> $title"; + // } + // } + //} + } - //// TODO manage of sub-tasks. - //foreach ($sub_tasks as $scases_id => $scase) { - // foreach ( - //} - - - return $tab; + return $tab; } @@ -192,7 +228,67 @@ class PluginProcessmakerTask extends CommonITILTask * @param mixed $withtemplate */ static function displayTabContentForItem(CommonGLPI $case, $tabnum=1, $withtemplate=0) { - global $CFG_GLPI, $PM_SOAP; + global $CFG_GLPI, $PM_SOAP, $DB, $PM_DB; + + // check if we are going to view a sub-task, then redirect to sub-case itself + if (preg_match('/^(?\'cases_id\'\d+)-(\d+)$/', $tabnum, $matches)) { + // Show sub-task list + + // get all tasks that are OPEN for any sub-case of this case + $sub_tasks = []; + $query = "SELECT `glpi_plugin_processmaker_tasks`.* FROM `glpi_plugin_processmaker_tasks` + WHERE `glpi_plugin_processmaker_tasks`.`plugin_processmaker_cases_id`={$matches['cases_id']} AND `del_thread_status`='OPEN'"; + foreach($DB->request($query) as $task) { + $sub_tasks[$task['plugin_processmaker_cases_id']][$task['del_index']] = $task; + } + $sub_case = new PluginProcessmakerCase; + $sub_case->getFromDB($matches['cases_id']); + $sub_case_url = $sub_case->getLinkURL().'&forcetab=PluginProcessmakerTask$'; + + $query = "SELECT `DEL_INDEX`, `DEL_DELEGATE_DATE` FROM `APP_DELEGATION` WHERE `APP_UID`='{$sub_case->fields['case_guid']}'"; + $sub_tasks_pm = []; + foreach($PM_DB->request($query) as $row){ + $sub_tasks_pm[$row['DEL_INDEX']] = $row['DEL_DELEGATE_DATE']; + } + + $sub_case_info = $sub_case->getCaseInfo(); + echo "
"; + echo ""; + + echo ""; + + if (property_exists($sub_case_info, 'currentUsers') && count($sub_case_info->currentUsers) > 0) { + + echo " + + + + + "; + + foreach($sub_case_info->currentUsers as $currentTask) { + echo ""; + $sub_case_url .= $sub_tasks[$matches['cases_id']][$currentTask->delIndex]['id']; + echo ""; + echo ""; + if ($currentTask->userName == '') { + echo ""; + } else { + echo ""; + } + echo ""; + echo ""; + } + } else { + echo ""; + } + + echo "
".__('Sub-case task(s)', 'processmaker')."
".__('Task', 'processmaker')."".__('Task guid', 'processmaker')."".__('Current user', 'processmaker')."".__('Task delegation date', 'processmaker')."
".$currentTask->taskName."".$currentTask->taskId."".__('To be claimed', 'processmaker')."".$currentTask->userName."".$sub_tasks_pm[$currentTask->delIndex]."
".__('None')."
"; + + echo "
"; + + return; + } $hide_claim_button = false; $config = $PM_SOAP->config; @@ -201,8 +297,6 @@ class PluginProcessmakerTask extends CommonITILTask // get infos for the current task $task = getAllDatasFromTable('glpi_plugin_processmaker_tasks', "id = $tabnum"); - // TODO manage sub-tasks - // shows the re-assign form $caseInfo = $case->getCaseInfo(); $currentUser = null; diff --git a/install/mysql/3.3.1-empty.sql b/install/mysql/3.3.1-empty.sql new file mode 100644 index 0000000..cb7d897 --- /dev/null +++ b/install/mysql/3.3.1-empty.sql @@ -0,0 +1,186 @@ +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET NAMES utf8 */; +/*!50503 SET NAMES utf8mb4 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; + +-- Dumping structure for table glpi.glpi_plugin_processmaker_caselinkactions +CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_caselinkactions` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `plugin_processmaker_caselinks_id` int(11) DEFAULT NULL, + `name` varchar(255) NOT NULL, + `value` text, + PRIMARY KEY (`id`), + UNIQUE KEY `caselinks_id_name` (`plugin_processmaker_caselinks_id`,`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + + +-- Dumping structure for table glpi.glpi_plugin_processmaker_caselinks +CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_caselinks` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `is_active` tinyint(1) NOT NULL DEFAULT '0', + `is_externaldata` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0:insert data from case,1:wait for external application to set datas', + `is_self` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0:use linked tickets, 1:use self', + `sourcetask_guid` varchar(32) DEFAULT NULL, + `targettask_guid` varchar(32) DEFAULT NULL, + `targetprocess_guid` varchar(32) DEFAULT NULL, + `targetdynaform_guid` varchar(32) DEFAULT NULL, + `sourcecondition` text, + `is_targettoclaim` tinyint(1) NOT NULL DEFAULT '0', + `is_targettoreassign` TINYINT(1) NOT NULL DEFAULT '0', + `is_targettoimpersonate` TINYINT(1) NOT NULL DEFAULT '0', + `externalapplication` TEXT NULL, + `is_synchronous` TINYINT(1) NOT NULL DEFAULT '0', + `date_mod` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `is_active` (`is_active`), + KEY `is_externaldata` (`is_externaldata`), + KEY `is_self` (`is_self`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + + +-- Dumping structure for table glpi.glpi_plugin_processmaker_cases +CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_cases` ( + `id` INT(11) NOT NULL, + `itemtype` VARCHAR(10) NOT NULL DEFAULT 'Ticket', + `items_id` INT(11) NOT NULL, + `entities_id` INT(11) NOT NULL DEFAULT '0', + `name` MEDIUMTEXT NOT NULL DEFAULT '', + `case_guid` VARCHAR(32) NOT NULL, + `case_status` VARCHAR(20) NOT NULL DEFAULT 'DRAFT', + `plugin_processmaker_processes_id` INT(11) NULL DEFAULT NULL, + `plugin_processmaker_cases_id` INT(11) NULL DEFAULT NULL, + INDEX `items` (`itemtype`, `items_id`), + INDEX `case_status` (`case_status`), + PRIMARY KEY (`id`), + UNIQUE INDEX `case_guid` (`case_guid`), + INDEX `plugin_processmaker_processes_id` (`plugin_processmaker_processes_id`), + INDEX `plugin_processmaker_cases_id` (`plugin_processmaker_cases_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + + +-- Dumping structure for table glpi.glpi_plugin_processmaker_configs +CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_configs` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(50) NOT NULL DEFAULT 'ProcessMaker', + `pm_server_URL` varchar(250) NOT NULL DEFAULT 'http://localhost/', + `pm_workspace` varchar(50) NOT NULL DEFAULT 'workflow', + `pm_admin_user` varchar(255) DEFAULT NULL, + `pm_admin_passwd` varchar(255) DEFAULT NULL, + `pm_theme` varchar(50) NOT NULL DEFAULT 'glpi_classic', + `date_mod` timestamp NULL DEFAULT NULL, + `taskcategories_id` int(11) DEFAULT NULL, + `users_id` int(11) DEFAULT NULL, + `pm_group_guid` varchar(32) DEFAULT NULL, + `comment` text, + `pm_dbserver_name` varchar(255) DEFAULT 'localhost', + `pm_dbname` varchar(50) DEFAULT 'wf_workflow', + `pm_dbserver_user` varchar(255) DEFAULT NULL, + `pm_dbserver_passwd` varchar(255) DEFAULT NULL, + `domain` varchar(50) DEFAULT '', + `maintenance` tinyint(1) NOT NULL DEFAULT '0', + `db_version` varchar(10) NOT NULL DEFAULT '3.3.0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + + +-- Dumping structure for table glpi.glpi_plugin_processmaker_crontaskactions +CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_crontaskactions` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `plugin_processmaker_caselinks_id` int(11) DEFAULT NULL, + `plugin_processmaker_cases_id` int(11) DEFAULT '0', + `users_id` int(11) NOT NULL DEFAULT '0', + `is_targettoclaim` tinyint(1) NOT NULL DEFAULT '0', + `postdata` mediumtext, + `logs_out` mediumtext, + `state` int(11) NOT NULL, + `date_mod` timestamp NULL DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + + +-- Dumping structure for table glpi.glpi_plugin_processmaker_processes +CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_processes` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `process_guid` varchar(32) NOT NULL, + `name` varchar(255) NOT NULL, + `is_active` tinyint(1) NOT NULL DEFAULT '0', + `hide_case_num_title` tinyint(1) NOT NULL DEFAULT '0', + `insert_task_comment` tinyint(1) NOT NULL DEFAULT '0', + `comment` text, + `taskcategories_id` int(11) DEFAULT NULL, + `itilcategories_id` int(11) NOT NULL DEFAULT '0', + `type` int(11) NOT NULL DEFAULT '1' COMMENT 'Only used for self-service Tickets', + `date_mod` timestamp NULL DEFAULT NULL, + `project_type` varchar(50) NOT NULL DEFAULT 'classic', + `is_change` tinyint(1) NOT NULL DEFAULT '0', + `is_problem` tinyint(1) NOT NULL DEFAULT '0', + `is_incident` tinyint(1) NOT NULL DEFAULT '0', + `is_request` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `process_guid` (`process_guid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + + +-- Dumping structure for table glpi.glpi_plugin_processmaker_processes_profiles +CREATE TABLE `glpi_plugin_processmaker_processes_profiles` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `plugin_processmaker_processes_id` int(11) NOT NULL, + `profiles_id` int(11) NOT NULL, + `entities_id` int(11) NOT NULL, + `is_recursive` tinyint(1) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE INDEX `plugin_processmaker_processes_id_profiles_id_entities_id` (`plugin_processmaker_processes_id`, `profiles_id`, `entities_id`), + KEY `entities_id` (`entities_id`), + KEY `profiles_id` (`profiles_id`), + KEY `plugin_processmaker_processes_id` (`plugin_processmaker_processes_id`), + KEY `is_recursive` (`is_recursive`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 ; + + +-- Dumping structure for table glpi.glpi_plugin_processmaker_taskcategories +CREATE TABLE `glpi_plugin_processmaker_taskcategories` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `plugin_processmaker_processes_id` INT(11) NOT NULL, + `pm_task_guid` VARCHAR(32) NOT NULL, + `taskcategories_id` INT(11) NOT NULL, + `is_start` TINYINT(1) NOT NULL DEFAULT '0', + `is_active` TINYINT(1) NOT NULL DEFAULT '1', + `is_subprocess` TINYINT(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE INDEX `pm_task_guid` (`pm_task_guid`), + UNIQUE INDEX `items` (`taskcategories_id`), + INDEX `plugin_processmaker_processes_id` (`plugin_processmaker_processes_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + + +-- Dumping structure for table glpi.glpi_plugin_processmaker_tasks +CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_tasks` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `items_id` int(11) NOT NULL, + `itemtype` varchar(32) NOT NULL, + `plugin_processmaker_cases_id` int(11) NOT NULL, + `plugin_processmaker_taskcategories_id` int(11) NOT NULL, + `del_index` int(11) NOT NULL, + `del_thread` INT(11) NOT NULL, + `del_thread_status` varchar(32) NOT NULL DEFAULT 'OPEN', + PRIMARY KEY (`id`), + UNIQUE KEY `tasks` (`plugin_processmaker_cases_id`,`del_index`), + UNIQUE KEY `items` (`itemtype`,`items_id`), + KEY `del_thread_status` (`del_thread_status`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + + +-- Dumping structure for table glpi.glpi_plugin_processmaker_users +CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_users` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `pm_users_id` varchar(32) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `pm_users_id` (`pm_users_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + + +/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */; +/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; diff --git a/install/update.php b/install/update.php index 8361bc1..a5a22bf 100644 --- a/install/update.php +++ b/install/update.php @@ -28,6 +28,11 @@ function processmaker_update(){ // will upgrade 3.2.9 to 3.3.0 include_once(GLPI_ROOT."/plugins/processmaker/install/update_3_2_9_to_3_3_0.php"); $new_version = update_3_2_9_to_3_3_0(); + + case '3.3.0' : + // will upgrade 3.3.0 to 3.3.1 + include_once(GLPI_ROOT."/plugins/processmaker/install/update_3_3_0_to_3_3_1.php"); + $new_version = update_3_3_0_to_3_3_1(); } // end update by updating the db version number diff --git a/install/update_3_3_0_to_3_3_1.php b/install/update_3_3_0_to_3_3_1.php new file mode 100644 index 0000000..ce81ea5 --- /dev/null +++ b/install/update_3_3_0_to_3_3_1.php @@ -0,0 +1,31 @@ +query($query) or die("error adding is_change, etc... to glpi_plugin_processmaker_processes table" . $DB->error()); + + } + + // Alter table glpi_plugin_processmaker_caselinks + if (!arFieldExists("glpi_plugin_processmaker_caselinks", "is_targettoreassign" )) { + $query = "ALTER TABLE `glpi_plugin_processmaker_caselinks` + ADD COLUMN `is_targettoreassign` TINYINT(1) NOT NULL DEFAULT '0' AFTER `is_targettoclaim`, + ADD COLUMN `is_targettoimpersonate` TINYINT(1) NOT NULL DEFAULT '0' AFTER `is_targettoreassign`, + ADD COLUMN `is_synchronous` TINYINT(1) NOT NULL DEFAULT '0' AFTER `externalapplication`;"; + + $DB->query($query) or die("error adding is_targettoreassign, etc... to glpi_plugin_processmaker_caselinks table" . $DB->error()); + + } + + + return '3.3.1'; +} diff --git a/locales/cs_CZ.mo b/locales/cs_CZ.mo index 3deb747..92cf1ab 100644 Binary files a/locales/cs_CZ.mo and b/locales/cs_CZ.mo differ diff --git a/locales/cs_CZ.po b/locales/cs_CZ.po index 77c5861..ac47e53 100644 --- a/locales/cs_CZ.po +++ b/locales/cs_CZ.po @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: processmaker-plugin\n" -"POT-Creation-Date: 2018-08-02 14:42+0200\n" -"PO-Revision-Date: 2018-08-03 09:43+0200\n" +"POT-Creation-Date: 2018-08-06 14:32+0200\n" +"PO-Revision-Date: 2018-08-06 14:43+0200\n" "Last-Translator: tomolimo\n" "Language-Team: Czech\n" "Language: cs_CZ\n" @@ -49,24 +49,17 @@ msgstr "Případ byl zrušen!" msgid "Unable to cancel case!" msgstr "Případ se nedaří zrušit!" -#: front/case.form.php:76 front/case.form.php:78 inc/case.class.php:922 +#: front/case.form.php:76 front/case.form.php:78 inc/case.class.php:1018 msgid "Process cases" msgstr "Případy procesu" #: front/case.php:5 front/caselink.form.php:27 front/caselink.php:5 #: front/process.form.php:25 front/process.php:5 inc/caselink.class.php:143 -#: inc/config.class.php:50 inc/config.class.php:347 inc/process.class.php:393 +#: inc/config.class.php:50 inc/config.class.php:354 inc/process.class.php:393 #: inc/profile.class.php:52 inc/profile.class.php:83 msgid "ProcessMaker" msgstr "ProcessMaker" -#: front/case.php:14 inc/case.class.php:644 -msgid "" -"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." - #: front/processmaker.form.php:85 msgid "Task re-assigned!" msgstr "Úkol předán!" @@ -83,7 +76,7 @@ msgstr "Úkol už je této osobě přiřazen!" msgid "Process - Case" msgstr "Proces – případ" -#: front/processmaker.helpdesk.form.php:24 inc/case.class.php:528 +#: front/processmaker.helpdesk.form.php:24 inc/case.class.php:605 msgid "Select the process you want to add" msgstr "Vyberte proces který chcete přidat" @@ -95,11 +88,11 @@ msgstr "Synchronizovat seznam úkolů" msgid "Case" msgstr "Případ" -#: hook.php:158 inc/case.class.php:509 inc/case.class.php:966 +#: hook.php:158 inc/case.class.php:586 inc/case.class.php:1062 msgid "Status" msgstr "Stav" -#: inc/case.class.php:23 inc/case.class.php:85 inc/case.class.php:87 +#: inc/case.class.php:23 inc/case.class.php:90 inc/case.class.php:92 msgid "Process case" msgid_plural "Process cases" msgstr[0] "Případ procesu" @@ -107,136 +100,154 @@ msgstr[1] "Případy procesu" msgstr[2] "Případy procesu" msgstr[3] "Případy procesu" -#: inc/case.class.php:285 -msgid "Case properties" -msgstr "Vlastnosti případu" +#: inc/case.class.php:80 +msgid "Sub-case" +msgstr "" -#: inc/case.class.php:287 inc/case.class.php:507 inc/case.class.php:940 -#: inc/process.class.php:524 -msgid "Process" -msgstr "Proces" - -#: inc/case.class.php:290 -msgid "Case title" -msgstr "Název případu" - -#: inc/case.class.php:293 -msgid "Case number" -msgstr "Číslo případu" - -#: inc/case.class.php:296 -msgid "Case status" -msgstr "Stav případu" - -#: inc/case.class.php:299 -msgid "Case guid" -msgstr "Nikde se neopakující identif. případu" - -#: inc/case.class.php:302 -msgid "Creator" -msgstr "Vytvořil" - -#: inc/case.class.php:305 -msgid "Creation date" -msgstr "Datum vytvoření" - -#: inc/case.class.php:308 -msgid "Last update" -msgstr "Poslední úprava" - -#: inc/case.class.php:323 +#: inc/case.class.php:312 msgid "Current task(s) properties" msgstr "Vlastnosti stávajícího úkolu" -#: inc/case.class.php:327 +#: inc/case.class.php:316 inc/task.class.php:263 msgid "Task" msgstr "Úkol" -#: inc/case.class.php:328 +#: inc/case.class.php:317 inc/task.class.php:264 msgid "Task guid" msgstr "Nikde se neopakující identif. úkolu" -#: inc/case.class.php:329 +#: inc/case.class.php:318 inc/task.class.php:265 msgid "Current user" msgstr "Stávající uživatel" -#: inc/case.class.php:330 +#: inc/case.class.php:319 inc/task.class.php:266 msgid "Task delegation date" msgstr "Datum delegování úkolu" -#: inc/case.class.php:338 +#: inc/case.class.php:341 inc/task.class.php:275 msgid "To be claimed" msgstr "Chcete-li uplatnit" -#: inc/case.class.php:407 -msgid "Case item" -msgstr "Položka případu" +#: inc/case.class.php:377 +msgid "Sub-case properties" +msgstr "" -#: inc/case.class.php:429 +#: inc/case.class.php:380 +msgid "Parent case properties" +msgstr "" + +#: inc/case.class.php:382 +msgid "Case properties" +msgstr "Vlastnosti případu" + +#: inc/case.class.php:387 inc/case.class.php:584 inc/case.class.php:1036 +#: inc/process.class.php:548 +msgid "Process" +msgstr "Proces" + +#: inc/case.class.php:388 +msgid "Case title" +msgstr "Název případu" + +#: inc/case.class.php:389 +msgid "Case number" +msgstr "Číslo případu" + +#: inc/case.class.php:390 +msgid "Case status" +msgstr "Stav případu" + +#: inc/case.class.php:391 +msgid "Case guid" +msgstr "Nikde se neopakující identif. případu" + +#: inc/case.class.php:392 +msgid "Creator" +msgstr "Vytvořil" + +#: inc/case.class.php:393 +msgid "Creation date" +msgstr "Datum vytvoření" + +#: inc/case.class.php:394 +msgid "Last update" +msgstr "Poslední úprava" + +#: inc/case.class.php:479 +#, php-format +msgid "Case is linked to a %1s" +msgstr "" + +#: inc/case.class.php:481 +#, php-format +msgid "Sub-case is linked to a %1s" +msgstr "" + +#: inc/case.class.php:506 msgid "Case cancellation" msgstr "Zrušení případu" -#: inc/case.class.php:430 +#: inc/case.class.php:507 msgid "Cancel case" msgstr "Zrušit případ" -#: inc/case.class.php:434 +#: inc/case.class.php:511 msgid "Confirm cancellation?" msgstr "Potvrdit zrušení?" -#: inc/case.class.php:434 inc/profile.class.php:23 +#: inc/case.class.php:511 inc/profile.class.php:23 msgid "Cancel" msgstr "Storno" -#: inc/case.class.php:455 +#: inc/case.class.php:532 msgid "Case deletion" msgstr "Mazání případu" -#: inc/case.class.php:456 +#: inc/case.class.php:533 msgid "Delete case" msgstr "Smazat případ" -#: inc/case.class.php:508 inc/case.class.php:933 +#: inc/case.class.php:585 inc/case.class.php:1029 msgid "Title" msgstr "Titulek" -#: inc/case.class.php:510 inc/case.class.php:974 -msgid "Subcase of" -msgstr "Dílčí případ z" +#: inc/case.class.php:587 inc/case.class.php:1070 +msgid "Sub-case of" +msgstr "" -#: inc/case.class.php:525 +#: inc/case.class.php:602 msgid "Add a new case" msgstr "Přidat nový případ" -#: inc/case.class.php:899 +#: inc/case.class.php:995 msgctxt "case_status" msgid "Draft" msgstr "Koncept" -#: inc/case.class.php:900 +#: inc/case.class.php:996 msgctxt "case_status" msgid "To do" msgstr "Dodělat" -#: inc/case.class.php:901 +#: inc/case.class.php:997 msgctxt "case_status" msgid "Completed" msgstr "Dokončeno" -#: inc/case.class.php:902 +#: inc/case.class.php:998 msgctxt "case_status" msgid "Cancelled" msgstr "Zrušeno" -#: inc/case.class.php:926 +#: inc/case.class.php:1022 msgid "ID" msgstr "Identif." -#: inc/case.class.php:953 +#: inc/case.class.php:1049 msgid "Item" msgstr "Položka" -#: inc/case.class.php:960 +#: inc/case.class.php:1056 msgid "Item entity" msgstr "Entita položky" @@ -304,111 +315,111 @@ msgstr "Mapa" msgid "ProcessMaker setup" msgstr "Nastavení ProcessMaker" -#: inc/config.class.php:156 +#: inc/config.class.php:159 msgid "Server URL (must be in same domain than GLPI)" msgstr "URL adresa serveru (je třeba, aby byla ze stejné domény jako GLPI)" -#: inc/config.class.php:161 +#: inc/config.class.php:164 msgid "Common domain with GLPI" msgstr "Společná doména s GLPI" -#: inc/config.class.php:190 +#: inc/config.class.php:193 msgid "None!" msgstr "Žádná!" -#: inc/config.class.php:199 +#: inc/config.class.php:202 msgid "Workspace Name" msgstr "Název pracovního prostoru" -#: inc/config.class.php:204 +#: inc/config.class.php:207 msgid "Server administrator name" msgstr "Uživatelské jméno správce serveru" -#: inc/config.class.php:209 +#: inc/config.class.php:212 msgid "Server administrator password" msgstr "Heslo správce serveru" -#: inc/config.class.php:215 inc/config.class.php:255 +#: inc/config.class.php:218 inc/config.class.php:258 msgid "Connection status" msgstr "Stav spojení" -#: inc/config.class.php:231 +#: inc/config.class.php:234 msgid "SQL server setup" msgstr "Nastavení SQL serveru" -#: inc/config.class.php:234 +#: inc/config.class.php:237 msgid "SQL server (MariaDB or MySQL)" msgstr "SQL server (MariaDB nebo MySQL)" -#: inc/config.class.php:239 +#: inc/config.class.php:242 msgid "Database name" msgstr "Název databáze" -#: inc/config.class.php:244 +#: inc/config.class.php:247 msgid "SQL user" msgstr "SQL uživatel" -#: inc/config.class.php:249 +#: inc/config.class.php:252 msgid "SQL password" msgstr "SQL heslo" -#: inc/config.class.php:266 +#: inc/config.class.php:269 msgid "Theme Name" msgstr "Název motivu vzhledu" -#: inc/config.class.php:272 +#: inc/config.class.php:275 msgid "Main Task Category (edit to change name)" msgstr "Hlavní kategorie úkolu (pro změnu názvu upravte)" -#: inc/config.class.php:279 +#: inc/config.class.php:282 msgid "Task Writer (edit to change name)" msgstr "Úkol zapsal (pro změnu jména upravte)" -#: inc/config.class.php:299 +#: inc/config.class.php:302 msgid "Group in ProcessMaker which will contain all GLPI users" msgstr "Skupina v ProcessMaker která bude obsahovat všechny uživatele z GLPI" -#: inc/config.class.php:323 +#: inc/config.class.php:331 msgid "Processmaker system information" msgstr "Systémové informace o Processmaker" -#: inc/config.class.php:327 inc/config.class.php:337 +#: inc/config.class.php:334 inc/config.class.php:344 msgid "Version" msgstr "Verze" -#: inc/config.class.php:328 +#: inc/config.class.php:335 msgid "Web server" msgstr "Webový server" -#: inc/config.class.php:329 +#: inc/config.class.php:336 msgid "Server name" msgstr "Název serveru" -#: inc/config.class.php:330 +#: inc/config.class.php:337 msgid "PHP version" msgstr "Verze PHP" -#: inc/config.class.php:331 +#: inc/config.class.php:338 msgid "DB version" msgstr "Verze databáze" -#: inc/config.class.php:332 +#: inc/config.class.php:339 msgid "DB server IP" msgstr "IP adresa webového serveru" -#: inc/config.class.php:333 +#: inc/config.class.php:340 msgid "DB name" msgstr "Název databáze" -#: inc/config.class.php:334 +#: inc/config.class.php:341 msgid "User browser" msgstr "Prohlížeč uživatele" -#: inc/config.class.php:335 +#: inc/config.class.php:342 msgid "User IP" msgstr "IP adresa uživatele" -#: inc/config.class.php:337 +#: inc/config.class.php:344 msgid "Not yet!" msgstr "Ještě ne!" @@ -416,55 +427,75 @@ msgstr "Ještě ne!" msgid "Synchronize Process List" msgstr "Synchronizovat seznam procesů" -#: inc/process.class.php:427 inc/process.class.php:565 +#: inc/process.class.php:427 inc/process.class.php:589 msgid "Process GUID" msgstr "Nikde se neopakující identif. procesu" #: inc/process.class.php:433 -msgid "Project type" -msgstr "Typ projektu" +msgid "Process type" +msgstr "" #: inc/process.class.php:439 -msgid "Hide case number and title" -msgstr "Skrýt číslo a titulek případu" +msgid "Hide case num. & title" +msgstr "" #: inc/process.class.php:445 msgid "Insert Task Category" msgstr "Vložit kategorii úkolu" -#: inc/process.class.php:457 inc/process.class.php:585 +#: inc/process.class.php:457 msgid "Ticket type (self-service)" msgstr "Typ požadavku (samoobslužné)" -#: inc/process.class.php:495 +#: inc/process.class.php:464 inc/process.class.php:609 +msgid "Visible in Incident for Central interface" +msgstr "" + +#: inc/process.class.php:470 inc/process.class.php:614 +msgid "Visible in Request for Central interface" +msgstr "" + +#: inc/process.class.php:476 inc/process.class.php:666 +msgid "Visible in Change" +msgstr "" + +#: inc/process.class.php:482 inc/process.class.php:671 +msgid "Visible in Problem" +msgstr "" + +#: inc/process.class.php:519 msgctxt "process_type" msgid "Classic" msgstr "Klasický" -#: inc/process.class.php:496 +#: inc/process.class.php:520 msgctxt "process_type" msgid "BPMN" msgstr "BPMN" -#: inc/process.class.php:522 +#: inc/process.class.php:546 msgid "Processes" msgstr "Procesy" -#: inc/process.class.php:575 +#: inc/process.class.php:599 msgid "Hide case number and title in task descriptions" msgstr "V popisech úkolů skrýt číslo a titulek případu" -#: inc/process.class.php:580 +#: inc/process.class.php:604 msgid "Insert Task Category comments in Task Description" msgstr "Vložit komentáře kategorie úkolu do jeho popisu" -#: inc/process.class.php:603 -msgid "ITIL Category (self-service)" -msgstr "ITIL kategorie (samoobslužné)" +#: inc/process.class.php:619 +msgid "ITIL Category for Self-service interface (left empty to disable)" +msgstr "" -#: inc/process.class.php:632 -msgid "Project type (to be changed if not up-to-date)" -msgstr "Typ projektu (pokud není aktuální, bude změněno)" +#: inc/process.class.php:646 +msgid "Type for Self-service interface" +msgstr "" + +#: inc/process.class.php:676 +msgid "Process type (to be changed only if not up-to-date)" +msgstr "" #: inc/process_profile.class.php:26 inc/process_profile.class.php:45 msgid "Authorizations" @@ -512,6 +543,13 @@ msgstr "„Případ“ je v běhu!" msgid "You must manage it first (see 'Process - Case' tab)!" msgstr "Nejprve je třeba toto spravovat (viz panel „Proces – případ“)!" +#: inc/processmaker.class.php:3038 +msgid "" +"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." + #: inc/profile.class.php:17 msgid "Process configuration" msgstr "Nastavení procesu" @@ -520,7 +558,7 @@ msgstr "Nastavení procesu" msgid "Cases" msgstr "Případy" -#: inc/task.class.php:25 +#: inc/task.class.php:29 msgid "Process case task" msgid_plural "Process case tasks" msgstr[0] "Zpracovat úkoly případu" @@ -528,6 +566,10 @@ msgstr[1] "Process case tasks" msgstr[2] "Process case tasks" msgstr[3] "Process case tasks" +#: inc/task.class.php:258 +msgid "Sub-case task(s)" +msgstr "" + #: inc/taskcategory.class.php:21 inc/taskcategory.class.php:31 msgid "Task List" msgstr "Seznam úkolů" @@ -548,5 +590,23 @@ msgstr "Nikde se neopakující identif. úkolu" msgid "Sub-process" msgstr "Dílčí proces" +#~ msgid "Case item" +#~ msgstr "Case item" + +#~ msgid "Subcase of" +#~ msgstr "Subcase of" + +#~ msgid "Project type" +#~ msgstr "Project type" + +#~ msgid "Hide case number and title" +#~ msgstr "Hide case number and title" + +#~ msgid "ITIL Category (self-service)" +#~ msgstr "ITIL Category (self-service)" + +#~ msgid "Project type (to be changed if not up-to-date)" +#~ msgstr "Project type (to be changed if not up-to-date)" + #~ msgid "Plugin is under maintenance, please retry later, thank you." #~ msgstr "Plugin is under maintenance, please retry later, thank you." diff --git a/locales/en_GB.mo b/locales/en_GB.mo index 495c2b2..3ded28a 100644 Binary files a/locales/en_GB.mo and b/locales/en_GB.mo differ diff --git a/locales/en_GB.po b/locales/en_GB.po index d5e1b31..d4ecfa0 100644 --- a/locales/en_GB.po +++ b/locales/en_GB.po @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: processmaker-plugin\n" -"POT-Creation-Date: 2018-08-02 14:42+0200\n" -"PO-Revision-Date: 2018-08-03 09:44+0200\n" +"POT-Creation-Date: 2018-08-06 14:32+0200\n" +"PO-Revision-Date: 2018-08-06 14:43+0200\n" "Last-Translator: tomolimo\n" "Language-Team: English, United Kingdom\n" "Language: en_GB\n" @@ -49,23 +49,17 @@ msgstr "Case has been cancelled!" msgid "Unable to cancel case!" msgstr "Unable to cancel case!" -#: front/case.form.php:76 front/case.form.php:78 inc/case.class.php:922 +#: front/case.form.php:76 front/case.form.php:78 inc/case.class.php:1018 msgid "Process cases" msgstr "Process cases" #: front/case.php:5 front/caselink.form.php:27 front/caselink.php:5 #: front/process.form.php:25 front/process.php:5 inc/caselink.class.php:143 -#: inc/config.class.php:50 inc/config.class.php:347 inc/process.class.php:393 +#: inc/config.class.php:50 inc/config.class.php:354 inc/process.class.php:393 #: inc/profile.class.php:52 inc/profile.class.php:83 msgid "ProcessMaker" msgstr "ProcessMaker" -#: front/case.php:14 inc/case.class.php:644 -msgid "" -"ProcessMaker plugin is under maintenance, please retry later, thank you." -msgstr "" -"ProcessMaker plugin is under maintenance, please retry later, thank you." - #: front/processmaker.form.php:85 msgid "Task re-assigned!" msgstr "Task re-assigned!" @@ -82,7 +76,7 @@ msgstr "Task already assigned to this person!" msgid "Process - Case" msgstr "Process - Case" -#: front/processmaker.helpdesk.form.php:24 inc/case.class.php:528 +#: front/processmaker.helpdesk.form.php:24 inc/case.class.php:605 msgid "Select the process you want to add" msgstr "Select the process you want to add" @@ -94,146 +88,164 @@ msgstr "Synchronize Task List" msgid "Case" msgstr "Case" -#: hook.php:158 inc/case.class.php:509 inc/case.class.php:966 +#: hook.php:158 inc/case.class.php:586 inc/case.class.php:1062 msgid "Status" msgstr "Status" -#: inc/case.class.php:23 inc/case.class.php:85 inc/case.class.php:87 +#: inc/case.class.php:23 inc/case.class.php:90 inc/case.class.php:92 msgid "Process case" msgid_plural "Process cases" msgstr[0] "Process case" msgstr[1] "Process cases" -#: inc/case.class.php:285 -msgid "Case properties" -msgstr "Case properties" +#: inc/case.class.php:80 +msgid "Sub-case" +msgstr "Sub-case" -#: inc/case.class.php:287 inc/case.class.php:507 inc/case.class.php:940 -#: inc/process.class.php:524 -msgid "Process" -msgstr "Process" - -#: inc/case.class.php:290 -msgid "Case title" -msgstr "Case title" - -#: inc/case.class.php:293 -msgid "Case number" -msgstr "Case number" - -#: inc/case.class.php:296 -msgid "Case status" -msgstr "Case status" - -#: inc/case.class.php:299 -msgid "Case guid" -msgstr "Case guid" - -#: inc/case.class.php:302 -msgid "Creator" -msgstr "Creator" - -#: inc/case.class.php:305 -msgid "Creation date" -msgstr "Creation date" - -#: inc/case.class.php:308 -msgid "Last update" -msgstr "Last update" - -#: inc/case.class.php:323 +#: inc/case.class.php:312 msgid "Current task(s) properties" msgstr "Current task properties" -#: inc/case.class.php:327 +#: inc/case.class.php:316 inc/task.class.php:263 msgid "Task" msgstr "Task" -#: inc/case.class.php:328 +#: inc/case.class.php:317 inc/task.class.php:264 msgid "Task guid" msgstr "Task guid" -#: inc/case.class.php:329 +#: inc/case.class.php:318 inc/task.class.php:265 msgid "Current user" msgstr "Current user" -#: inc/case.class.php:330 +#: inc/case.class.php:319 inc/task.class.php:266 msgid "Task delegation date" msgstr "Task delegation date" -#: inc/case.class.php:338 +#: inc/case.class.php:341 inc/task.class.php:275 msgid "To be claimed" msgstr "To be claimed" -#: inc/case.class.php:407 -msgid "Case item" -msgstr "Case item" +#: inc/case.class.php:377 +msgid "Sub-case properties" +msgstr "Sub-case properties" -#: inc/case.class.php:429 +#: inc/case.class.php:380 +msgid "Parent case properties" +msgstr "Parent case properties" + +#: inc/case.class.php:382 +msgid "Case properties" +msgstr "Case properties" + +#: inc/case.class.php:387 inc/case.class.php:584 inc/case.class.php:1036 +#: inc/process.class.php:548 +msgid "Process" +msgstr "Process" + +#: inc/case.class.php:388 +msgid "Case title" +msgstr "Case title" + +#: inc/case.class.php:389 +msgid "Case number" +msgstr "Case number" + +#: inc/case.class.php:390 +msgid "Case status" +msgstr "Case status" + +#: inc/case.class.php:391 +msgid "Case guid" +msgstr "Case guid" + +#: inc/case.class.php:392 +msgid "Creator" +msgstr "Creator" + +#: inc/case.class.php:393 +msgid "Creation date" +msgstr "Creation date" + +#: inc/case.class.php:394 +msgid "Last update" +msgstr "Last update" + +#: inc/case.class.php:479 +#, php-format +msgid "Case is linked to a %1s" +msgstr "Case is linked to a %1s" + +#: inc/case.class.php:481 +#, php-format +msgid "Sub-case is linked to a %1s" +msgstr "Sub-case is linked to a %1s" + +#: inc/case.class.php:506 msgid "Case cancellation" msgstr "Case cancellation" -#: inc/case.class.php:430 +#: inc/case.class.php:507 msgid "Cancel case" msgstr "Cancel case" -#: inc/case.class.php:434 +#: inc/case.class.php:511 msgid "Confirm cancellation?" msgstr "Confirm cancellation?" -#: inc/case.class.php:434 inc/profile.class.php:23 +#: inc/case.class.php:511 inc/profile.class.php:23 msgid "Cancel" msgstr "Cancel" -#: inc/case.class.php:455 +#: inc/case.class.php:532 msgid "Case deletion" msgstr "Case deletion" -#: inc/case.class.php:456 +#: inc/case.class.php:533 msgid "Delete case" msgstr "Delete case" -#: inc/case.class.php:508 inc/case.class.php:933 +#: inc/case.class.php:585 inc/case.class.php:1029 msgid "Title" msgstr "Title" -#: inc/case.class.php:510 inc/case.class.php:974 -msgid "Subcase of" -msgstr "Subcase of" +#: inc/case.class.php:587 inc/case.class.php:1070 +msgid "Sub-case of" +msgstr "Sub-case of" -#: inc/case.class.php:525 +#: inc/case.class.php:602 msgid "Add a new case" msgstr "Add a new case" -#: inc/case.class.php:899 +#: inc/case.class.php:995 msgctxt "case_status" msgid "Draft" msgstr "Draft" -#: inc/case.class.php:900 +#: inc/case.class.php:996 msgctxt "case_status" msgid "To do" msgstr "To do" -#: inc/case.class.php:901 +#: inc/case.class.php:997 msgctxt "case_status" msgid "Completed" msgstr "Completed" -#: inc/case.class.php:902 +#: inc/case.class.php:998 msgctxt "case_status" msgid "Cancelled" msgstr "Cancelled" -#: inc/case.class.php:926 +#: inc/case.class.php:1022 msgid "ID" msgstr "ID" -#: inc/case.class.php:953 +#: inc/case.class.php:1049 msgid "Item" msgstr "Item" -#: inc/case.class.php:960 +#: inc/case.class.php:1056 msgid "Item entity" msgstr "Item entity" @@ -301,111 +313,111 @@ msgstr "Map" msgid "ProcessMaker setup" msgstr "ProcessMaker setup" -#: inc/config.class.php:156 +#: inc/config.class.php:159 msgid "Server URL (must be in same domain than GLPI)" msgstr "Server URL (must be in same domain than GLPI)" -#: inc/config.class.php:161 +#: inc/config.class.php:164 msgid "Common domain with GLPI" msgstr "Common domain with GLPI" -#: inc/config.class.php:190 +#: inc/config.class.php:193 msgid "None!" msgstr "None!" -#: inc/config.class.php:199 +#: inc/config.class.php:202 msgid "Workspace Name" msgstr "Workspace Name" -#: inc/config.class.php:204 +#: inc/config.class.php:207 msgid "Server administrator name" msgstr "Server administrator name" -#: inc/config.class.php:209 +#: inc/config.class.php:212 msgid "Server administrator password" msgstr "Server administrator password" -#: inc/config.class.php:215 inc/config.class.php:255 +#: inc/config.class.php:218 inc/config.class.php:258 msgid "Connection status" msgstr "Connection status" -#: inc/config.class.php:231 +#: inc/config.class.php:234 msgid "SQL server setup" msgstr "SQL server setup" -#: inc/config.class.php:234 +#: inc/config.class.php:237 msgid "SQL server (MariaDB or MySQL)" msgstr "SQL server (MariaDB or MySQL)" -#: inc/config.class.php:239 +#: inc/config.class.php:242 msgid "Database name" msgstr "Database name" -#: inc/config.class.php:244 +#: inc/config.class.php:247 msgid "SQL user" msgstr "SQL user" -#: inc/config.class.php:249 +#: inc/config.class.php:252 msgid "SQL password" msgstr "SQL password" -#: inc/config.class.php:266 +#: inc/config.class.php:269 msgid "Theme Name" msgstr "Theme Name" -#: inc/config.class.php:272 +#: inc/config.class.php:275 msgid "Main Task Category (edit to change name)" msgstr "Main Task Category (edit to change name)" -#: inc/config.class.php:279 +#: inc/config.class.php:282 msgid "Task Writer (edit to change name)" msgstr "Task Writer (edit to change name)" -#: inc/config.class.php:299 +#: inc/config.class.php:302 msgid "Group in ProcessMaker which will contain all GLPI users" msgstr "Group in ProcessMaker which will contain all GLPI users" -#: inc/config.class.php:323 +#: inc/config.class.php:331 msgid "Processmaker system information" msgstr "Processmaker system information" -#: inc/config.class.php:327 inc/config.class.php:337 +#: inc/config.class.php:334 inc/config.class.php:344 msgid "Version" msgstr "Version" -#: inc/config.class.php:328 +#: inc/config.class.php:335 msgid "Web server" msgstr "Web server" -#: inc/config.class.php:329 +#: inc/config.class.php:336 msgid "Server name" msgstr "Server name" -#: inc/config.class.php:330 +#: inc/config.class.php:337 msgid "PHP version" msgstr "PHP version" -#: inc/config.class.php:331 +#: inc/config.class.php:338 msgid "DB version" msgstr "DB version" -#: inc/config.class.php:332 +#: inc/config.class.php:339 msgid "DB server IP" msgstr "DB server IP" -#: inc/config.class.php:333 +#: inc/config.class.php:340 msgid "DB name" msgstr "DB name" -#: inc/config.class.php:334 +#: inc/config.class.php:341 msgid "User browser" msgstr "User browser" -#: inc/config.class.php:335 +#: inc/config.class.php:342 msgid "User IP" msgstr "User IP" -#: inc/config.class.php:337 +#: inc/config.class.php:344 msgid "Not yet!" msgstr "Not yet!" @@ -413,55 +425,75 @@ msgstr "Not yet!" msgid "Synchronize Process List" msgstr "Synchronize Process List" -#: inc/process.class.php:427 inc/process.class.php:565 +#: inc/process.class.php:427 inc/process.class.php:589 msgid "Process GUID" msgstr "Process GUID" #: inc/process.class.php:433 -msgid "Project type" -msgstr "Project type" +msgid "Process type" +msgstr "Process type" #: inc/process.class.php:439 -msgid "Hide case number and title" -msgstr "Hide case number and title" +msgid "Hide case num. & title" +msgstr "Hide case num. & title" #: inc/process.class.php:445 msgid "Insert Task Category" msgstr "Insert Task Category" -#: inc/process.class.php:457 inc/process.class.php:585 +#: inc/process.class.php:457 msgid "Ticket type (self-service)" msgstr "Ticket type (self-service)" -#: inc/process.class.php:495 +#: inc/process.class.php:464 inc/process.class.php:609 +msgid "Visible in Incident for Central interface" +msgstr "Visible in Incident for Central interface" + +#: inc/process.class.php:470 inc/process.class.php:614 +msgid "Visible in Request for Central interface" +msgstr "Visible in Request for Central interface" + +#: inc/process.class.php:476 inc/process.class.php:666 +msgid "Visible in Change" +msgstr "Visible in Change" + +#: inc/process.class.php:482 inc/process.class.php:671 +msgid "Visible in Problem" +msgstr "Visible in Problem" + +#: inc/process.class.php:519 msgctxt "process_type" msgid "Classic" msgstr "Classic" -#: inc/process.class.php:496 +#: inc/process.class.php:520 msgctxt "process_type" msgid "BPMN" msgstr "BPMN" -#: inc/process.class.php:522 +#: inc/process.class.php:546 msgid "Processes" msgstr "Processes" -#: inc/process.class.php:575 +#: inc/process.class.php:599 msgid "Hide case number and title in task descriptions" msgstr "Hide case number and title in task descriptions" -#: inc/process.class.php:580 +#: inc/process.class.php:604 msgid "Insert Task Category comments in Task Description" msgstr "Insert Task Category comments in Task Description" -#: inc/process.class.php:603 -msgid "ITIL Category (self-service)" -msgstr "ITIL Category (self-service)" +#: inc/process.class.php:619 +msgid "ITIL Category for Self-service interface (left empty to disable)" +msgstr "ITIL Category for Self-service interface (left empty to disable)" -#: inc/process.class.php:632 -msgid "Project type (to be changed if not up-to-date)" -msgstr "Project type (to be changed if not up-to-date)" +#: inc/process.class.php:646 +msgid "Type for Self-service interface" +msgstr "Type for Self-service interface" + +#: inc/process.class.php:676 +msgid "Process type (to be changed only if not up-to-date)" +msgstr "Process type (to be changed only if not up-to-date)" #: inc/process_profile.class.php:26 inc/process_profile.class.php:45 msgid "Authorizations" @@ -509,6 +541,12 @@ msgstr "A 'Case' is running!" msgid "You must manage it first (see 'Process - Case' tab)!" msgstr "You must manage it first (see 'Process - Case' tab)!" +#: inc/processmaker.class.php:3038 +msgid "" +"ProcessMaker plugin is under maintenance, please retry later, thank you." +msgstr "" +"ProcessMaker plugin is under maintenance, please retry later, thank you." + #: inc/profile.class.php:17 msgid "Process configuration" msgstr "Process configuration" @@ -517,12 +555,16 @@ msgstr "Process configuration" msgid "Cases" msgstr "Cases" -#: inc/task.class.php:25 +#: inc/task.class.php:29 msgid "Process case task" msgid_plural "Process case tasks" msgstr[0] "Process case task" msgstr[1] "Process case tasks" +#: inc/task.class.php:258 +msgid "Sub-case task(s)" +msgstr "Sub-case task(s)" + #: inc/taskcategory.class.php:21 inc/taskcategory.class.php:31 msgid "Task List" msgstr "Task List" @@ -543,5 +585,23 @@ msgstr "Task GUID" msgid "Sub-process" msgstr "Sub-process" +#~ msgid "Case item" +#~ msgstr "Case item" + +#~ msgid "Subcase of" +#~ msgstr "Subcase of" + +#~ msgid "Project type" +#~ msgstr "Project type" + +#~ msgid "Hide case number and title" +#~ msgstr "Hide case number and title" + +#~ msgid "ITIL Category (self-service)" +#~ msgstr "ITIL Category (self-service)" + +#~ msgid "Project type (to be changed if not up-to-date)" +#~ msgstr "Project type (to be changed if not up-to-date)" + #~ msgid "Plugin is under maintenance, please retry later, thank you." #~ msgstr "Plugin is under maintenance, please retry later, thank you." diff --git a/locales/fr_FR.mo b/locales/fr_FR.mo index a3234dd..9299adb 100644 Binary files a/locales/fr_FR.mo and b/locales/fr_FR.mo differ diff --git a/locales/fr_FR.po b/locales/fr_FR.po index 1379328..96c93d8 100644 --- a/locales/fr_FR.po +++ b/locales/fr_FR.po @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: processmaker-plugin\n" -"POT-Creation-Date: 2018-08-02 14:42+0200\n" -"PO-Revision-Date: 2018-08-03 09:44+0200\n" +"POT-Creation-Date: 2018-08-06 14:32+0200\n" +"PO-Revision-Date: 2018-08-06 14:44+0200\n" "Last-Translator: tomolimo\n" "Language-Team: French\n" "Language: fr_FR\n" @@ -49,24 +49,17 @@ msgstr "Le cas a été annulé !" msgid "Unable to cancel case!" msgstr "Impossible d'annuler le cas !" -#: front/case.form.php:76 front/case.form.php:78 inc/case.class.php:922 +#: front/case.form.php:76 front/case.form.php:78 inc/case.class.php:1018 msgid "Process cases" msgstr "Cas des processus" #: front/case.php:5 front/caselink.form.php:27 front/caselink.php:5 #: front/process.form.php:25 front/process.php:5 inc/caselink.class.php:143 -#: inc/config.class.php:50 inc/config.class.php:347 inc/process.class.php:393 +#: inc/config.class.php:50 inc/config.class.php:354 inc/process.class.php:393 #: inc/profile.class.php:52 inc/profile.class.php:83 msgid "ProcessMaker" msgstr "ProcessMaker" -#: front/case.php:14 inc/case.class.php:644 -msgid "" -"ProcessMaker plugin is under maintenance, please retry later, thank you." -msgstr "" -"Le plugin ProcessMaker est en maintenance, veuillez ré-essayer plus tard, " -"merci." - #: front/processmaker.form.php:85 msgid "Task re-assigned!" msgstr "Tâche ré-affectée !" @@ -83,7 +76,7 @@ msgstr "Tâche déjà affectée à cette personne !" msgid "Process - Case" msgstr "Processus - Cas" -#: front/processmaker.helpdesk.form.php:24 inc/case.class.php:528 +#: front/processmaker.helpdesk.form.php:24 inc/case.class.php:605 msgid "Select the process you want to add" msgstr "Choisir le processus à démarrer" @@ -95,146 +88,164 @@ msgstr "Synchroniser la liste des Tâches" msgid "Case" msgstr "Cas" -#: hook.php:158 inc/case.class.php:509 inc/case.class.php:966 +#: hook.php:158 inc/case.class.php:586 inc/case.class.php:1062 msgid "Status" msgstr "Statut" -#: inc/case.class.php:23 inc/case.class.php:85 inc/case.class.php:87 +#: inc/case.class.php:23 inc/case.class.php:90 inc/case.class.php:92 msgid "Process case" msgid_plural "Process cases" msgstr[0] "Cas du processus" msgstr[1] "Cas des processus" -#: inc/case.class.php:285 -msgid "Case properties" -msgstr "Propriétés du cas" +#: inc/case.class.php:80 +msgid "Sub-case" +msgstr "Sous-cas" -#: inc/case.class.php:287 inc/case.class.php:507 inc/case.class.php:940 -#: inc/process.class.php:524 -msgid "Process" -msgstr "Processus" - -#: inc/case.class.php:290 -msgid "Case title" -msgstr "Titre du cas" - -#: inc/case.class.php:293 -msgid "Case number" -msgstr "Numéro du cas" - -#: inc/case.class.php:296 -msgid "Case status" -msgstr "Statut du cas" - -#: inc/case.class.php:299 -msgid "Case guid" -msgstr "Guid du cas" - -#: inc/case.class.php:302 -msgid "Creator" -msgstr "Créateur" - -#: inc/case.class.php:305 -msgid "Creation date" -msgstr "Date de création" - -#: inc/case.class.php:308 -msgid "Last update" -msgstr "Dernière mise à jour" - -#: inc/case.class.php:323 +#: inc/case.class.php:312 msgid "Current task(s) properties" msgstr "Propriétés des tâches en cours" -#: inc/case.class.php:327 +#: inc/case.class.php:316 inc/task.class.php:263 msgid "Task" msgstr "Tâche" -#: inc/case.class.php:328 +#: inc/case.class.php:317 inc/task.class.php:264 msgid "Task guid" msgstr "Guid de la tâche" -#: inc/case.class.php:329 +#: inc/case.class.php:318 inc/task.class.php:265 msgid "Current user" msgstr "Utilisateur actuel" -#: inc/case.class.php:330 +#: inc/case.class.php:319 inc/task.class.php:266 msgid "Task delegation date" msgstr "Date de délégation de tâche" -#: inc/case.class.php:338 +#: inc/case.class.php:341 inc/task.class.php:275 msgid "To be claimed" msgstr "A réclamer" -#: inc/case.class.php:407 -msgid "Case item" -msgstr "Item du cas" +#: inc/case.class.php:377 +msgid "Sub-case properties" +msgstr "Propriétés du sous-cas" -#: inc/case.class.php:429 +#: inc/case.class.php:380 +msgid "Parent case properties" +msgstr "Propriétés du cas parent" + +#: inc/case.class.php:382 +msgid "Case properties" +msgstr "Propriétés du cas" + +#: inc/case.class.php:387 inc/case.class.php:584 inc/case.class.php:1036 +#: inc/process.class.php:548 +msgid "Process" +msgstr "Processus" + +#: inc/case.class.php:388 +msgid "Case title" +msgstr "Titre du cas" + +#: inc/case.class.php:389 +msgid "Case number" +msgstr "Numéro du cas" + +#: inc/case.class.php:390 +msgid "Case status" +msgstr "Statut du cas" + +#: inc/case.class.php:391 +msgid "Case guid" +msgstr "Guid du cas" + +#: inc/case.class.php:392 +msgid "Creator" +msgstr "Créateur" + +#: inc/case.class.php:393 +msgid "Creation date" +msgstr "Date de création" + +#: inc/case.class.php:394 +msgid "Last update" +msgstr "Dernière mise à jour" + +#: inc/case.class.php:479 +#, php-format +msgid "Case is linked to a %1s" +msgstr "Le cas est lié à un %1s" + +#: inc/case.class.php:481 +#, php-format +msgid "Sub-case is linked to a %1s" +msgstr "Le sous-cas est lié à un %1s" + +#: inc/case.class.php:506 msgid "Case cancellation" msgstr "Annulation du cas" -#: inc/case.class.php:430 +#: inc/case.class.php:507 msgid "Cancel case" msgstr "Annuler cas" -#: inc/case.class.php:434 +#: inc/case.class.php:511 msgid "Confirm cancellation?" msgstr "Confirmer l’annulation ?" -#: inc/case.class.php:434 inc/profile.class.php:23 +#: inc/case.class.php:511 inc/profile.class.php:23 msgid "Cancel" msgstr "Annuler" -#: inc/case.class.php:455 +#: inc/case.class.php:532 msgid "Case deletion" msgstr "Suppression du cas" -#: inc/case.class.php:456 +#: inc/case.class.php:533 msgid "Delete case" msgstr "Supprimer le cas" -#: inc/case.class.php:508 inc/case.class.php:933 +#: inc/case.class.php:585 inc/case.class.php:1029 msgid "Title" msgstr "Titre" -#: inc/case.class.php:510 inc/case.class.php:974 -msgid "Subcase of" +#: inc/case.class.php:587 inc/case.class.php:1070 +msgid "Sub-case of" msgstr "Sous-cas de" -#: inc/case.class.php:525 +#: inc/case.class.php:602 msgid "Add a new case" msgstr "Ajouter un nouveau cas" -#: inc/case.class.php:899 +#: inc/case.class.php:995 msgctxt "case_status" msgid "Draft" msgstr "Brouillon" -#: inc/case.class.php:900 +#: inc/case.class.php:996 msgctxt "case_status" msgid "To do" msgstr "A faire" -#: inc/case.class.php:901 +#: inc/case.class.php:997 msgctxt "case_status" msgid "Completed" msgstr "Terminé" -#: inc/case.class.php:902 +#: inc/case.class.php:998 msgctxt "case_status" msgid "Cancelled" msgstr "Annulé" -#: inc/case.class.php:926 +#: inc/case.class.php:1022 msgid "ID" msgstr "ID" -#: inc/case.class.php:953 +#: inc/case.class.php:1049 msgid "Item" msgstr "Item" -#: inc/case.class.php:960 +#: inc/case.class.php:1056 msgid "Item entity" msgstr "Entité de l'item" @@ -302,111 +313,111 @@ msgstr "Carte" msgid "ProcessMaker setup" msgstr "Configuration du serveur ProcessMaker" -#: inc/config.class.php:156 +#: inc/config.class.php:159 msgid "Server URL (must be in same domain than GLPI)" msgstr "URL du serveur (doit être dans le même domaine que GLPI)" -#: inc/config.class.php:161 +#: inc/config.class.php:164 msgid "Common domain with GLPI" msgstr "Domaine commun avec GLPI" -#: inc/config.class.php:190 +#: inc/config.class.php:193 msgid "None!" msgstr "Aucun !" -#: inc/config.class.php:199 +#: inc/config.class.php:202 msgid "Workspace Name" msgstr "Nom du Workspace" -#: inc/config.class.php:204 +#: inc/config.class.php:207 msgid "Server administrator name" msgstr "Non de l'administreur du server ProcessMaker" -#: inc/config.class.php:209 +#: inc/config.class.php:212 msgid "Server administrator password" msgstr "Mot de passe de l'administrateur du serveur ProcessMaker" -#: inc/config.class.php:215 inc/config.class.php:255 +#: inc/config.class.php:218 inc/config.class.php:258 msgid "Connection status" msgstr "Status de la connexion" -#: inc/config.class.php:231 +#: inc/config.class.php:234 msgid "SQL server setup" msgstr "Configuration du serveur SQL" -#: inc/config.class.php:234 +#: inc/config.class.php:237 msgid "SQL server (MariaDB or MySQL)" msgstr "SQL server (MariaDB ou MySQL)" -#: inc/config.class.php:239 +#: inc/config.class.php:242 msgid "Database name" msgstr "Nom de la base de données" -#: inc/config.class.php:244 +#: inc/config.class.php:247 msgid "SQL user" msgstr "Utilisateur SQL" -#: inc/config.class.php:249 +#: inc/config.class.php:252 msgid "SQL password" msgstr "Mot de passe SQL" -#: inc/config.class.php:266 +#: inc/config.class.php:269 msgid "Theme Name" msgstr "Nom du thème" -#: inc/config.class.php:272 +#: inc/config.class.php:275 msgid "Main Task Category (edit to change name)" msgstr "Catégorie principale des tâches (éditer pour changer le nom)" -#: inc/config.class.php:279 +#: inc/config.class.php:282 msgid "Task Writer (edit to change name)" msgstr "Auteur des tâches (éditer pour changer le nom)" -#: inc/config.class.php:299 +#: inc/config.class.php:302 msgid "Group in ProcessMaker which will contain all GLPI users" msgstr "Groupe dans ProcessMaker qui contiendra les utilisateurs de GLPI" -#: inc/config.class.php:323 +#: inc/config.class.php:331 msgid "Processmaker system information" msgstr "Informations système du serveur ProcessMaker" -#: inc/config.class.php:327 inc/config.class.php:337 +#: inc/config.class.php:334 inc/config.class.php:344 msgid "Version" msgstr "Version" -#: inc/config.class.php:328 +#: inc/config.class.php:335 msgid "Web server" msgstr "Serveur web" -#: inc/config.class.php:329 +#: inc/config.class.php:336 msgid "Server name" msgstr "Nom du serveur" -#: inc/config.class.php:330 +#: inc/config.class.php:337 msgid "PHP version" msgstr "Version de PHP" -#: inc/config.class.php:331 +#: inc/config.class.php:338 msgid "DB version" msgstr "Version de la Db" -#: inc/config.class.php:332 +#: inc/config.class.php:339 msgid "DB server IP" msgstr "IP du serveur DB" -#: inc/config.class.php:333 +#: inc/config.class.php:340 msgid "DB name" msgstr "Nom de la BD" -#: inc/config.class.php:334 +#: inc/config.class.php:341 msgid "User browser" msgstr "Navigateur de l’utilisateur" -#: inc/config.class.php:335 +#: inc/config.class.php:342 msgid "User IP" msgstr "IP de l'utilisateur" -#: inc/config.class.php:337 +#: inc/config.class.php:344 msgid "Not yet!" msgstr "Pas encore !" @@ -414,57 +425,78 @@ msgstr "Pas encore !" msgid "Synchronize Process List" msgstr "Synchroniser la liste des processus" -#: inc/process.class.php:427 inc/process.class.php:565 +#: inc/process.class.php:427 inc/process.class.php:589 msgid "Process GUID" msgstr "GUID du Processus" #: inc/process.class.php:433 -msgid "Project type" -msgstr "Type de projet" +msgid "Process type" +msgstr "Type de processus" #: inc/process.class.php:439 -msgid "Hide case number and title" -msgstr "Masquer numéro et titre des cas" +msgid "Hide case num. & title" +msgstr "Cacher num. et titre du cas" #: inc/process.class.php:445 msgid "Insert Task Category" msgstr "Insérer la catégorie des tâches" -#: inc/process.class.php:457 inc/process.class.php:585 +#: inc/process.class.php:457 msgid "Ticket type (self-service)" msgstr "Type de ticket (self-service)" -#: inc/process.class.php:495 +#: inc/process.class.php:464 inc/process.class.php:609 +msgid "Visible in Incident for Central interface" +msgstr "Visible pour un Incident sur l'interface Centrale" + +#: inc/process.class.php:470 inc/process.class.php:614 +msgid "Visible in Request for Central interface" +msgstr "Visible pour une demande sur l'interface Centrale" + +#: inc/process.class.php:476 inc/process.class.php:666 +msgid "Visible in Change" +msgstr "Visible dans un Changement" + +#: inc/process.class.php:482 inc/process.class.php:671 +msgid "Visible in Problem" +msgstr "Visible dans un Problème" + +#: inc/process.class.php:519 msgctxt "process_type" msgid "Classic" msgstr "Classique" -#: inc/process.class.php:496 +#: inc/process.class.php:520 msgctxt "process_type" msgid "BPMN" msgstr "BPMN" -#: inc/process.class.php:522 +#: inc/process.class.php:546 msgid "Processes" msgstr "Processus" -#: inc/process.class.php:575 +#: inc/process.class.php:599 msgid "Hide case number and title in task descriptions" msgstr "Masquer numéro et titre des cas dans les descriptions des tâches" -#: inc/process.class.php:580 +#: inc/process.class.php:604 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" -#: inc/process.class.php:603 -msgid "ITIL Category (self-service)" -msgstr "Catégorie ITIL (self-service)" +#: inc/process.class.php:619 +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)" -#: inc/process.class.php:632 -msgid "Project type (to be changed if not up-to-date)" -msgstr "Type de projet (à modifier si pas à jour)" +#: inc/process.class.php:646 +msgid "Type for Self-service interface" +msgstr "Type de ticket pour l'interface libre-service" + +#: inc/process.class.php:676 +msgid "Process type (to be changed only if not up-to-date)" +msgstr "Type de processus (à modifier uniquement si pas à jour)" #: inc/process_profile.class.php:26 inc/process_profile.class.php:45 msgid "Authorizations" @@ -512,6 +544,13 @@ msgstr "Un 'Cas' est en cours !" msgid "You must manage it first (see 'Process - Case' tab)!" msgstr "Vous devez d'abord le terminer (voir onglet 'Processus - Cas') !" +#: inc/processmaker.class.php:3038 +msgid "" +"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 msgid "Process configuration" msgstr "Configuration des Processus" @@ -520,12 +559,16 @@ msgstr "Configuration des Processus" msgid "Cases" msgstr "Cas" -#: inc/task.class.php:25 +#: inc/task.class.php:29 msgid "Process case task" msgid_plural "Process case tasks" msgstr[0] "Tâche d'un cas" msgstr[1] "Tâches d'un cas" +#: inc/task.class.php:258 +msgid "Sub-case task(s)" +msgstr "Tache(s) du sous-cas" + #: inc/taskcategory.class.php:21 inc/taskcategory.class.php:31 msgid "Task List" msgstr "Liste des tâches" @@ -546,5 +589,23 @@ msgstr "GUID de la Tâche" msgid "Sub-process" msgstr "Sous-processus" +#~ msgid "Case item" +#~ msgstr "Case item" + +#~ msgid "Subcase of" +#~ msgstr "Subcase of" + +#~ msgid "Project type" +#~ msgstr "Project type" + +#~ msgid "Hide case number and title" +#~ msgstr "Hide case number and title" + +#~ msgid "ITIL Category (self-service)" +#~ msgstr "ITIL Category (self-service)" + +#~ msgid "Project type (to be changed if not up-to-date)" +#~ msgstr "Project type (to be changed if not up-to-date)" + #~ msgid "Plugin is under maintenance, please retry later, thank you." #~ msgstr "Plugin is under maintenance, please retry later, thank you." diff --git a/locales/source.po b/locales/source.po index 5ccfbe0..17ae5a9 100644 --- a/locales/source.po +++ b/locales/source.po @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: Processmaker plugin 3.3.0\n" -"POT-Creation-Date: 2018-08-02 14:42+0200\n" -"PO-Revision-Date: 2018-08-02 16:56+0200\n" +"POT-Creation-Date: 2018-08-06 14:32+0200\n" +"PO-Revision-Date: 2018-08-06 14:33+0200\n" "Last-Translator: tomolimo\n" "Language-Team: en_GB\n" "Language: en_GB\n" @@ -46,23 +46,17 @@ msgstr "Case has been cancelled!" msgid "Unable to cancel case!" msgstr "Unable to cancel case!" -#: front/case.form.php:76 front/case.form.php:78 inc/case.class.php:922 +#: front/case.form.php:76 front/case.form.php:78 inc/case.class.php:1018 msgid "Process cases" msgstr "Process cases" #: front/case.php:5 front/caselink.form.php:27 front/caselink.php:5 #: front/process.form.php:25 front/process.php:5 inc/caselink.class.php:143 -#: inc/config.class.php:50 inc/config.class.php:347 inc/process.class.php:393 +#: inc/config.class.php:50 inc/config.class.php:354 inc/process.class.php:393 #: inc/profile.class.php:52 inc/profile.class.php:83 msgid "ProcessMaker" msgstr "ProcessMaker" -#: front/case.php:14 inc/case.class.php:644 -msgid "" -"ProcessMaker plugin is under maintenance, please retry later, thank you." -msgstr "" -"ProcessMaker plugin is under maintenance, please retry later, thank you." - #: front/processmaker.form.php:85 msgid "Task re-assigned!" msgstr "Task re-assigned!" @@ -79,7 +73,7 @@ msgstr "Task already assigned to this person!" msgid "Process - Case" msgstr "Process - Case" -#: front/processmaker.helpdesk.form.php:24 inc/case.class.php:528 +#: front/processmaker.helpdesk.form.php:24 inc/case.class.php:605 msgid "Select the process you want to add" msgstr "Select the process you want to add" @@ -91,146 +85,164 @@ msgstr "Synchronize Task List" msgid "Case" msgstr "Case" -#: hook.php:158 inc/case.class.php:509 inc/case.class.php:966 +#: hook.php:158 inc/case.class.php:586 inc/case.class.php:1062 msgid "Status" msgstr "Status" -#: inc/case.class.php:23 inc/case.class.php:85 inc/case.class.php:87 +#: inc/case.class.php:23 inc/case.class.php:90 inc/case.class.php:92 msgid "Process case" msgid_plural "Process cases" msgstr[0] "Process case" msgstr[1] "Process cases" -#: inc/case.class.php:285 -msgid "Case properties" -msgstr "Case properties" +#: inc/case.class.php:80 +msgid "Sub-case" +msgstr "Sub-case" -#: inc/case.class.php:287 inc/case.class.php:507 inc/case.class.php:940 -#: inc/process.class.php:524 -msgid "Process" -msgstr "Process" - -#: inc/case.class.php:290 -msgid "Case title" -msgstr "Case title" - -#: inc/case.class.php:293 -msgid "Case number" -msgstr "Case number" - -#: inc/case.class.php:296 -msgid "Case status" -msgstr "Case status" - -#: inc/case.class.php:299 -msgid "Case guid" -msgstr "Case guid" - -#: inc/case.class.php:302 -msgid "Creator" -msgstr "Creator" - -#: inc/case.class.php:305 -msgid "Creation date" -msgstr "Creation date" - -#: inc/case.class.php:308 -msgid "Last update" -msgstr "Last update" - -#: inc/case.class.php:323 +#: inc/case.class.php:312 msgid "Current task(s) properties" msgstr "Current task(s) properties" -#: inc/case.class.php:327 +#: inc/case.class.php:316 inc/task.class.php:263 msgid "Task" msgstr "Task" -#: inc/case.class.php:328 +#: inc/case.class.php:317 inc/task.class.php:264 msgid "Task guid" msgstr "Task guid" -#: inc/case.class.php:329 +#: inc/case.class.php:318 inc/task.class.php:265 msgid "Current user" msgstr "Current user" -#: inc/case.class.php:330 +#: inc/case.class.php:319 inc/task.class.php:266 msgid "Task delegation date" msgstr "Task delegation date" -#: inc/case.class.php:338 +#: inc/case.class.php:341 inc/task.class.php:275 msgid "To be claimed" msgstr "To be claimed" -#: inc/case.class.php:407 -msgid "Case item" -msgstr "Case item" +#: inc/case.class.php:377 +msgid "Sub-case properties" +msgstr "Sub-case properties" -#: inc/case.class.php:429 +#: inc/case.class.php:380 +msgid "Parent case properties" +msgstr "Parent case properties" + +#: inc/case.class.php:382 +msgid "Case properties" +msgstr "Case properties" + +#: inc/case.class.php:387 inc/case.class.php:584 inc/case.class.php:1036 +#: inc/process.class.php:548 +msgid "Process" +msgstr "Process" + +#: inc/case.class.php:388 +msgid "Case title" +msgstr "Case title" + +#: inc/case.class.php:389 +msgid "Case number" +msgstr "Case number" + +#: inc/case.class.php:390 +msgid "Case status" +msgstr "Case status" + +#: inc/case.class.php:391 +msgid "Case guid" +msgstr "Case guid" + +#: inc/case.class.php:392 +msgid "Creator" +msgstr "Creator" + +#: inc/case.class.php:393 +msgid "Creation date" +msgstr "Creation date" + +#: inc/case.class.php:394 +msgid "Last update" +msgstr "Last update" + +#: inc/case.class.php:479 +#, php-format +msgid "Case is linked to a %1s" +msgstr "Case is linked to a %1s" + +#: inc/case.class.php:481 +#, php-format +msgid "Sub-case is linked to a %1s" +msgstr "Sub-case is linked to a %1s" + +#: inc/case.class.php:506 msgid "Case cancellation" msgstr "Case cancellation" -#: inc/case.class.php:430 +#: inc/case.class.php:507 msgid "Cancel case" msgstr "Cancel case" -#: inc/case.class.php:434 +#: inc/case.class.php:511 msgid "Confirm cancellation?" msgstr "Confirm cancellation?" -#: inc/case.class.php:434 inc/profile.class.php:23 +#: inc/case.class.php:511 inc/profile.class.php:23 msgid "Cancel" msgstr "Cancel" -#: inc/case.class.php:455 +#: inc/case.class.php:532 msgid "Case deletion" msgstr "Case deletion" -#: inc/case.class.php:456 +#: inc/case.class.php:533 msgid "Delete case" msgstr "Delete case" -#: inc/case.class.php:508 inc/case.class.php:933 +#: inc/case.class.php:585 inc/case.class.php:1029 msgid "Title" msgstr "Title" -#: inc/case.class.php:510 inc/case.class.php:974 -msgid "Subcase of" -msgstr "Subcase of" +#: inc/case.class.php:587 inc/case.class.php:1070 +msgid "Sub-case of" +msgstr "Sub-case of" -#: inc/case.class.php:525 +#: inc/case.class.php:602 msgid "Add a new case" msgstr "Add a new case" -#: inc/case.class.php:899 +#: inc/case.class.php:995 msgctxt "case_status" msgid "Draft" msgstr "Draft" -#: inc/case.class.php:900 +#: inc/case.class.php:996 msgctxt "case_status" msgid "To do" msgstr "To do" -#: inc/case.class.php:901 +#: inc/case.class.php:997 msgctxt "case_status" msgid "Completed" msgstr "Completed" -#: inc/case.class.php:902 +#: inc/case.class.php:998 msgctxt "case_status" msgid "Cancelled" msgstr "Cancelled" -#: inc/case.class.php:926 +#: inc/case.class.php:1022 msgid "ID" msgstr "ID" -#: inc/case.class.php:953 +#: inc/case.class.php:1049 msgid "Item" msgstr "Item" -#: inc/case.class.php:960 +#: inc/case.class.php:1056 msgid "Item entity" msgstr "Item entity" @@ -298,111 +310,111 @@ msgstr "Map" msgid "ProcessMaker setup" msgstr "ProcessMaker setup" -#: inc/config.class.php:156 +#: inc/config.class.php:159 msgid "Server URL (must be in same domain than GLPI)" msgstr "Server URL (must be in same domain than GLPI)" -#: inc/config.class.php:161 +#: inc/config.class.php:164 msgid "Common domain with GLPI" msgstr "Common domain with GLPI" -#: inc/config.class.php:190 +#: inc/config.class.php:193 msgid "None!" msgstr "None!" -#: inc/config.class.php:199 +#: inc/config.class.php:202 msgid "Workspace Name" msgstr "Workspace Name" -#: inc/config.class.php:204 +#: inc/config.class.php:207 msgid "Server administrator name" msgstr "Server administrator name" -#: inc/config.class.php:209 +#: inc/config.class.php:212 msgid "Server administrator password" msgstr "Server administrator password" -#: inc/config.class.php:215 inc/config.class.php:255 +#: inc/config.class.php:218 inc/config.class.php:258 msgid "Connection status" msgstr "Connection status" -#: inc/config.class.php:231 +#: inc/config.class.php:234 msgid "SQL server setup" msgstr "SQL server setup" -#: inc/config.class.php:234 +#: inc/config.class.php:237 msgid "SQL server (MariaDB or MySQL)" msgstr "SQL server (MariaDB or MySQL)" -#: inc/config.class.php:239 +#: inc/config.class.php:242 msgid "Database name" msgstr "Database name" -#: inc/config.class.php:244 +#: inc/config.class.php:247 msgid "SQL user" msgstr "SQL user" -#: inc/config.class.php:249 +#: inc/config.class.php:252 msgid "SQL password" msgstr "SQL password" -#: inc/config.class.php:266 +#: inc/config.class.php:269 msgid "Theme Name" msgstr "Theme Name" -#: inc/config.class.php:272 +#: inc/config.class.php:275 msgid "Main Task Category (edit to change name)" msgstr "Main Task Category (edit to change name)" -#: inc/config.class.php:279 +#: inc/config.class.php:282 msgid "Task Writer (edit to change name)" msgstr "Task Writer (edit to change name)" -#: inc/config.class.php:299 +#: inc/config.class.php:302 msgid "Group in ProcessMaker which will contain all GLPI users" msgstr "Group in ProcessMaker which will contain all GLPI users" -#: inc/config.class.php:323 +#: inc/config.class.php:331 msgid "Processmaker system information" msgstr "Processmaker system information" -#: inc/config.class.php:327 inc/config.class.php:337 +#: inc/config.class.php:334 inc/config.class.php:344 msgid "Version" msgstr "Version" -#: inc/config.class.php:328 +#: inc/config.class.php:335 msgid "Web server" msgstr "Web server" -#: inc/config.class.php:329 +#: inc/config.class.php:336 msgid "Server name" msgstr "Server name" -#: inc/config.class.php:330 +#: inc/config.class.php:337 msgid "PHP version" msgstr "PHP version" -#: inc/config.class.php:331 +#: inc/config.class.php:338 msgid "DB version" msgstr "DB version" -#: inc/config.class.php:332 +#: inc/config.class.php:339 msgid "DB server IP" msgstr "DB server IP" -#: inc/config.class.php:333 +#: inc/config.class.php:340 msgid "DB name" msgstr "DB name" -#: inc/config.class.php:334 +#: inc/config.class.php:341 msgid "User browser" msgstr "User browser" -#: inc/config.class.php:335 +#: inc/config.class.php:342 msgid "User IP" msgstr "User IP" -#: inc/config.class.php:337 +#: inc/config.class.php:344 msgid "Not yet!" msgstr "Not yet!" @@ -410,55 +422,75 @@ msgstr "Not yet!" msgid "Synchronize Process List" msgstr "Synchronize Process List" -#: inc/process.class.php:427 inc/process.class.php:565 +#: inc/process.class.php:427 inc/process.class.php:589 msgid "Process GUID" msgstr "Process GUID" #: inc/process.class.php:433 -msgid "Project type" -msgstr "Project type" +msgid "Process type" +msgstr "Process type" #: inc/process.class.php:439 -msgid "Hide case number and title" -msgstr "Hide case number and title" +msgid "Hide case num. & title" +msgstr "Hide case num. & title" #: inc/process.class.php:445 msgid "Insert Task Category" msgstr "Insert Task Category" -#: inc/process.class.php:457 inc/process.class.php:585 +#: inc/process.class.php:457 msgid "Ticket type (self-service)" msgstr "Ticket type (self-service)" -#: inc/process.class.php:495 +#: inc/process.class.php:464 inc/process.class.php:609 +msgid "Visible in Incident for Central interface" +msgstr "Visible in Incident for Central interface" + +#: inc/process.class.php:470 inc/process.class.php:614 +msgid "Visible in Request for Central interface" +msgstr "Visible in Request for Central interface" + +#: inc/process.class.php:476 inc/process.class.php:666 +msgid "Visible in Change" +msgstr "Visible in Change" + +#: inc/process.class.php:482 inc/process.class.php:671 +msgid "Visible in Problem" +msgstr "Visible in Problem" + +#: inc/process.class.php:519 msgctxt "process_type" msgid "Classic" msgstr "Classic" -#: inc/process.class.php:496 +#: inc/process.class.php:520 msgctxt "process_type" msgid "BPMN" msgstr "BPMN" -#: inc/process.class.php:522 +#: inc/process.class.php:546 msgid "Processes" msgstr "Processes" -#: inc/process.class.php:575 +#: inc/process.class.php:599 msgid "Hide case number and title in task descriptions" msgstr "Hide case number and title in task descriptions" -#: inc/process.class.php:580 +#: inc/process.class.php:604 msgid "Insert Task Category comments in Task Description" msgstr "Insert Task Category comments in Task Description" -#: inc/process.class.php:603 -msgid "ITIL Category (self-service)" -msgstr "ITIL Category (self-service)" +#: inc/process.class.php:619 +msgid "ITIL Category for Self-service interface (left empty to disable)" +msgstr "ITIL Category for Self-service interface (left empty to disable)" -#: inc/process.class.php:632 -msgid "Project type (to be changed if not up-to-date)" -msgstr "Project type (to be changed if not up-to-date)" +#: inc/process.class.php:646 +msgid "Type for Self-service interface" +msgstr "Type for Self-service interface" + +#: inc/process.class.php:676 +msgid "Process type (to be changed only if not up-to-date)" +msgstr "Process type (to be changed only if not up-to-date)" #: inc/process_profile.class.php:26 inc/process_profile.class.php:45 msgid "Authorizations" @@ -506,6 +538,12 @@ msgstr "A 'Case' is running!" msgid "You must manage it first (see 'Process - Case' tab)!" msgstr "You must manage it first (see 'Process - Case' tab)!" +#: inc/processmaker.class.php:3038 +msgid "" +"ProcessMaker plugin is under maintenance, please retry later, thank you." +msgstr "" +"ProcessMaker plugin is under maintenance, please retry later, thank you." + #: inc/profile.class.php:17 msgid "Process configuration" msgstr "Process configuration" @@ -514,12 +552,16 @@ msgstr "Process configuration" msgid "Cases" msgstr "Cases" -#: inc/task.class.php:25 +#: inc/task.class.php:29 msgid "Process case task" msgid_plural "Process case tasks" msgstr[0] "Process case task" msgstr[1] "Process case tasks" +#: inc/task.class.php:258 +msgid "Sub-case task(s)" +msgstr "Sub-case task(s)" + #: inc/taskcategory.class.php:21 inc/taskcategory.class.php:31 msgid "Task List" msgstr "Task List" @@ -540,5 +582,23 @@ msgstr "Task GUID" msgid "Sub-process" msgstr "Sub-process" +#~ msgid "Case item" +#~ msgstr "Case item" + +#~ msgid "Subcase of" +#~ msgstr "Subcase of" + +#~ msgid "Project type" +#~ msgstr "Project type" + +#~ msgid "Hide case number and title" +#~ msgstr "Hide case number and title" + +#~ msgid "ITIL Category (self-service)" +#~ msgstr "ITIL Category (self-service)" + +#~ msgid "Project type (to be changed if not up-to-date)" +#~ msgstr "Project type (to be changed if not up-to-date)" + #~ msgid "Plugin is under maintenance, please retry later, thank you." #~ msgstr "Plugin is under maintenance, please retry later, thank you." diff --git a/setup.php b/setup.php index bdd6255..3dcd000 100644 --- a/setup.php +++ b/setup.php @@ -9,8 +9,8 @@ function plugin_init_processmaker() { $PLUGIN_HOOKS['csrf_compliant']['processmaker'] = true; -// $objects = ['Ticket', 'Change', 'Problem']; - $objects = ['Ticket']; + $objects = ['Ticket', 'Change', 'Problem']; +// $objects = ['Ticket']; Plugin::registerClass('PluginProcessmakerProcessmaker'); @@ -124,7 +124,7 @@ function plugin_init_processmaker() { // Get the name and the version of the plugin - Needed function plugin_version_processmaker() { return array ('name' => 'Process Maker', - 'version' => '3.3.0', + 'version' => '3.3.1', 'author' => 'Olivier Moron', 'homepage' => 'https://github.com/tomolimo/processmaker', 'minGlpiVersion' => '9.1');