ACL to restrict next ticket state

Moderator: crythias

Post Reply
aph
Znuny superhero
Posts: 646
Joined: 20 Jun 2014, 12:11
Znuny Version: 3.3.9, 4.x, 5.x

ACL to restrict next ticket state

Post by aph »

I would like to restrict the available options in the field 'next ticket state' based on a dynamic field value on the AgentTicketCompose screen. Bascially, I want to prevent agents from being able to close a ticket if a dynamic field does not have a certain value.

I came across this problem in the past and used a work around to hide the close button based on the value of a dynamic field. viewtopic.php?f=62&t=30068.
This solution does not work in this case.

How should the ACL built so that certain values are restricted in the next ticket state? What is the parameter name for 'next ticket state'? I tried both 'state' and 'stateID', yet no luck. Below is my ACL
Unbenannt_196.PNG
You do not have the required permissions to view the files attached to this post.
OTRS 3.3.x (private/testing) on Windows Server 2008 with MSSQL database.
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
RStraub
Znuny guru
Posts: 2210
Joined: 13 Mar 2014, 09:16
Znuny Version: 6.0.14
Real Name: Rolf Straub

Re: ACL to restrict next ticket state

Post by RStraub »

Do you know that the filter catches correctly? You could start simple by filtering the dynamic field and forbid e.g. AgentTicketNote, that's easy to recognize.

For the State, I think it's case sensitive and the default has a lowercase "c" in closed.
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
aph
Znuny superhero
Posts: 646
Joined: 20 Jun 2014, 12:11
Znuny Version: 3.3.9, 4.x, 5.x

Re: ACL to restrict next ticket state

Post by aph »

I checked that the filter is correct. I filter for queue, for action AgentTicketCompose and for a dynamic field Kategorie. Based on this I can restrict possible values of another dynamic field Subkategorie.
Unbenannt_198.PNG
RStraub wrote:For the State, I think it's case sensitive and the default has a lowercase "c" in closed.
As you suggested I checked that the name of the state is correct (all state names in my configuration start with a capital letter)
EDIT: I think I'm just missing the correct parameter name for 'next ticket state'
You do not have the required permissions to view the files attached to this post.
OTRS 3.3.x (private/testing) on Windows Server 2008 with MSSQL database.
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: ACL to restrict next ticket state

Post by crythias »

aph wrote:I would like to restrict the available options in the field 'next ticket state' based on a dynamic field value on the AgentTicketCompose screen. Bascially, I want to prevent agents from being able to close a ticket if a dynamic field does not have a certain value.

I came across this problem in the past and used a work around to hide the close button based on the value of a dynamic field. viewtopic.php?f=62&t=30068.
This solution does not work in this case.

How should the ACL built so that certain values are restricted in the next ticket state? What is the parameter name for 'next ticket state'? I tried both 'state' and 'stateID', yet no luck. Below is my ACL
Unbenannt_196.PNG
next ticket state is State.
https://otrs.github.io/doc/api/otrs/sta ... et.pm.html

Look at the case in TicketGet above.
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
aph
Znuny superhero
Posts: 646
Joined: 20 Jun 2014, 12:11
Znuny Version: 3.3.9, 4.x, 5.x

Re: ACL to restrict next ticket state

Post by aph »

Well in that case can anyone explain why the ACL does not work. I do not have any other ACL that conflicts with this one.
OTRS 3.3.x (private/testing) on Windows Server 2008 with MSSQL database.
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: ACL to restrict next ticket state

Post by crythias »

Because Closed isn't a state? Because you don't have any possible not?
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
aph
Znuny superhero
Posts: 646
Joined: 20 Jun 2014, 12:11
Znuny Version: 3.3.9, 4.x, 5.x

Re: ACL to restrict next ticket state

Post by aph »

Closed is a state in my configuration. I do not understand what you mean by
crythias wrote:Because you don't have any possible not?
My ACL definition is:
Unbenannt_196.PNG
You do not have the required permissions to view the files attached to this post.
OTRS 3.3.x (private/testing) on Windows Server 2008 with MSSQL database.
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
aph
Znuny superhero
Posts: 646
Joined: 20 Jun 2014, 12:11
Znuny Version: 3.3.9, 4.x, 5.x

Re: ACL to restrict next ticket state

Post by aph »

Any ideas on this one?
OTRS 3.3.x (private/testing) on Windows Server 2008 with MSSQL database.
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
wurzel
Znuny guru
Posts: 3234
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: ACL to restrict next ticket state

Post by wurzel »

Hi,

can you show all your valid ticket states?

Flo
OTRS 8 SILVER (Prod)
OTRS 8 auf Debian 11 (Test)
Znuny 7.x latest version testing auf Debian 11

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
aph
Znuny superhero
Posts: 646
Joined: 20 Jun 2014, 12:11
Znuny Version: 3.3.9, 4.x, 5.x

Re: ACL to restrict next ticket state

Post by aph »

wurzel wrote:can you show all your valid ticket states?
The valid states are:

Code: Select all

Name
Closed (type closed)
In Progress (type open)
New (type new)
Open (type open)
Waiting for reply (type pending reminder)
merged (type merged)
removed (type removed)
OTRS 3.3.x (private/testing) on Windows Server 2008 with MSSQL database.
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
wurzel
Znuny guru
Posts: 3234
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: ACL to restrict next ticket state

Post by wurzel »

Hi,

can you try the match section without dynamic fields?
Only:

Properties -> Frontend -> Action -> AgentTicketCompose
PossibleNot -> Ticket -> State -> Closed

Is this working?

Are you using root@localhost for testing? If yes, then don't. :)

Do you have more ACLs? If yes, show them, please.

Flo
OTRS 8 SILVER (Prod)
OTRS 8 auf Debian 11 (Test)
Znuny 7.x latest version testing auf Debian 11

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
aph
Znuny superhero
Posts: 646
Joined: 20 Jun 2014, 12:11
Znuny Version: 3.3.9, 4.x, 5.x

Re: ACL to restrict next ticket state

Post by aph »

Solved it. I had an ACL that was conflicting with the new ACL and was being executed after the new ACL
OTRS 3.3.x (private/testing) on Windows Server 2008 with MSSQL database.
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
RStraub
Znuny guru
Posts: 2210
Joined: 13 Mar 2014, 09:16
Znuny Version: 6.0.14
Real Name: Rolf Straub

Re: ACL to restrict next ticket state

Post by RStraub »

Ouch!
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
Post Reply