I defined a couple of ACLs to filter the possible ticket state depending of the current ticket state.
Seems to be working but some cases are getting in a loop, any help to solve this?
here my ACL.pm placed under Kernel/Config/Files/
Code: Select all
##########################################################################
# Statemachine - Incident
# If state is Analyze
$Self->{TicketAcl}->{'ANALYZE_STATE'} = {
Properties => {
Ticket => {
State => [ 'Analyze', ],
},
},
Possible => {
Ticket => {
State => [ 'Assignee Requires More Information','Placed on Hold by Assignee','Work in Progress', ],
},
},
};
# If state is Not Sumbited
$Self->{TicketAcl}->{'NOT_SUMITED_STATE'} = {
Properties => {
Ticket => {
State => [ 'Not Sumbited', ],
},
},
Possible => {
Ticket => {
State => [ 'Ready for Review','Cancelled', ],
},
},
};
# If state is Ready for Review
$Self->{TicketAcl}->{'READY_OR_REVIEW'} = {
Properties => {
Ticket => {
State => [ 'Ready for Review', ],
},
},
Possible => {
Ticket => {
State => [ 'Analyze','Out of Scope','Cancelled', ],
},
},
};
# If state is Waiting for an Action
$Self->{TicketAcl}->{'WAITING_FOR_AN_ACTION'} = {
Properties => {
Ticket => {
State => [ 'Waiting for an Action', ],
},
},
Possible => {
Ticket => {
State => [ 'Analyze', ],
},
},
};
# If state is Out of Scope
$Self->{TicketAcl}->{'OUT_OF_SCOPE'} = {
Properties => {
Ticket => {
State => [ 'Out of Scope', ],
},
},
Possible => {
Ticket => {
State => [ ],
},
},
};
# If state is Opened by Error
$Self->{TicketAcl}->{'OPENED_BY_ERROR'} = {
Properties => {
Ticket => {
State => [ 'Opened by Error', ],
},
},
Possible => {
Ticket => {
State => [ ],
},
},
};
# If state is Out of Scope
$Self->{TicketAcl}->{'PENDING_REQUESTOR_SIGNOFF'} = {
Properties => {
Ticket => {
State => [ 'Pending Requestor Signoff', ],
},
},
Possible => {
Ticket => {
State => [ 'Analyze', 'Pending Auto Close', ],
},
},
};
# If state is Cancelled
$Self->{TicketAcl}->{'CANCELLED'} = {
Properties => {
Ticket => {
State => [ 'Cancelled', ],
},
},
Possible => {
Ticket => {
State => [ ],
},
},
};
# If state is Auto-Hard Closed
$Self->{TicketAcl}->{'AUTO-HARD_CLOSED'} = {
Properties => {
Ticket => {
State => [ 'Auto-Hard Closed', ],
},
},
Possible => {
Ticket => {
State => [ 'Ready for Review', ],
},
},
};
# If state is Closed Successful
$Self->{TicketAcl}->{'CLOSED_SUCCESSFUL'} = {
Properties => {
Ticket => {
State => [ 'Closed Successful', ],
},
},
Possible => {
Ticket => {
State => [ ],
},
},
};
# If state is Closed Unsuccessful
$Self->{TicketAcl}->{'CLOSED_UNSUCCESSFUL'} = {
Properties => {
Ticket => {
State => [ 'Closed Unuccessful', ],
},
},
Possible => {
Ticket => {
State => [ 'Rady for Review', 'Work In Progress', ],
},
},
};
# If state is Pending Auto Close
$Self->{TicketAcl}->{'PENDING_AUTO_CLOSE'} = {
Properties => {
Ticket => {
State => [ 'Pending Auto Close', ],
},
},
Possible => {
Ticket => {
State => [ 'Auto-Hard Closed', ],
},
},
};
# If state is Work in Progress
$Self->{TicketAcl}->{'WORK_IN_PROGRESS'} = {
Properties => {
Ticket => {
State => [ 'Work in Progress', ],
},
},
Possible => {
Ticket => {
State => [ 'Pending Requestor Signoff', 'Assignee Requires More Information', 'Placed on Hold by Assignee', 'Waiting for an Action', ],
},
},
};
# If state is Placed on Hold by Assignee
$Self->{TicketAcl}->{'PLACED_IN_HOLD_BY_ASSIGNEE'} = {
Properties => {
Ticket => {
State => [ 'Placed on Hold by Assignee', ],
},
},
Possible => {
Ticket => {
State => [ 'Work in Progress', 'Pending Auto Close', ],
},
},
};
# If state is Assignee Requires More Information
$Self->{TicketAcl}->{'ASSIGNEE_REQUIRES_MORE_INFORMATION'} = {
Properties => {
Ticket => {
State => [ 'Assignee Requires More Information', ],
},
},
Possible => {
Ticket => {
State => [ 'Work in Progress', 'Pending Auto Close', ],
},
},
};
1;