Outdated documentation

You are looking at the documentation for an older release. For the latest information, please see current release documentation.

管理员界面

本软件包没有管理员界面。

注解

This feature is only available to On-Premise customers. If you are a Managed customer, this feature is taken care of by the Customer Solutions Team in OTRS. Please contact us via support@otrs.com or in the OTRS Portal.

系统配置

本软件包不是开箱即用的,必须首先由管理员进行配置。

  1. 转到 系统配置 屏幕。
  2. 导航 小部件中选择 OTRSDeleteAttachments
  3. 导航到导航树中的 Core → Ticket
  4. 添加一些文件 MIME 类型到设置 OTRSDeleteAttachments::Filetypes 的键值对。键是 MIME 类型,值是删除标志。
    • 0:此类型的附件不可删除。
    • 1:此类附件将被删除。
File Types Setting

文件类型设置

自动文件类型填充

有一个控制台命令 Maint::Ticket::Attachment::AddMIMETypes 可以自动填充系统配置设置。

otrs> /opt/otrs/bin/otrs.Console.pl Maint::Ticket::Attachment::AddMIMETypes
Searching attachment types received the last 90 days...
|       Added undefined MIME type: application/x-yaml
|       Added undefined MIME type: image/png
|       Added undefined MIME type: text/html
|       Added undefined MIME type: application/pdf
|       Added undefined MIME type: text/plain
Updating SysConfig...
Done.

注解

该控制台命令只收集在最近90天内接收到的、已关闭工单的附件的MIME类型。

从工单中删除附件

附件删除是通过控制台命令 Maint::Ticket::Attachment::Delete 执行的。检查以下设置以自定义作业:

OTRSDeleteAttachments::Queues

由控制台命令 Maint::Ticket::Attachment::Delete 处理的队列列表(通过名称指定)。

警告

如果没有定义队列,所有队列都会受到影响。

OTRSDeleteAttachments::TimeSpan
The starting time (in days) from the current date from which the tickets should be analyzed for deletion.
OTRSDeleteAttachments::TimePeriod
The end time (in days) from the current date up to which the tickets should be analyzed for deletion.

Example:

TimeSpan: 10
TimePeriod: 40
                           Eligible  tickets
              |=========================================|
                                                        |=============|
                            TimePeriod (40)              TimeSpan (10)
|-------------|-------------|-------------|-------------|-------------|
50 days ago   40 days ago   30 days ago   20 days ago   10 days ago   Today
                                                        |
                                                       \ /
                                                Ticket close time

Means that all tickets between 10 days ago from the current date and 40 days ago from the current date are analyzed for deletion.

注解

The value of TimePeriod must be always higher than the value of TimeSpan.

参见

控制台命令 Maint::Ticket::Attachment::Delete 还有其它一些选项。 运行带有 --help 选项的命令以查看可能性。

otrs> /opt/otrs/bin/otrs.Console.pl Maint::Ticket::Attachment::Delete --help

自动执行

OTRS守护进程可以在后台运行更新文件类型和删除附件。 启用以下设置以定期运行作业:

Daemon::SchedulerCronTaskManager::Task###OTRSDeleteAttachments
从工单中删除附件。
Daemon::SchedulerCronTaskManager::Task###OTRSDeleteAttachments_AddMIMETypes
填充用于删除附件的系统配置MIME类型。

注解

不要忘记在更改系统配置之后重新启动OTRS守护进程。