[SOLVED]ACL with dynamic_Fields

Moderator: crythias

Locked
Gonzalo
Znuny newbie
Posts: 75
Joined: 06 Nov 2013, 19:20
Znuny Version: 5.0.8
Real Name: Gonzalo

[SOLVED]ACL with dynamic_Fields

Post by Gonzalo »

Hi!
I want to filter a dynamic filed called 'UT' when I select the QUEUE 'Projects' via ACL.
I atthached the code (Config.pm) and the configuration of the ACL. I din't know why it is working with normal fields ('Priority') but with the dynamic field ('UT' and 'Subcategory') have not worked.

Code: Select all

	# ticket acl
    $Self->{TicketAcl}->{'100-ACL-UT-QUEUE'} = {
        # match properties
        Properties => {
            # current ticket match properties
            Ticket => {
                Queue => ['Projects'],
            }
        },
        # return possible options (white list)
        Possible => {
            # possible ticket options (white list)
            Ticket => {
				Priority => ['Low'],
                                UT => ['1'],
				Subcategory => ['Other'],
            },
        },
    };
You do not have the required permissions to view the files attached to this post.
Last edited by Gonzalo on 13 Oct 2014, 16:53, edited 1 time in total.
OTRS 5.0.8 with Oracle Linux Server release 7.1 with MariaDB database

---------------------------------------------------------
OTRS 3.3.6 on Centos 6.0 with MySQL database
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: ACL with dynamic_Fields

Post by crythias »

Please explain:

What do you want to happen?
What happens?
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
Gonzalo
Znuny newbie
Posts: 75
Joined: 06 Nov 2013, 19:20
Znuny Version: 5.0.8
Real Name: Gonzalo

Re: ACL with dynamic_Fields

Post by Gonzalo »

Hi crythias!

Sorry I explain better

What I want to happen is that when you select a queue, the ACL filter the dynamic field 'ut'. That the thing i want.

In the code I want that if an agent chose the queue 'Projects' the "ut" just let select value 1, the code as you see I put three fields, a test mode, which only works on the field priority.

Now the behavior is coming out a list of values of UT(1,0.5,0.2,0.75) ​​and subcategory (Others,HW,SW.....)

Thanks
OTRS 5.0.8 with Oracle Linux Server release 7.1 with MariaDB database

---------------------------------------------------------
OTRS 3.3.6 on Centos 6.0 with MySQL database
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: ACL with dynamic_Fields

Post by crythias »

Please review the documentation for use of DynamicFields in ACLs.
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
Gonzalo
Znuny newbie
Posts: 75
Joined: 06 Nov 2013, 19:20
Znuny Version: 5.0.8
Real Name: Gonzalo

Re: ACL with dynamic_Fields

Post by Gonzalo »

I used this documentation to undestand how it's work.
I didn't know what am i doing bad.
OTRS 5.0.8 with Oracle Linux Server release 7.1 with MariaDB database

---------------------------------------------------------
OTRS 3.3.6 on Centos 6.0 with MySQL database
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: ACL with dynamic_Fields

Post by crythias »

What you posted:

Code: Select all

        # return possible options (white list)
        Possible => {
            # possible ticket options (white list)
            Ticket => {
            Priority => ['Low'],
                                UT => ['1'],
            Subcategory => ['Other'],
            },
        },
What the documentation says:

Code: Select all

        DynamicField => {
            # Names must be in DynamicField_<field_name> format.
            # Values in [ ... ] must always be the untranslated internal data keys
            #   specified in the dynamic field definition and
            #   not the data values shown to the user.
            DynamicField_Field1          => ['some value'],
            DynamicField_OtherField      => ['some value'],
            DynamicField_TicketFreeText2 => ['some value'],
            # ...
        },
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
Gonzalo
Znuny newbie
Posts: 75
Joined: 06 Nov 2013, 19:20
Znuny Version: 5.0.8
Real Name: Gonzalo

[SOlved]ACL with dynamic_Fields

Post by Gonzalo »

Thanks crythias

I had not understood DynamicField_<field_name> format. I attached the code if anyone is interested in the future

Code: Select all


$Self->{TicketAcl}->{'100-ACL'} = {
          # match properties
          Properties => {
                  # current action match propertiess
                  Frontend => {
                  Action => 
							['AgentTicketPhone','AgentTicketEmail'],
                  },
            # current ticket match properties
            Ticket => {
                Queue => ['Projects'],
            },
        },
        # return possible options (white list)
        Possible => {
            # possible ticket options (white list)
			Ticket =>  {
				DynamicField_UT => ['1'],
			  },
        },
    };

OTRS 5.0.8 with Oracle Linux Server release 7.1 with MariaDB database

---------------------------------------------------------
OTRS 3.3.6 on Centos 6.0 with MySQL database
Locked