API search for escalated tickets within last 30 days [SOLVED]

Moderator: crythias

Locked
rvaldomir
Znuny expert
Posts: 155
Joined: 04 Aug 2014, 23:59
Znuny Version: 3.3.8
Real Name: Roberto A. Valdomir

API search for escalated tickets within last 30 days [SOLVED]

Post by rvaldomir »

Hi,

How to get the escalated tickets within the last 30 days?

the API has those options to search escalated tickets:
# you can use all following escalation options with this four different ways of escalations
# TicketEscalationTime...
# TicketEscalationUpdateTime...
# TicketEscalationResponseTime...
# TicketEscalationSolutionTime...

# ticket escalation time of more than 60 minutes ago (optional)
TicketEscalationTimeOlderMinutes => -60,
# ticket escalation time of less than 120 minutes ago (optional)
TicketEscalationTimeNewerMinutes => -120,

# tickets with escalation time after ... (optional)
TicketEscalationTimeNewerDate => '2006-01-09 00:00:01',
# tickets with escalation time before ... (optional)
TicketEscalationTimeOlderDate => '2006-01-09 23:59:59',
which option do I have to add to the following code to also filter tickets escalated if solution time is overdue?

Code: Select all

    my $DRSolutuionOverDueTickets = $Self->{TicketObject}->TicketSearch(
        # result (required)
        Result => 'COUNT',

        DynamicField_TicketEnvironment => {
               Equals => '7',
        },

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

        #Newers than 30 days
        TicketChangeTimeNewerMinutes => 43200,

        # customer search (CustomerUserID is required)
        CustomerUserID => $Self->{UserID},
        Permission     => 'ro',

        );
Last edited by rvaldomir on 15 Jul 2015, 01:00, edited 1 time in total.
​Roberto A. Valdomir
Mobile: (+598) 93 868 147 | Skype: roberto.a.valdomir
@roberto.valdomir | re.vu/robertovaldomir

----------------------------------------------------------------------------------------
OTRS 3.3.8 | RHEL 6 x64 | Oracle 11g | Custom Development by OTRS365
rvaldomir
Znuny expert
Posts: 155
Joined: 04 Aug 2014, 23:59
Znuny Version: 3.3.8
Real Name: Roberto A. Valdomir

Re: API search for escalated tickets within last 30 days

Post by rvaldomir »

solved

TicketEscalationSolutionTime + OlderMinutes
​Roberto A. Valdomir
Mobile: (+598) 93 868 147 | Skype: roberto.a.valdomir
@roberto.valdomir | re.vu/robertovaldomir

----------------------------------------------------------------------------------------
OTRS 3.3.8 | RHEL 6 x64 | Oracle 11g | Custom Development by OTRS365
Locked