历史数据归档

目的:当过时的数据开始代表比活动的数据大得多时,改进搜索性能。

启用存档

默认情况下,任何类都不启用它。它只能在数据模型的根类(如FunctionalCI,联系人,工单)上激活。有关详细信息,请参见XML引用。

 <classes>
    <class id="Ticket">
      <properties>
        <archive _delta="define">
          <enabled>true</enabled>
        </archive>
      </properties>
    </class>
  </classes>

允许类的对象进行归档在用户界面上没有直接的影响度,直到一个模块将能力提供给归档并取消归档对象。

部署模块简单的数据存档器 为管理员启用工单和能力的存档以手动归档旧工单

如果要每隔工单和已关闭以上的归档使用归档,则可以开发一个模块来执行此操作。该模块尚不存在。

归档模块的API

  DBSearch::DBBulkArchive()
  DBSearch::DBBulkUnarchive()
  DBSearch::DBBulkWriteArchiveFlag.

用户体验

在标准模式下

对于包括管理员在内的所有用户,所有已归档的对象都是隐藏的,就像被删除一样。

指向其友好名称的引用可以在指向它们的其他对象中找到。归档的联系人的示例,它是未归档的变更的提交人。Toggling menu

如您所见,该链接处于非活动状态,您无法打开提交人详细信息。

在它们所链接或链接到的其他对象的历史记录中,您只需获取已存档的对象的ID:

https://www.itophub.io/wiki/media?w=600&tok=872166&media=2_7_0%3Afeature%3Aarchivehistoryexternalkey.png

如果您尝试使用添加了书签的网址或构建网址的方式打开该已归档对象的详细信息,请执行以下操作:http://myitop/pages/UI.php?operation=details&class=Person&id=11&

Archived object not visible

存档对象时,也将其与其他对象的所有n:n链接也存档,这意味着它们不再可见

在归档模式下

您可以切换归档模式:

Activate archive mode

  • 在存档模式下,您会看到橙色的标签,以提醒您已将其激活。
  • 所有对象都是只读的
  • 可见已归档的对象,并将其标记为已归档

Archived object visible

  • 可单击引用已归档对象的属性:

External Key to an archived object in archived mode

如果在存档的对象上停用归档模式:

https://www.itophub.io/wiki/media?w=200&tok=c9399e&media=2_7_0%3Afeature%3Aarchivetogglemenudesactivate.png

您会再次收到反馈消息

Archived object not visible

问题与解答

题:菜单“激活归档模式”不可用吗?
回答:必须至少对一个类启用存档。
如果您是通过安装程序,移动到测试,移动到生产或iTop Hub扩展安装完成的,请确保清空Web浏览器缓存,因为这是一个已知问题。

原贴链接:https://www.itophub.io/wiki/page?id=2_7_0%3Afeature%3Aarchiving


Archiving

Purpose: Improve search performance when your outdated data start to represent much more than the active ones.

Enabling Archiving

It is not enabled by default on any class. It can be activated only on root classes in the Data Model, classes such as FunctionalCI, Contact, Ticket. See the XML reference for details.

  <classes>
    <class id="Ticket">
      <properties>
        <archive _delta="define">
          <enabled>true</enabled>
        </archive>
      </properties>
    </class>
  </classes>

Allowing objects of a class to be archived has no direct impact on the user interface, until a module provides the capability to archive and unarchive an object.

Deploy the module Simple Data Archiver to enable the archiving of Ticket and the capability for admin to manually archive old tickets

If you want to archive every ticket closed and older than two years, then a module can be developed to do this. This module does not yet exist.

API for an archiving module

  DBSearch::DBBulkArchive()
  DBSearch::DBBulkUnarchive()
  DBSearch::DBBulkWriteArchiveFlag.

User experience

In standard mode

All archived objects are hidden, for all users including admins, like if they were deleted.

A reference to their friendly name can be found in other objects pointing to them. Example on an archived contact which is the caller of a non-archived Change.
Toggling menuAs you can see the link is inactive, you can't open the caller details.

In the history of other objects to which they are or were linked, you just get the id of that archived object: https://www.itophub.io/wiki/media?w=600&tok=872166&media=2_7_0%3Afeature%3Aarchivehistoryexternalkey.png

If you try to open the details of that archived object using a bookmarked url or building the url like this: http://myitop/pages/UI.php?operation=details&class=Person&id=11&

Archived object not visible

When an object is archived, all its n:n linkages to other objects are archived as well, meaning that they aren't visible anymore

in Archive mode

You can toggle the archive mode: Activate archive mode

  • In archived mode, you have a orange tag to remind you that you have activated it.

  • All objects are read-only

  • Archived objects are visible and tagged as archived

Archived object visible

  • An attribute referencing an archived object is clickable:

External Key to an archived object in archived mode

If you desactivate archive mode while you are on an archived object: https://www.itophub.io/wiki/media?w=200&tok=c9399e&media=2_7_0%3Afeature%3Aarchivetogglemenudesactivate.png

you get again the feedback message

Archived object not visible

Question & Answers

Question: The menu “Activate archive mode” is not available?
Answer: Archiving must be enabled on at least, one class.
If you have just done it though a Setup, Move To Test, Move To Production or iTop Hub extension installation, be sure to empty your web browser cache, as this is a known issue.

标签:
由 superadmin 在 2020/08/25, 16:11 创建
    

需要帮助?

如果您需要有关XWiki的帮助,可以联系:

深圳市艾拓先锋企业管理咨询有限公司