GenericAgent Job on undefined Dynamic field criteria

Moderator: crythias

Locked
adminrd
Znuny newbie
Posts: 39
Joined: 29 Aug 2013, 15:14
Znuny Version: 5.0.9

GenericAgent Job on undefined Dynamic field criteria

Post by adminrd »

Hi all,

I configured a new job for my generic agent like this:

Code: Select all

%Jobs = (
    # --
    # [name of job] -> send reminder emails to agents
    # --
    'send reminder emails to agents' => {
        # get all tickets with these properties
        Queue => 'Misc',
        States => ['new', 'open'],
        SLA => 'SLA24/7',
        DynamicField_SLA247 => {
            Equals => 'O',
        },
        DynamicField_Intervention => {
            Equals => [ 'Problem','Crash', undef ],
        },
        # new ticket properties (no option is required,
        # use just the options which should be changed!)
        New => {
            # if you want to add a Note
            Note => {
                From => 'GenericAgent',
                Subject => 'Mail to hotline',
                Body => 'Ticket with SLA',
                ArticleType => 'note-internal',
            },
        },
    },
    # --
);
What is WRONg is this part:

Code: Select all

 DynamicField_Intervention => {
            Equals => [ 'Problem','Crash', undef ],
        },
because of "undef" doesn't match when ticket doesn't have the DynamicField_Intervention filled.
I tried also

Code: Select all

 DynamicField_Intervention => {
            Equals => [ 'Problem','Crash', '' ],
        },
OR

Code: Select all

 DynamicField_Intervention => {
            Equals => [ 'Problem','Crash', '-' ],
        },
But it still doesn't work

Can you help me please
Thanks in advance
Locked