mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 15:22:17 +02:00
Merge remote-tracking branch 'origin/support/3.1' into develop
This commit is contained in:
@@ -355,4 +355,26 @@
|
|||||||
</presentation>
|
</presentation>
|
||||||
</class>
|
</class>
|
||||||
</classes>
|
</classes>
|
||||||
|
<meta>
|
||||||
|
<classes>
|
||||||
|
<class id="UserInternal" _delta="define_if_not_exists">
|
||||||
|
<fields>
|
||||||
|
<field id="contactid" xsi:type="AttributeExternalKey">
|
||||||
|
<target_class>Contact</target_class>
|
||||||
|
</field>
|
||||||
|
<field id="first_name" xsi:type="AttributeExternalField"/>
|
||||||
|
<field id="last_name" xsi:type="AttributeExternalField"/>
|
||||||
|
<field id="status" xsi:type="AttributeEnum"/>
|
||||||
|
<field id="org_id" xsi:type="AttributeExternalField"/>
|
||||||
|
<field id="email" xsi:type="AttributeExternalField"/>
|
||||||
|
<field id="login" xsi:type="AttributeString"/>
|
||||||
|
<field id="language" xsi:type="AttributeApplicationLanguage"/>
|
||||||
|
<field id="status" xsi:type="AttributeEnum"/>
|
||||||
|
<field id="allowed_org_list" xsi:type="AttributeLinkedSetIndirect"/>
|
||||||
|
<field id="profile_list" xsi:type="AttributeLinkedSetIndirect"/>
|
||||||
|
<field id="log" xsi:type="AttributeCaseLog"/>
|
||||||
|
</fields>
|
||||||
|
</class>
|
||||||
|
</classes>
|
||||||
|
</meta>
|
||||||
</itop_design>
|
</itop_design>
|
||||||
|
|||||||
@@ -6353,17 +6353,7 @@
|
|||||||
<attribute id="connectableci_id"/>
|
<attribute id="connectableci_id"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</reconciliation>
|
</reconciliation>
|
||||||
<uniqueness_rules>
|
<uniqueness_rules/>
|
||||||
<rule id="no_duplicate">
|
|
||||||
<attributes>
|
|
||||||
<attribute id="networkdevice_id"/>
|
|
||||||
<attribute id="connectableci_id"/>
|
|
||||||
</attributes>
|
|
||||||
<filter><![CDATA[]]></filter>
|
|
||||||
<disabled>false</disabled>
|
|
||||||
<is_blocking>true</is_blocking>
|
|
||||||
</rule>
|
|
||||||
</uniqueness_rules>
|
|
||||||
</properties>
|
</properties>
|
||||||
<fields>
|
<fields>
|
||||||
<field id="networkdevice_id" xsi:type="AttributeExternalKey">
|
<field id="networkdevice_id" xsi:type="AttributeExternalKey">
|
||||||
|
|||||||
@@ -1748,48 +1748,15 @@ public function PrefillSearchForm(&$aContextParam)
|
|||||||
<ext_key_to_remote>slt_id</ext_key_to_remote>
|
<ext_key_to_remote>slt_id</ext_key_to_remote>
|
||||||
<duplicates/>
|
<duplicates/>
|
||||||
</field>
|
</field>
|
||||||
<field id="customercontracts_list" xsi:type="AttributeLinkedSetIndirect">
|
<field id="customercontracts_list" xsi:type="AttributeLinkedSet">
|
||||||
<linked_class>lnkCustomerContractToService</linked_class>
|
<linked_class>lnkCustomerContractToService</linked_class>
|
||||||
<ext_key_to_me>sla_id</ext_key_to_me>
|
<ext_key_to_me>sla_id</ext_key_to_me>
|
||||||
<count_min>0</count_min>
|
<count_min>0</count_min>
|
||||||
<count_max>0</count_max>
|
<count_max>0</count_max>
|
||||||
<ext_key_to_remote>customercontract_id</ext_key_to_remote>
|
<edit_mode>none</edit_mode>
|
||||||
<duplicates>true</duplicates>
|
|
||||||
</field>
|
</field>
|
||||||
</fields>
|
</fields>
|
||||||
<methods>
|
<methods/>
|
||||||
<method id="DoCheckToWrite">
|
|
||||||
<static>false</static>
|
|
||||||
<access>public</access>
|
|
||||||
<code><![CDATA[
|
|
||||||
public function DoCheckToWrite()
|
|
||||||
{
|
|
||||||
parent::DoCheckToWrite();
|
|
||||||
|
|
||||||
$aCustomerContracts = $this->Get("customercontracts_list");
|
|
||||||
foreach ($aCustomerContracts as $sAttCode => $oCustomerContracts)
|
|
||||||
{
|
|
||||||
// Recurse inside the subdirectories
|
|
||||||
$sOql = "SELECT lnkCustomerContractToService AS ccs WHERE ccs.customercontract_id=:customercontract_id AND ccs.service_id=:service_id";
|
|
||||||
$aQueryParams['customercontract_id'] = $oCustomerContracts->Get("customercontract_id");
|
|
||||||
$aQueryParams['service_id'] = $oCustomerContracts->Get("service_id");
|
|
||||||
if ($this->Get("id") != null)
|
|
||||||
{
|
|
||||||
$sOql = $sOql." AND ccs.sla_id!=:sla_id";
|
|
||||||
$aQueryParams['sla_id'] = $this->Get("id");
|
|
||||||
}
|
|
||||||
$oQuery = DBSearch::FromOQL($sOql, $aQueryParams);
|
|
||||||
$oResultSql = new DBObjectSet($oQuery);
|
|
||||||
$oResultSql->OptimizeColumnLoad(['ccs' => ['customercontract_name','service_name']]);
|
|
||||||
if ($aCurrentRow = $oResultSql->Fetch())
|
|
||||||
{
|
|
||||||
$this->m_aCheckIssues[] = Dict::Format('Class:SLA/Error:UniqueLnkCustomerContractToService',$aCurrentRow->Get('customercontract_name'),$aCurrentRow->Get('service_name'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]]></code>
|
|
||||||
</method>
|
|
||||||
</methods>
|
|
||||||
<presentation>
|
<presentation>
|
||||||
<details>
|
<details>
|
||||||
<items>
|
<items>
|
||||||
|
|||||||
@@ -1208,12 +1208,13 @@ EOF
|
|||||||
'base/layouts/navigation-menu/menu-node'
|
'base/layouts/navigation-menu/menu-node'
|
||||||
);
|
);
|
||||||
|
|
||||||
// Important: Mind the back ticks to avoid line breaks to break the JS
|
$MenuNameEscaped = utils::HtmlEntities($aValues['name']);
|
||||||
$oPage->add_script(<<<JS
|
// Important: Mind the back ticks to avoid line breaks to break the JS
|
||||||
|
$oPage->add_script(<<<JS
|
||||||
$('body').trigger('add_shortcut_node.navigation_menu.itop', {
|
$('body').trigger('add_shortcut_node.navigation_menu.itop', {
|
||||||
parent_menu_node_id: '{$sMenuGroupId}',
|
parent_menu_node_id: '{$sMenuGroupId}',
|
||||||
new_menu_node_html_rendering: `{$sHtml}`,
|
new_menu_node_html_rendering: `{$sHtml}`,
|
||||||
new_menu_name: `{$aValues['name']}`
|
new_menu_name: `{$MenuNameEscaped}`
|
||||||
});
|
});
|
||||||
JS
|
JS
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user