SQL query performed by Generic Agent

Moderator: crythias

Post Reply
ugob
Znuny newbie
Posts: 52
Joined: 29 Jul 2011, 22:15
Znuny Version: 3.0

SQL query performed by Generic Agent

Post by ugob »

Hi,

Is it possible for the Generic Agent to execute SQL statements on the OTRS DB?
Thanks,
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: SQL query performed by Generic Agent

Post by root »

Hi,

No this can't be done with the Generic Agent.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
ugob
Znuny newbie
Posts: 52
Joined: 29 Jul 2011, 22:15
Znuny Version: 3.0

Re: SQL query performed by Generic Agent

Post by ugob »

Ok, my need is to be able to change an admin setting automatically. We are two persons managing one OTRS queue. To make sure we receive all replies, we have created a Generic Agent tasks that puts person1 as owner and person2 as responsible upon TicketCreate.

To spread the load, we have determined that half of the time, person1 will be owner and person2 responsible and the other half it would be the opposite. We have to make this change manually.

I'm looking for a way so that I can change the settings automatically at the beginning of a time period. Unless the Generic Agent can honor both automatic execution (cron-like) and Event-based (we use TicketCreate).
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: SQL query performed by Generic Agent

Post by root »

Hi,

I don't see a chance to get this done without some development. I recommend creating a customer Generic Agent module which check if the ticket id is even or odd and assigns the one or the other combination.

- Roy

P.S.: Manipulating (=writing into) the application database is never recommended because you completely ignore the caching mechanism.
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
ugob
Znuny newbie
Posts: 52
Joined: 29 Jul 2011, 22:15
Znuny Version: 3.0

Re: (solved) SQL query performed by Generic Agent

Post by ugob »

Ok, thanks,
Post Reply