如何在OTRS 5中使用动态字段搜索故障单 - 休息

时间:2017-12-18 16:04:19

标签: rest otrs

我坚持如何通过Dynamic Field搜索所有门票。

1 个答案:

答案 0 :(得分:1)

以这种方式使用API​​:

my @TicketIDs = $TicketObject->TicketSearch(
  Result => 'ARRAY',

  # DynamicFields
  #   At least one operator must be specified. Operators will be connected with AND,
  #       values in an operator with OR.
  #   You can also pass more than one argument to an operator: ['value1', 'value2']
  DynamicField_FieldNameOfYourDynamicField => {
    Equals            => 123,
    Like              => 'value*',                # "equals" operator with wildcard support
    GreaterThan       => '2017-01-01 01:01:01',
    GreaterThanEquals => '2017-01-01 01:01:01',
    SmallerThan       => '2020-02-02 02:02:02',
    SmallerThanEquals => '2020-02-02 02:02:02',
  }

  # user search (UserID is required)
  UserID     => 123,
  Permission => 'ro' || 'rw',
);