[dev] Antw: Re: How to show only one ticket state

Rafa Quiñonero Figuerola rafakorp at gmail.com
Wed Aug 28 15:19:28 GMT 2013


$Self->{TicketAcl}->{'1-hide-states'} = {****

    # match properties**

    Properties => {****

        Frontend => {

            Action => ['AgentTicketPhone'],****

        },****

        # current ticket match properties (match always)****

    },****

    # return possible options****

    Possible => {****

        # possible ticket options****

        Ticket => {****

            **State => ['OPEN SUCCESFUL'],

        },****

    },****

};


and then something like:


    $Self->{TicketAcl}->{'2-hide-states'} = {

Properties => {

            Frontend => {

                Action => ['AgentTicketPhone'],****

            },

        Ticket => {

 State => ['OPEN SUCCESFUL'],

        },

},

Possible => {

Ticket => {

                State => ['Open by X'],

},

        },

    };


    $Self->{TicketAcl}->{'3-hide-states'} = {

Properties => {

            Frontend => {

                Action => ['AgentTicketPhone'],****

            },

         Ticket => {

State => ['Open by X'],

         },

},

Possible => {

 Ticket => {

                State => ['Open whatever'],

},

        },

    };

and so on...

I'm not sure if you can paste it in the Config.pm, but creating a new file
will work for sure.  You will have to adapt it to your needs.



2013/8/28 Guillermo Alberto Rosas Pereira <guillermo.rosas at softtek.com>

> Actually, I just need it to work on AgentTicketPhone. The objective is to
> force our users to select ONLY one ticket state so that latter in the
> process, once that more information has been gathered, they can change the
> status to… let’s say, Open by XXXXX or Open with incomplete information or
> any other of the OPEN state types.
>
> In the previous mail, Josef suggested to show only the open successful
> state… which is what I need J  my question with this code is how do I set
> it to work only on AgentTicketPhone? Should I paste it on the Config.pm or
> should I create another file just like Rafa said?
>
> ...****
>
> Possible => {****
>
> # possible ticket options (white list)****
>
> Ticket => {****
>
> State => ['OPEN SUCCESFUL'],****
>
> },****
>
> },****
>
> };****
>
>
>
> thanks a lot everybody
>
>
> ****
>
> ** **
>
> *From:* dev-bounces at otrs.org [mailto:dev-bounces at otrs.org] *On Behalf Of *Rafa
> Quiñonero Figuerola
> *Sent:* miércoles, 28 de agosto de 2013 03:35 a.m.
>
> *To:* Development community of OTRS
> *Subject:* Re: [dev] Antw: Re: How to show only one ticket state****
>
> ** **
>
> In which case do you exactly need that to hapen? You need, let's say, a
> condition to acomplish the ACL. Just that the frontend is AgentTicketPhone,
> is not going to work (please someone correct me if I'm wrong, because that
> has never worked for me either). You need some state or some condition to
> make it work, for example the previous state:****
>
> ** **
>
> $Self->{TicketAcl}->{'1-hide-states'} = {****
>
>     # match properties****
>
>     Properties => {****
>
>         # the current ticket state is:****
>
>         Ticket => {****
>
>             State => ['open successful','open','open by x', 'open by y' ],
> ****
>
>         },****
>
>     },****
>
>     # returned state****
>
>     Possible => {****
>
>         Ticket => {****
>
>             State => ['closed successful'],****
>
>         },****
>
>     },****
>
> };****
>
> ** **
>
> Now when the ticket has one of the states: 'open successful','open','open
> by x', 'open by y', the only next possible state will be 'closed
> succesful'. If it doesn't work, maybe there's another ACL overriding it, or
> some state is not perfectly written. PossibleNot would return all except
> the 'closed succesful' state.****
>
> ** **
>
> This should not go into Config.pm, create a new file, name it
> "LikeYouWant.pm" and paste this:****
>
> ** **
>
> package Kernel::Config::ACLs;****
>
> ** **
>
> use strict;****
>
> use warnings;****
>
> ** **
>
> ... YOUR ACLs HERE ...****
>
> ** **
>
> 1; # End of file****
>
> ** **
>
> Hope it helps, anything else just ask ;)****
>
> ** **
>
> 2013/8/28 Josef1 Penzkofer <Josef1.Penzkofer at rz.uni-regensburg.de>****
>
> hi,
>
> why don't you show only the state "OPEN SUCCESFUL" like following? (In my
> ACL
> this works.)
>
> ...
> Possible => {
> # possible ticket options (white list)
> Ticket => {
> State => ['OPEN SUCCESFUL'],
> },
> },
> };
>
>
> >>> Guillermo Alberto Rosas Pereira <guillermo.rosas at softtek.com>
> 28.08.2013
> 00:13 >>>****
>
> Thanks guys!  Here is my code, but… it’s not working. This is my first ACL
> so I took the one on the manual, paste it on the Config.pm but nothing
> happens
> (Just for testing purposes, if this works then I can tell the ACL to
> prevent
> the other states from showing on the Next Ticket State List).
>
>                 $Self->{TicketAcl}->{'1-hide-states'} = {
>     # match properties
>     Properties => {
>                 # the used frontend module
>         Frontend => {
>             Action => ['AgentTicketPhone'],
>         },
>         # current ticket match properties (match always)
>     },
>     # return possible options
>     PossibleNot => {
>         # possible ticket options
>         Ticket => {
>             State => ['closed successful'],
>         },
>     },
> };
>
> I’m wondering if the Config.pm is the only file I have to modify.
> From: dev-bounces at otrs.org [mailto:dev-bounces at otrs.org] On Behalf Of Rafa
> Quiñonero Figuerola
> Sent: martes, 27 de agosto de 2013 03:22 a.m.
> To: Development community of OTRS
> Subject: Re: [dev] How to show only one ticket state
>
> Yes, try it with the ACL, if you don't get it working send the code here
> and
> we'll take a look. We have used many ACLs for our system.****
>
> 2013/8/27 Jan Řežab <honza at rezab.eu<mailto:honza at rezab.eu>>****
>
> Try this http://doc.otrs.org/3.0/en/html/acl.html.
>
> Kind regards
> Jan
>
> 2013/8/27 Guillermo Alberto Rosas Pereira****
>
> <guillermo.rosas at softtek.com<mailto:guillermo.rosas at softtek.com>>****
>
> I have several ticket STATES, which for type OPEN are:
>
> ●         Open successful
>
> ●         Open
>
> ●         Open by X
>
> ●         Open by Y
>
>
> How can I configure the Next Ticket State field on “Agent Ticket Phone” to
> show ONLY one of those states and not the whole OPEN category. From
> Sysconfig,
> I can only configure the Next Ticket State to show or hide a whole
> category:
> Ex: hide ALL states configured as type OPEN  or show ALL states configured
> as
> type CLOSED, etc.
>
> I need to show only the state OPEN SUCCESFUL, but not the rest of the
> states
> configured as type  OPEN.
>
> I will appreciate your help .
>
>
>
> _______________________________________________
> OTRS mailing list: dev - Webpage: http://otrs.org/
> Archive: http://lists.otrs.org/pipermail/dev
> To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev
>
>
> _______________________________________________
> OTRS mailing list: dev - Webpage: http://otrs.org/
> Archive: http://lists.otrs.org/pipermail/dev
> To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev
>
>
>
> --
> Rafa Quiñonero Figuerola
> Tlf: 0151-61436385****
>
> rafakorp at gmail.com<mailto:rafakorp at gmail.com>****
>
> _______________________________________________
> OTRS mailing list: dev - Webpage: http://otrs.org/
> Archive: http://lists.otrs.org/pipermail/dev
> To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev****
>
>
>
> ****
>
> ** **
>
> --
> Rafa Quiñonero Figuerola
> Tlf: 0151-61436385
> rafakorp at gmail.com ****
>
> _______________________________________________
> OTRS mailing list: dev - Webpage: http://otrs.org/
> Archive: http://lists.otrs.org/pipermail/dev
> To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev
>



-- 
Rafa Quiñonero Figuerola
Tlf: 0151-61436385
rafakorp at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.otrs.org/pipermail/dev/attachments/20130828/d1fce4a2/attachment-0001.html>


More information about the dev mailing list