# iTop 2.7 版本变化

• 插件结构的变化
• 唯一性检查功能
• 新特性的使用场景
• 一些函数的变化

## 插件结构变化

The concept of extension is introduced with iTop 2.4. An extension is an assembly of one or more module(s). The installation options proposed to the end-user during the setup are based on the extensions found in the “extensions” folder of iTop; For backward compatibility, if a module is found outside of an extension, this module will be directly listed as an installation option.

itophub.io/wiki

### extension.xml

An XML definition file, used by iTop 2.4 and above. This file contains some information similar to the module PHP file, but enables the support of extensions containing several modules. If the module is located inside a folder already containing an extension.xml file (in the parent folder), the content of this file is ignored.

## 唯一性检查功能

Since： 2.6

• Class Brand, field name must be unique.
• Class Model, fields: name + brand_id must be unique.
• Class Person, fields: org_id + employee_number must be unique only if employee_id is defined.
• Class Person, fields: org_id + first_name + name should be unique (warning only).

## 对象更新，对象删除触发器

Since: 2.6

### 兼容性

• TriggerOnUpdate 不支持 exclude_code，需要确认是否有影响。原插件经过定制支持 exclude_code

### 注意

xx_list 类型的属性可以被 TriggerOnUpdate 跟踪，但只能在对应对象里，如果编辑了其 lnk 类，或者编辑的是 lnk 类另一端的对象，虽然都会引起 xx_list 的变化，但并不会触发 TriggerOnUpdate

Be aware that if you set a TriggerOnUpdate on class Team for field members_list,

• the trigger will occur only if the list of members is modified from the Team object
• On the opposite, if you edit a person and add or remove it from the Team, the above trigger will not be activated, also the members_list was modified.
• If a DataSynchro or a CSV import load directly objects lnkPersonToTeam, again the trigger will not be activated, unless the load of lnkPersonToTeam is done through a synchro/import of Team

### 取值

• As for every Trigger, when you specify a filter you can use :this→attribute_code and it contains the value after the change.
• In the filter of a TriggerOnDelete the values of the current object can still be tested

### TriggerOnUpdate 其他注意事项

• 省略跟踪属性时任何变更都会触发
• 多个属性是任意一个属性变更都会触发，但是如果两个属性都变更了，只会触发一次
• 可用于 Caselog 但是不建议这么用，应该用更专业的触发器比如 TriggerOnLogUpdateTriggerOnEmailUpdate 等
• 当使用 TriggerOnUpdate 时应在配置文件中设置 email_asynchronous=true，as a CSV import, a bulk update can generate a lot of emails and impact the performances

## 函数变化

Since: 2.7

### 跟踪对象变化，或者变化前的值

• \iApplicationObjectExtension::OnDBUpdate
• \DBObject::AfterUpdate

### DBSearch::AllowAllData

itop-request-template 中用到了。

## API变化

Since: 2.6.1

Core/Get 分页支持 supports two new parameters :

limit (int): Amount of results to return (default: 0 = no limit)
page (int): Page number to return (cannot be < 1)
Example :

Since: 2.7

## 其他新特性和变化

Since：2.6

### Dashboard Attribute

Since: 2.6

AttributeDashboard 给对象详情页增加一个 Dashboard. 比如给组织对象增加一个显示本组织资源和工单情况的 Dashboard。

Since: 2.7

Since: 2.7

Since: 2.7

Since: 2.7

### 认证API

Since: 2.7

Starting with version 2.7.0, it is now much easier to add new authentication methods in order to connect to iTop.

Some are new 2.7 possibilities which must be coded using the iTop authentication API:

• SAML (45 parameters)
• Multiserver LDAP

Since: 2.7

Since: 2.7

Since: 2.7