Ticket filtering in GenericAgent non properly working?

Moderator: crythias

Locked
Treuz
Znuny newbie
Posts: 10
Joined: 23 Jun 2014, 13:13
Znuny Version: 5.0.2

Ticket filtering in GenericAgent non properly working?

Post by Treuz »

Hello all,

i'm trying to find tickets that are not been updated in the last X days. In order to do that i created a new Dynamic Field called "changedwithinXdays" of type Multiselect with two values "YES" and "NO", as stated in this post: http://lists.otrs.org/pipermail/otrs/20 ... 39800.html

Then i created 2 GenericAgent jobs:
- a "YES-setter" job that filters "Ticket changed whitin the last X days" that sets my DynamicField to "YES"
- a "NO-setter" job that filters "Ticket changed more than X days ago" that sets DynamicField to "NO"

The problem is that both jobs return to me all tickets as a result, despite the fact that one filter is the opposite of the other one.

Do you know if these filters are working properly? Am i missing something?

Thank you,
Treuz
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Ticket filtering in GenericAgent non properly working?

Post by crythias »

Generic Agent change before 2 days ago and dynamic field value = "Yes" change dynamic field to "No"
Generic Agent change last 2 days and dynamic field value = "No" change dynamic field to "Yes"
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Treuz
Znuny newbie
Posts: 10
Joined: 23 Jun 2014, 13:13
Znuny Version: 5.0.2

Re: Ticket filtering in GenericAgent non properly working?

Post by Treuz »

crythias wrote:Generic Agent change before 2 days ago and dynamic field value = "Yes" change dynamic field to "No"
Generic Agent change last 2 days and dynamic field value = "No" change dynamic field to "Yes"
Thanks for your answer but i think you are moving too forward, i'm not yet able to set the values of dynamic fields, that's the problem: the filter "change before X days ago" doesn't return me the right results.

The best workaround i found is to write a MySQL query with the Date/Time functions and execute it from command-line
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Ticket filtering in GenericAgent non properly working?

Post by crythias »

Treuz wrote:Thanks for your answer but i think you are moving too forward, i'm not yet able to set the values of dynamic fields, that's the problem: the filter "change before X days ago" doesn't return me the right results.

The best workaround i found is to write a MySQL query with the Date/Time functions and execute it from command-line
Can't replicate doesn't return the right results. OTRS version might be of interest, screenshots of relevant settings may help.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Treuz
Znuny newbie
Posts: 10
Joined: 23 Jun 2014, 13:13
Znuny Version: 5.0.2

Re: Ticket filtering in GenericAgent non properly working?

Post by Treuz »

crythias wrote:
Treuz wrote:Thanks for your answer but i think you are moving too forward, i'm not yet able to set the values of dynamic fields, that's the problem: the filter "change before X days ago" doesn't return me the right results.

The best workaround i found is to write a MySQL query with the Date/Time functions and execute it from command-line
Can't replicate doesn't return the right results. OTRS version might be of interest, screenshots of relevant settings may help.
I'm using otrs 3.3.7 on CentOS.

There are some screenshot:
01_tickets.png

This is my ticket queue
02_yes_setter.png
This is the filter for the "YES-setter" job
03_no_setter.png
This is the filter for the "NO-setter" job
You do not have the required permissions to view the files attached to this post.
Treuz
Znuny newbie
Posts: 10
Joined: 23 Jun 2014, 13:13
Znuny Version: 5.0.2

Re: Ticket filtering in GenericAgent non properly working?

Post by Treuz »

04_run_job.png
and this is the run job screen, as you can see the filter is not working since the job has found 19 affected tickets.

No matter if i run the YES or NO-setter job, the number of affected ticket is still 19.

Thank you.
You do not have the required permissions to view the files attached to this post.
Locked