Merge branch 'refs/heads/support/3.2' into develop

This commit is contained in:
jf-cbd
2024-04-08 14:14:31 +02:00
10 changed files with 6 additions and 448 deletions

View File

@@ -280,9 +280,11 @@ class ApplicationMenu
$oMenuNode = static::GetMenuNode($sMenuGroupIdx);
if (!($oMenuNode instanceof MenuGroup)) {
IssueLog::Error('Menu node was not displayed as a menu group as it is actually not a menu group', LogChannels::CONSOLE, [
IssueLog::Error('Menu node without parent (root menu) must be of type menu group. Parent menu is missing or not visible to user.', LogChannels::CONSOLE, [
'menu_node_class' => get_class($oMenuNode),
'menu_node_id' => $oMenuNode->GetMenuID(),
'menu_node_label' => $oMenuNode->GetLabel(),
'current_user_id' => UserRights::GetUserId(),
]);
continue;
}

View File

@@ -44,9 +44,10 @@
"ext-libsodium": "Required to use the AttributeEncryptedString.",
"ext-openssl": "Can be used as a polyfill if libsodium is not installed",
"ext-mcrypt": "Can be used as a polyfill if either libsodium and openssl are not installed (libsodium and openssl are more secure)",
"ext-apcu": "For better performance and stability",
"ext-imap": "Required by the extension \"Mail to ticket automation\""
"ext-ldap": "Required to use LDAP as an identity provider",
"ext-posix": "Not required by the core, but some extensions uses it.",
"ext-imap": "Required by the extension \"Mail to ticket automation\""
},
"config": {
"platform": {

View File

@@ -993,34 +993,6 @@
}
]]></code>
</method>
<method id="SetClosureDate">
<comment><![CDATA[/**
* To be deprecated: use SetCurrentDate() instead
* @return void
*/]]></comment>
<static>false</static>
<access>public</access>
<type>StimulusUserAction</type>
<code><![CDATA[ public function SetClosureDate($sStimulusCode)
{
$this->Set('close_date', time());
return true;
}]]></code>
</method>
<method id="ResetRejectReason">
<comment><![CDATA[/**
* To be deprecated: use SetCurrentDate() instead
* @return void
*/]]></comment>
<static>false</static>
<access>public</access>
<type>LifecycleAction</type>
<code><![CDATA[ public function ResetRejectReason($sStimulusCode)
{
$this->Set('reason', '');
return true;
}]]></code>
</method>
<method id="OnInsert">
<static>false</static>
<access>protected</access>

View File

@@ -535,48 +535,6 @@
}
]]></code>
</method>
<method id="SetApprovalDate">
<comment><![CDATA[/**
* To be deprecated: use SetCurrentDate() instead
* @return void
*/]]></comment>
<static>false</static>
<access>public</access>
<type>LifecycleAction</type>
<code><![CDATA[ public function SetApprovalDate($sStimulusCode)
{
$this->Set('approval_date', time());
return true;
}]]></code>
</method>
<method id="ResetRejectReason">
<comment><![CDATA[/**
* To be deprecated: use SetCurrentDate() instead
* @return void
*/]]></comment>
<static>false</static>
<access>public</access>
<type>LifecycleAction</type>
<code><![CDATA[ public function ResetRejectReason($sStimulusCode)
{
$this->Set('reject_reason', '');
return true;
}]]></code>
</method>
<method id="SetClosureDate">
<comment><![CDATA[/**
* To be deprecated: use SetCurrentDate() instead
* @return void
*/]]></comment>
<static>false</static>
<access>public</access>
<type>LifecycleAction</type>
<code><![CDATA[ public function SetClosureDate($sStimulusCode)
{
$this->Set('close_date', time());
return true;
}]]></code>
</method>
<method id="OnInsert">
<static>false</static>
<access>protected</access>

View File

@@ -1083,64 +1083,6 @@
}
]]></code>
</method>
<method id="SetAssignedDate">
<comment><![CDATA[/**
* To be deprecated: use SetCurrentDate() instead
* @return void
*/]]></comment>
<static>false</static>
<access>public</access>
<type>LifecycleAction</type>
<code><![CDATA[ public function SetAssignedDate($sStimulusCode)
{
$this->Set('assignment_date', time());
return true;
}]]></code>
</method>
<method id="SetLastPendingDate">
<comment><![CDATA[/**
* To be deprecated: use SetCurrentDate() instead
* @return void
*/]]></comment>
<static>false</static>
<access>public</access>
<type>LifecycleAction</type>
<code><![CDATA[ public function SetLastPendingDate($sStimulusCode)
{
$this->Set('last_pending_date', time());
return true;
}]]></code>
</method>
<method id="SetResolveDate">
<comment><![CDATA[/**
* To be deprecated: use SetCurrentDate() and SetElapsedTime() instead
* @return void
*/]]></comment>
<static>false</static>
<access>public</access>
<type>LifecycleAction</type>
<code><![CDATA[ public function SetResolveDate($sStimulusCode)
{
$this->Set('resolution_date', time());
$iTimeSpent = time() - AttributeDateTime::GetAsUnixSeconds($this->Get('start_date'));
$this->Set('time_spent', $iTimeSpent);
return true;
}]]></code>
</method>
<method id="SetClosureDate">
<comment><![CDATA[/**
* To be deprecated: use SetCurrentDate() instead
* @return void
*/]]></comment>
<static>false</static>
<access>public</access>
<type>LifecycleAction</type>
<code><![CDATA[ public function SetClosureDate($sStimulusCode)
{
$this->Set('close_date', time());
return true;
}]]></code>
</method>
<method id="DoCheckToWrite">
<static>false</static>
<access>public</access>
@@ -1238,67 +1180,6 @@
}
}]]></code>
</method>
<method id="resolveChilds">
<comment><![CDATA[/**
* To be deprecated: use ResolveChildTickets() instead
*/]]></comment>
<static>false</static>
<access>public</access>
<type>LifecycleAction</type>
<code><![CDATA[ public function resolveChilds($sStimulusCode)
{
if (MetaModel::IsValidClass('UserRequest'))
{
$sOQL = "SELECT UserRequest WHERE parent_incident_id=:ticket";
$oChildRequestSet = new DBObjectSet(DBObjectSearch::FromOQL($sOQL),
array(),
array(
'ticket' => $this->GetKey(),
)
);
//automatically resolve child requests
while($oRequest = $oChildRequestSet->Fetch())
{
if ( $oRequest->Get('status') != 'resolved')
{
$oRequest->set('servicesubcategory_id',$this->Get('servicesubcategory_id'));
$oRequest->set('service_id',$this->Get('service_id'));
$oRequest->set('team_id',$this->Get('team_id'));
$oRequest->set('agent_id',$this->Get('agent_id'));
$oRequest->set('resolution_code',$this->Get('resolution_code'));
$oRequest->set('solution','Automatically resolved by incident:[[Incident:'.$this->Get('ref').']]');
$oRequest->ApplyStimulus('ev_autoresolve');
$oRequest->DBUpdate();
}
}
}
//automatically resolve child incidents
$sOQL = "SELECT Incident WHERE parent_incident_id=:ticket";
$oChildIncidentSet = new DBObjectSet(DBObjectSearch::FromOQL($sOQL),
array(),
array(
'ticket' => $this->GetKey(),
)
);
while($oIncident = $oChildIncidentSet->Fetch())
{
if ( $oIncident->Get('status') != 'resolved')
{
$oIncident->set('servicesubcategory_id',$this->Get('servicesubcategory_id'));
$oIncident->set('service_id',$this->Get('service_id'));
$oIncident->set('team_id',$this->Get('team_id'));
$oIncident->set('agent_id',$this->Get('agent_id'));
$oIncident->set('resolution_code',$this->Get('resolution_code'));
$oIncident->set('solution','Automatically resolved by incident:[[Incident:'.$this->Get('ref').']]');
$oIncident->ApplyStimulus('ev_autoresolve');
$oIncident->DBUpdate();
}
}
return true;
}]]></code>
</method>
<method id="ResolveChildTickets">
<comment><![CDATA[/**
* Cascade the resolution to child User Request and Incidents

View File

@@ -443,48 +443,6 @@
}
]]></code>
</method>
<method id="SetAssignedDate">
<comment><![CDATA[/**
* To be deprecated: use SetCurrentDate() instead
* @return void
*/]]></comment>
<static>false</static>
<access>public</access>
<type>LifecycleAction</type>
<code><![CDATA[ public function SetAssignedDate($sStimulusCode)
{
$this->Set('assignment_date', time());
return true;
}]]></code>
</method>
<method id="SetResolveDate">
<comment><![CDATA[/**
* To be deprecated: use SetCurrentDate() instead
* @return void
*/]]></comment>
<static>false</static>
<access>public</access>
<type>LifecycleAction</type>
<code><![CDATA[ public function SetResolveDate($sStimulusCode)
{
$this->Set('resolution_date', time());
return true;
}]]></code>
</method>
<method id="SetClosureDate">
<comment><![CDATA[/**
* To be deprecated: use SetCurrentDate() instead
* @return void
*/]]></comment>
<static>false</static>
<access>public</access>
<type>LifecycleAction</type>
<code><![CDATA[ public function SetClosureDate($sStimulusCode)
{
$this->Set('close_date', time());
return true;
}]]></code>
</method>
<method id="ComputePriority">
<comment>/** Compute the priority of the ticket based on its impact and urgency&#13;
* @return integer The priority of the ticket 1(high) .. 3(low)&#13;

View File

@@ -1231,78 +1231,6 @@
}
]]></code>
</method>
<method id="SetAssignedDate">
<comment><![CDATA[/**
* To be deprecated: use SetCurrentDate() instead
* @return void
*/]]></comment>
<static>false</static>
<access>public</access>
<type>LifecycleAction</type>
<code><![CDATA[ public function SetAssignedDate($sStimulusCode)
{
$this->Set('assignment_date', time());
return true;
}]]></code>
</method>
<method id="SetLastPendingDate">
<comment><![CDATA[/**
* To be deprecated: use SetCurrentDate() instead
* @return void
*/]]></comment>
<static>false</static>
<access>public</access>
<type>LifecycleAction</type>
<code><![CDATA[ public function SetLastPendingDate($sStimulusCode)
{
$this->Set('last_pending_date', time());
return true;
}]]></code>
</method>
<method id="SetResolveDate">
<comment><![CDATA[/**
* To be deprecated: use SetCurrentDate() and SetElapsedTime() instead
* @return void
*/]]></comment>
<static>false</static>
<access>public</access>
<type>LifecycleAction</type>
<code><![CDATA[ public function SetResolveDate($sStimulusCode)
{
$this->Set('resolution_date', time());
$iTimeSpent = time() - AttributeDateTime::GetAsUnixSeconds($this->Get('start_date'));
$this->Set('time_spent', $iTimeSpent);
return true;
}]]></code>
</method>
<method id="SetClosureDate">
<comment><![CDATA[/**
* To be deprecated: use SetCurrentDate() instead
* @return void
*/]]></comment>
<static>false</static>
<access>public</access>
<type>LifecycleAction</type>
<code><![CDATA[ public function SetClosureDate($sStimulusCode)
{
$this->Set('close_date', time());
return true;
}]]></code>
</method>
<method id="SetApprover">
<comment><![CDATA[/**
* To be deprecated: use SetCurrentUser() instead
* @return void
*/]]></comment>
<static>false</static>
<access>public</access>
<type>LifecycleAction</type>
<code><![CDATA[ public function SetApprover($sStimulusCode)
{
$this->Set('approver_id', UserRights::GetUserId());
return true;
}]]></code>
</method>
<method id="DoCheckToWrite">
<static>false</static>
<access>public</access>
@@ -1399,41 +1327,6 @@
}
}]]></code>
</method>
<method id="resolveChilds">
<comment><![CDATA[/**
* To be deprecated: use ResolveChildTickets() instead
*/]]></comment>
<static>false</static>
<access>public</access>
<type>LifecycleAction</type>
<code><![CDATA[ public function resolveChilds($sStimulusCode)
{
$sOQL = "SELECT UserRequest WHERE parent_request_id=:ticket";
$oChildRequestSet = new DBObjectSet(DBObjectSearch::FromOQL($sOQL),
array(),
array(
'ticket' => $this->GetKey(),
)
);
while($oRequest = $oChildRequestSet->Fetch())
{
if ( $oRequest->Get('status') != 'resolved')
{
$oRequest->set('servicesubcategory_id',$this->Get('servicesubcategory_id'));
$oRequest->set('service_id',$this->Get('service_id'));
$oRequest->set('team_id',$this->Get('team_id'));
$oRequest->set('agent_id',$this->Get('agent_id'));
$oRequest->set('resolution_code',$this->Get('resolution_code'));
$oRequest->set('solution','Automatically resolved by request:[[UserRequest:'.$this->Get('ref').']]');
$oRequest->ApplyStimulus('ev_autoresolve');
$oRequest->DBUpdate();
}
}
return true;
}]]></code>
</method>
<method id="ResolveChildTickets">
<comment><![CDATA[/**
* Cascade the resolution to child User Request

View File

@@ -1260,78 +1260,6 @@
}
]]></code>
</method>
<method id="SetAssignedDate">
<comment><![CDATA[/**
* To be deprecated: use SetCurrentDate() instead
* @return void
*/]]></comment>
<static>false</static>
<access>public</access>
<type>LifecycleAction</type>
<code><![CDATA[ public function SetAssignedDate($sStimulusCode)
{
$this->Set('assignment_date', time());
return true;
}]]></code>
</method>
<method id="SetLastPendingDate">
<comment><![CDATA[/**
* To be deprecated: use SetCurrentDate() instead
* @return void
*/]]></comment>
<static>false</static>
<access>public</access>
<type>LifecycleAction</type>
<code><![CDATA[ public function SetLastPendingDate($sStimulusCode)
{
$this->Set('last_pending_date', time());
return true;
}]]></code>
</method>
<method id="SetResolveDate">
<comment><![CDATA[/**
* To be deprecated: use SetCurrentDate() and SetElapsedTime() instead
* @return void
*/]]></comment>
<static>false</static>
<access>public</access>
<type>LifecycleAction</type>
<code><![CDATA[ public function SetResolveDate($sStimulusCode)
{
$this->Set('resolution_date', time());
$iTimeSpent = time() - AttributeDateTime::GetAsUnixSeconds($this->Get('start_date'));
$this->Set('time_spent', $iTimeSpent);
return true;
}]]></code>
</method>
<method id="SetClosureDate">
<comment><![CDATA[/**
* To be deprecated: use SetCurrentDate() instead
* @return void
*/]]></comment>
<static>false</static>
<access>public</access>
<type>LifecycleAction</type>
<code><![CDATA[ public function SetClosureDate($sStimulusCode)
{
$this->Set('close_date', time());
return true;
}]]></code>
</method>
<method id="SetApprover">
<comment><![CDATA[/**
* To be deprecated: use SetCurrentUser() instead
* @return void
*/]]></comment>
<static>false</static>
<access>public</access>
<type>LifecycleAction</type>
<code><![CDATA[ public function SetApprover($sStimulusCode)
{
$this->Set('approver_id', UserRights::GetUserId());
return true;
}]]></code>
</method>
<method id="DoCheckToWrite">
<static>false</static>
<access>public</access>
@@ -1439,41 +1367,6 @@
'panel_title_tooltip' => Dict::S($sTabCode."+"),
]);
}
}]]></code>
</method>
<method id="resolveChilds">
<comment><![CDATA[/**
* To be deprecated: use ResolveChildTickets() instead
*/]]></comment>
<static>false</static>
<access>public</access>
<type>LifecycleAction</type>
<code><![CDATA[ public function resolveChilds($sStimulusCode)
{
$sOQL = "SELECT UserRequest WHERE parent_request_id=:ticket";
$oChildRequestSet = new DBObjectSet(DBObjectSearch::FromOQL($sOQL),
array(),
array(
'ticket' => $this->GetKey(),
)
);
while($oRequest = $oChildRequestSet->Fetch())
{
if ( $oRequest->Get('status') != 'resolved')
{
$oRequest->set('servicesubcategory_id',$this->Get('servicesubcategory_id'));
$oRequest->set('service_id',$this->Get('service_id'));
$oRequest->set('team_id',$this->Get('team_id'));
$oRequest->set('agent_id',$this->Get('agent_id'));
$oRequest->set('resolution_code',$this->Get('resolution_code'));
$oRequest->set('solution','Automatically resolved by request:[[UserRequest:'.$this->Get('ref').']]');
$oRequest->ApplyStimulus('ev_autoresolve');
$oRequest->DBUpdate();
}
}
return true;
}]]></code>
</method>
<method id="ResolveChildTickets">

View File

@@ -1469,7 +1469,6 @@
<preset id="2">copy(service_id, service_id)</preset>
</presets>
</action_rule>
<!-- Deprecated, will be removed in iTop 2.8 -->
<action_rule id="go-to-open-request-on-submit" _delta="define">
<submit xsi:type="goto">
<brick>ongoing-tickets-for-portal-user</brick>

View File

@@ -2169,6 +2169,7 @@ JS
'sodium' => 'Strong encryption will not be used.',
'openssl' => 'Strong encryption will not be used.',
],
'apcu' => 'Performances will be slightly degraded.',
'ldap' => 'LDAP authentication will be disabled.',
];