[SOLVED] Set owner ...but keep unlocked

Moderator: crythias

Locked
HervE
Znuny wizard
Posts: 391
Joined: 03 Jan 2011, 17:15
Znuny Version: 3.3.8
Location: France

[SOLVED] Set owner ...but keep unlocked

Post by HervE »

Hello,

Is it possible to automatically set as owner of the ticket the agent who answers it?

I have seen this parameter in SysConfig:
Ticket -> Frontend::Agent::Ticket::ViewCompose
Ticket::Frontend::AgentTicketCompose###RequiredLock
Default value: Yes
Defines if a ticket lock is required in the ticket compose screen of the agent interface (if the ticket isn't locked yet, the ticket gets locked and the current agent will be set automatically as its owner).


The problem is that I don't ever want the ticket to be locked, so I have changed this parameter to No.
Is it still possible to automatically set the owner though? And how?

Regards,
HervE
Last edited by HervE on 11 Mar 2011, 11:49, edited 1 time in total.
OTRS 3.3.8 - Windows 7 - IIS7 - SQL Server - Firefox 30
iztok
Znuny newbie
Posts: 83
Joined: 06 Jan 2011, 14:28
Znuny Version: 3

Re: Set owner ...but keep unlocked

Post by iztok »

You can automate this via GenericAgent.
HervE
Znuny wizard
Posts: 391
Joined: 03 Jan 2011, 17:15
Znuny Version: 3.3.8
Location: France

Re: Set owner ...but keep unlocked

Post by HervE »

Hmm... GenericAgent? Maybe. But how?
From what I can see, GenericAgent only allows me to set a definite owner, not to set "the agent who answered the last".

Moreover, GenericAgent will be launched at best every 10 minutes, whereas I'd like the action to happen at the moment the agent answers the ticket.

HervE
OTRS 3.3.8 - Windows 7 - IIS7 - SQL Server - Firefox 30
iztok
Znuny newbie
Posts: 83
Joined: 06 Jan 2011, 14:28
Znuny Version: 3

Re: Set owner ...but keep unlocked

Post by iztok »

This is what I use. I think you can modify genericagent to launch every minute via cron. But isn't working for me except every 10 minutes. I cannot help you further :)
HervE
Znuny wizard
Posts: 391
Joined: 03 Jan 2011, 17:15
Znuny Version: 3.3.8
Location: France

Re: Set owner ...but keep unlocked

Post by HervE »

I found out!
In Kernel\Modules\AgentTicketCompose.pm, sub Run(), I just need to move the following block

Code: Select all

	my $Owner = $Self->{TicketObject}->TicketOwnerSet(
		TicketID  => $Self->{TicketID},
		UserID    => $Self->{UserID},
		NewUserID => $Self->{UserID},
	);
out of the RequiredLock condition.

(Edited) Same thing goes for Kernel\Modules\AgentTicketPhoneOutbound.pm.

HervE
OTRS 3.3.8 - Windows 7 - IIS7 - SQL Server - Firefox 30
Locked