[SOLVED]Disable Reply button on ticket zoom screen
Moderator: crythias
-
- Znuny newbie
- Posts: 11
- Joined: 02 Jan 2013, 19:03
- Znuny Version: 3.1.6
- Real Name: Long Nguyen
- Company: CyberWolf
[SOLVED]Disable Reply button on ticket zoom screen
Hi all,
My situation is as follow: If an agent go into the ticket zoom screen and is the owner of the ticket, then he/she can use Reply button to send feedback to customer. However, if that agent is not the owner of the ticket but only Responsible for it then the Reply button is disable (or removed) so that agent can only add internal note to others (without the ability to contact customer).
Could anyone can help me with that? Thanks a lot in advance.
Thanks and Best regards,
Long
My situation is as follow: If an agent go into the ticket zoom screen and is the owner of the ticket, then he/she can use Reply button to send feedback to customer. However, if that agent is not the owner of the ticket but only Responsible for it then the Reply button is disable (or removed) so that agent can only add internal note to others (without the ability to contact customer).
Could anyone can help me with that? Thanks a lot in advance.
Thanks and Best regards,
Long
Last edited by longnguyenotrs on 03 Jan 2013, 16:17, edited 1 time in total.
Re: Disable Reply button on ticket zoom screen for Responsib
thats not possible.
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
-
- Znuny newbie
- Posts: 11
- Joined: 02 Jan 2013, 19:03
- Znuny Version: 3.1.6
- Real Name: Long Nguyen
- Company: CyberWolf
Re: Disable Reply button on ticket zoom screen for Responsib
Thanks for your feedback jojo. Could it be done by code? Thanks in advance.jojo wrote:thats not possible.
-
- Znuny guru
- Posts: 5018
- Joined: 13 Mar 2011, 09:54
- Znuny Version: 6.0.x
- Real Name: Renée Bäcker
- Company: Perl-Services.de
- Contact:
Re: Disable Reply button on ticket zoom screen for Responsib
Sure... you can do (nearly) everything with some programming.
Hint: In AgentTicketZoom.pm you'll find You have to set $Access to 0 if the current User (hint 2: current user id is stored in $Self->{UserID}) is just the Responsible...
Hint: In AgentTicketZoom.pm you'll find
Code: Select all
my $Access = 1;
my $Config = $Self->{ConfigObject}->Get('Ticket::Frontend::AgentTicketCompose');
if ( $Config->{Permission} ) {
my $Ok = $Self->{TicketObject}->TicketPermission(
Type => $Config->{Permission},
TicketID => $Ticket{TicketID},
UserID => $Self->{UserID},
LogNo => 1,
);
if ( !$Ok ) {
$Access = 0;
}
}
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
-
- Znuny newbie
- Posts: 11
- Joined: 02 Jan 2013, 19:03
- Znuny Version: 3.1.6
- Real Name: Long Nguyen
- Company: CyberWolf
Re: Disable Reply button on ticket zoom screen for Responsib
Thanks a lot for your help reneeb. However, as per your instruction, I understood that we must always set some user ID as Responsible (by that, when checking user ID, we will know that user ID is Responsible or Owner). But an user ID can be owner of this ticket and at the same time the Responsible for other ticket. Could you help me how to check whether the current agent is an Owner or not? Thanks in advance.reneeb wrote:Sure... you can do (nearly) everything with some programming.
Hint: In AgentTicketZoom.pm you'll findYou have to set $Access to 0 if the current User (hint 2: current user id is stored in $Self->{UserID}) is just the Responsible...Code: Select all
my $Access = 1; my $Config = $Self->{ConfigObject}->Get('Ticket::Frontend::AgentTicketCompose'); if ( $Config->{Permission} ) { my $Ok = $Self->{TicketObject}->TicketPermission( Type => $Config->{Permission}, TicketID => $Ticket{TicketID}, UserID => $Self->{UserID}, LogNo => 1, ); if ( !$Ok ) { $Access = 0; } }
-
- Znuny guru
- Posts: 5018
- Joined: 13 Mar 2011, 09:54
- Znuny Version: 6.0.x
- Real Name: Renée Bäcker
- Company: Perl-Services.de
- Contact:
Re: Disable Reply button on ticket zoom screen for Responsib
Code: Select all
my $Access = 1;
my $Config = $Self->{ConfigObject}->Get('Ticket::Frontend::AgentTicketCompose');
if ( $Config->{Permission} ) {
my $Ok = $Self->{TicketObject}->TicketPermission(
Type => $Config->{Permission},
TicketID => $Ticket{TicketID},
UserID => $Self->{UserID},
LogNo => 1,
);
if ( !$Ok ) {
$Access = 0;
}
}
if (
$Ticket{OwnerID} != $Self->{UserID} # user is not owner of the ticket
&& $Ticket{ResponsibleID} # a responsible person is set
&& $Ticket{ResponsibleID} == $Self->{UserID} # that responsible person is the current user
) {
$Access = 0;
}
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
-
- Znuny newbie
- Posts: 11
- Joined: 02 Jan 2013, 19:03
- Znuny Version: 3.1.6
- Real Name: Long Nguyen
- Company: CyberWolf
Re: Disable Reply button on ticket zoom screen for Responsib
Thanks a lot for your help reneeb. It worked nice.reneeb wrote:Code: Select all
my $Access = 1; my $Config = $Self->{ConfigObject}->Get('Ticket::Frontend::AgentTicketCompose'); if ( $Config->{Permission} ) { my $Ok = $Self->{TicketObject}->TicketPermission( Type => $Config->{Permission}, TicketID => $Ticket{TicketID}, UserID => $Self->{UserID}, LogNo => 1, ); if ( !$Ok ) { $Access = 0; } } if ( $Ticket{OwnerID} != $Self->{UserID} # user is not owner of the ticket && $Ticket{ResponsibleID} # a responsible person is set && $Ticket{ResponsibleID} == $Self->{UserID} # that responsible person is the current user ) { $Access = 0; }