ACL preventing empty DynamicField values

Moderator: crythias

Locked
quarx0
Znuny newbie
Posts: 2
Joined: 30 Aug 2013, 10:01
Znuny Version: 3.2.10
Real Name: Paulo Matias
Company: TAP

ACL preventing empty DynamicField values

Post by quarx0 »

Hello,

I'm trying to create an ACL which prevents a ticket being changed to a given state if 2 dynamic fields (or one of them) has an empty value. The ACL is as follows:

# ACL preventing to put the ticket in the Resolved state without filling RootCause and Resolution Method
$Self->{TicketAcl}->{'ACL-RootCause_ResolutionMethod'} = {
# match properties
Properties => {
# current ticket match properties
Ticket => {
DynamicField_TicketRootCause => ['[RegExp]/^/\s*$/'],
DynamicField_TicketResolutionMethod => ['[RegExp]/^/\s*$/'],
}
},
# return not possible options (black list)
PossibleNot => {
Ticket => {
State => ['resolved'],
},
},
};

For some reason this isn't working. Does anyone have any clue why this isn't working?

Thank you for your help.
Locked