[SOLVED] Disable Reply button on notes

Moderator: crythias

Post Reply
LoC
Znuny newbie
Posts: 5
Joined: 18 Jul 2023, 16:48
Znuny Version: 7.0.7
Real Name: Klaus

[SOLVED] Disable Reply button on notes

Post by LoC »

Hello,

we want to disable the reply button for the article type "note". How can we achieve this?
disablereply_znuny.png
- I tried ACLs and can disable the reply button for specific users, but not for the article type "note".
- I also thought to change the source code, but couldn't find the corresponding file.

Have someone an idea and can help?

Thanks in advance.
You do not have the required permissions to view the files attached to this post.
Last edited by LoC on 29 Aug 2023, 10:51, edited 1 time in total.
root
Administrator
Posts: 3968
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Disable Reply button on notes

Post by root »

Hi,

By searching the code you were probably right, my guess is you haven't search for 'Reply to note' but the German translation?

Anyway, here's how to do this:

1.) Copy Kernel/Output/HTML/ArticleAction/AgentTicketNote.pm to Custom/Kernel/Output/HTML/ArticleAction/AgentTicketNote.pm
2.) Modify the function GetConfig and add an early return like this:
SCR-20230719-hwtx.png
3.) I strongly recommend packing this change and observing the file at least with every minor release (7.x.y) if something changes.

- Roy
You do not have the required permissions to view the files attached to this post.
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 ?
LoC
Znuny newbie
Posts: 5
Joined: 18 Jul 2023, 16:48
Znuny Version: 7.0.7
Real Name: Klaus

Re: Disable Reply button on notes

Post by LoC »

Thanks for the very fast reply.

The "Reply to note" button is disabled now. I also need to disable the Reply Dropdown (I think it is AgentTicketCompose).

I tried to modify the AgentTicketCompose.pm and added:

Code: Select all

if ( $Param{ChannelName} eq 'Internal') {
        # skip email notifications
        return;
}
It works nearly as wanted. But when a ticket is created or updated via the customer portal it is as well marked as "Internal", so I can't reply to the original ticket as well. Is there a way to find out the possible parameters of "Article" (or other useful parameters) to enhance my if-clause?
LoC
Znuny newbie
Posts: 5
Joined: 18 Jul 2023, 16:48
Znuny Version: 7.0.7
Real Name: Klaus

Re: Disable Reply button on notes

Post by LoC »

Has anyone another idea?

Unfortunately it is still not working as requested :(
root
Administrator
Posts: 3968
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Disable Reply button on notes

Post by root »

LoC wrote: 26 Jul 2023, 11:45 Has anyone another idea?

Unfortunately it is still not working as requested :(
When you responded, "The "Reply to note" button is disabled now" I thought your initial request was solved. Isn't that the case?

If you wan't the reply dropdown not used/empty just unassign all reply templates.

- 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 ?
LoC
Znuny newbie
Posts: 5
Joined: 18 Jul 2023, 16:48
Znuny Version: 7.0.7
Real Name: Klaus

Re: Disable Reply button on notes

Post by LoC »

Maybe it was a communication mistake from my side.

The initial request was ment to disable the Reply button (dropdown) for the articel type "note", e. g. for the owner change. When the owner is changed, you are able to answer to this "note". I want to disable it, so that my coworkers are not able to answer to a owner change message.

Maybe it is more clear now?

When I unassign the templates, it will be disable for every article.
skullz
Znuny superhero
Posts: 624
Joined: 24 Feb 2012, 03:58
Znuny Version: LTS and Features
Real Name: Mo Azfar
Location: Kuala Lumpur, MY
Contact:

Re: Disable Reply button on notes

Post by skullz »

Why not disabled the note creation upon ticket owner update?

Code: Select all

Ticket::Frontend::AgentTicketOwner###Note
LoC
Znuny newbie
Posts: 5
Joined: 18 Jul 2023, 16:48
Znuny Version: 7.0.7
Real Name: Klaus

Re: Disable Reply button on notes

Post by LoC »

That's it!

Thank you very much. I've searched the config section so often, but sometimes it's too often.
Post Reply