ACL: restrict ticket types by queue?

Moderator: crythias

Post Reply
schaffel
Znuny newbie
Posts: 90
Joined: 20 May 2008, 12:50
Znuny Version: 3.1.X
Real Name: Felix
Company: SyroCon Consulting GmbH
Location: Darmstadt

ACL: restrict ticket types by queue?

Post by schaffel »

Is it possible to restrict ticket types for a ticket by queue?

In our case we want that in a certain queue it is only possible to select between a restricted set of ticket types.
That means if an agent selects a certain queue when creating a phone ticket the available ticket types should be restricted.

I tried to solve this with an ACL:

Code: Select all

    # ticket acl
    $Self->{TicketAcl}->{'ACL-Recruitment-Ticket-Types'}={
        Properties => {
            Ticket => {
                Queue => ['SY-Jobs'], },
        },
        Possible => {
            Ticket => {
                Type => ['Recruitment'], 
            },
        },
    };
But it does not work.
production: OTRS 5.0.X | OTRS:ITSM 5.0.X | AWS-RDS MariaDB 10.1.X | CentOS 7

Gibt es im Raum Frankfurt/Darmstadt OTRS/ITSM-Benutzer, die an einem Erfahrungsaustausch interessiert sind? Dann meldet euch um mit Gleichgesinnten über OTRS in der Praxis und den ganzen Rest zu reden.
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: ACL: restrict ticket types by queue?

Post by crythias »

You can use my hack, but "Recruitment" is a SubQueue, not a "Type"
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
schaffel
Znuny newbie
Posts: 90
Joined: 20 May 2008, 12:50
Znuny Version: 3.1.X
Real Name: Felix
Company: SyroCon Consulting GmbH
Location: Darmstadt

Re: ACL: restrict ticket types by queue?

Post by schaffel »

Thank you for your reply.
We try to use OTRS for some HR recruitment tracking, beside the normal help desk/support thing. So the idea came up to use a special ticket types as there will be more than one. We created a queue structure as well. The queues represent the functional departments and the ticket type should represent the different type of employment (fulltime, freelancer...).
I tried to create some acl to make these types only available in these queues.
I found that the agendTicketPhone form provides some AJAX refresh if the destination queue is changed.

Code: Select all

<label class="Mandatory" for="Dest"><span class="Marker">*</span> $Text{"To queue"}:</label>
<div class="Field">
    $Data{"ToStrg"}
    <div id="DestError" class="TooltipErrorMessage" ><p>$Text{"This field is required."}</p></div>
    <div id="DestServerError" class="TooltipErrorMessage"><p>$Text{"This field is required."}</p></div>
<!--dtl:js_on_document_complete-->
<script type="text/javascript">//<![CDATA[
    $('#Dest').bind('change', function (Event) {
        Core.AJAX.FormUpdate($('#NewPhoneTicket'), 'AJAXUpdate', 'Dest', ['TypeID', 'NewUserID', 'NewResponsibleID', 'NextStateID', 'PriorityID', 'ServiceID', 'SLAID', 'SignKeyID', 'CryptKeyID', $Data{"DynamicFieldNamesStrg"}, 'To', 'Cc', 'Bcc']);
    });
//]]></script>
<!--dtl:js_on_document_complete-->
</div>
If I understand that right if the queue ('Dest'-field) is changed than the other provided fields will be refreshed. So the ALCs should be checked. But it seems not to work this way. :(

When I look at your 'hack' it switches some extra text fields on/of depending on the queue selected. The ticket type field is there all the time but its content should change depending on the queue selected.

I understand that there is a problem as the ACLs are server side and the form is on the client side, but i hoped that the AJAX functionality could fix that gap, and get the server side informations to the client side.

I try to rebuild the ACLs to restrict the ticket types based on the user group the agent belongs to, but that seems to be tricky as some agents are in groups for both worlds support and recruitment. But i try.

Is there some documentation on the ajax features OTRS provides?
production: OTRS 5.0.X | OTRS:ITSM 5.0.X | AWS-RDS MariaDB 10.1.X | CentOS 7

Gibt es im Raum Frankfurt/Darmstadt OTRS/ITSM-Benutzer, die an einem Erfahrungsaustausch interessiert sind? Dann meldet euch um mit Gleichgesinnten über OTRS in der Praxis und den ganzen Rest zu reden.
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: ACL: restrict ticket types by queue?

Post by crythias »

Core.AJAX.FormUpdate($('#NewPhoneTicket'), 'AJAXUpdate', 'Dest', ['TypeID',

This says to update TypeID when Dest (Queue) changes.

TypeID would obey ACL.
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
schaffel
Znuny newbie
Posts: 90
Joined: 20 May 2008, 12:50
Znuny Version: 3.1.X
Real Name: Felix
Company: SyroCon Consulting GmbH
Location: Darmstadt

Re: ACL: restrict ticket types by queue?

Post by schaffel »

Then my error must be somewhere else.
Is there any way to debug in the log if and which ACL is used?
production: OTRS 5.0.X | OTRS:ITSM 5.0.X | AWS-RDS MariaDB 10.1.X | CentOS 7

Gibt es im Raum Frankfurt/Darmstadt OTRS/ITSM-Benutzer, die an einem Erfahrungsaustausch interessiert sind? Dann meldet euch um mit Gleichgesinnten über OTRS in der Praxis und den ganzen Rest zu reden.
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: ACL: restrict ticket types by queue?

Post by crythias »

you can try to restrict, for instance, state, but for some reason I can't make type obey queue even normal. But, like I said, it'd be better and easier if this type were a subqueue.
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
Post Reply