[Solved] States and groups and more...ACL is the answer :)

Moderator: crythias

Locked
jakezp
Znuny newbie
Posts: 22
Joined: 10 Sep 2011, 09:39
Znuny Version: 3

[Solved] States and groups and more...ACL is the answer :)

Post by jakezp »

Hi again,

I am experimenting with adding a couple of additional states.

I have a list of about 6 different states.

Is there a possibility to link selectable states based on groups?

So for example, we have a 'Quality Control' state (state type -> open), but I only want people in the QC group to be able to see and select this state in the drop down list of states.

If this is not possible, then how about linking a specific state to a queue? So the 'Quality Control' state will only show if the ticket is in the QC queue?

I have been messing around with this idea.

If all else fails, I have another possibility that might work, but I need help on it.

I have edited Kernel/Output/HTML/Standard/AgentTicketActionCommon.dtl and added (actually duplicated) the following.

Code: Select all

<!-- dtl:block:State -->
                <label>Current State:</label>
                <div class="Field">
                $Data{"State"}
                </div>
                <div class="Clear"></div>

                <label for="NewStateID">$Text{"Next state"}:</label>
                <div class="Field">
                    $Data{"StateStrg"}
                </div>
                <div class="Clear"></div>
//--- Testing below
                <label>Current State:</label>
                <div class="Field">
                $Data{"State"}
                </div>
                <div class="Clear"></div>

                <label for="NewStateID">$Text{"Next state"}:</label>
                <div class="Field">
                    $Data{"StateStrg"}
                </div>
                <div class="Clear"></div>
//--- Testing end
This brings up a second New State list below the original one.

Now I know in Sysconfig,
Ticket -> Frontend::Agent::Ticket::ViewNote
Ticket::Frontend::AgentTicketNote###StateType
you can select the state types you want to be visible. Is it not possible to edit an xml / config file manually to duplicate this section for my second 'New State:' selection and then change my Quality Control state to a state type qc and then only make qc available in the second list?

Then I can use javascript to hide the 1st or 2nd selection box depending on the group / queue?

As per this forum entry: http://forums.otrs.org/viewtopic.php?f=62&t=11461

I know its a lot of customisation and things WILL break when upgrading OTRS versions, but we are documenting everything very well and are creating patch files for all config files being customised.

If anybody has any ideas, please help me. I have not played in .pm files much. Mostly the .dtl files.

If the solution is deeper, please point me in the right direction...

Thanks for reading and contributing ideas...
Last edited by jakezp on 22 Sep 2011, 05:43, edited 2 times in total.
Jakez
--------------
OTRS 3.0.9
ITSM 3.0.4
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: States and groups and more...

Post by crythias »

You might be successful in using ACLs to accomplish your goals.
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
jakezp
Znuny newbie
Posts: 22
Joined: 10 Sep 2011, 09:39
Znuny Version: 3

Re: States and groups and more...

Post by jakezp »

Hi Crythias,

Thanks for information. Could you perhaps provide me with some more information? Perhaps point me in the right direction ?

Thanks,
Jakez
--------------
OTRS 3.0.9
ITSM 3.0.4
jakezp
Znuny newbie
Posts: 22
Joined: 10 Sep 2011, 09:39
Znuny Version: 3

Re: States and groups and more...

Post by jakezp »

Where would I set the ACL's?

I had a look at this: http://faq.otrs.org/otrs/public.pl?Acti ... ItemID=297

Code: Select all

Modification', 'Termination'],


            }


        },


        Possible => {


           # possible ticket options (white list)


           Ticket => {


                State => ['closed successful','closed unsuccessful','closed


with workaround','pending auto close-','pending auto close+'],


            },


           Action => {


            # sets close link active


                AgentTicketClose  => 1,
This section looks more or less like what I want? No so?

So where / how would I set this?

Thanks
Jakez
--------------
OTRS 3.0.9
ITSM 3.0.4
jakezp
Znuny newbie
Posts: 22
Joined: 10 Sep 2011, 09:39
Znuny Version: 3

Re: States and groups and more...

Post by jakezp »

Me again....

Think I found the answer here:

http://faq.otrs.org/otrs/public.pl?Acti ... &ItemID=68

4.) Remove state 'closed successful' in all Agent frontend modules, just
enable it for a single group of agents.

Code: Select all

[Kernel/Config.pm]

 $Self->{TicketAcl}->{'ACL-Name'} = {
 # match properties
 Properties => {
 Frontend => {
 Action => [
 'AgentTicketMailbox', 'AgentTicketCustomerMessage', 
 'AgentTicketForward', 'AgentTicketClose', 
 'AgentTicketPending', 'AgentTicketPhone',
 'AgentTicketOwner', 'AgentTicketNote', 
 'AgentTicketBounce', 'AgentTicketPhoneOutbound', 
 'AgentTicketResponsible', 'AgentTicketEmail',
 'AgentTicketPriority','AgentTicketMove',
 'AgentTicketCompose', 'AgentTicketFreeText', 
 ],
 },
 },


 # return possible options (white list)
 PossibleNot => {
 # possible ticket options (white list)
 Ticket => {
 State => ['closed successful'],
 },
 },
 };



 $Self->{TicketAcl}->{'ACL-Name-2'} = {
 # match properties
 Properties => {
 User => {
 Group_rw => [
 'stats',
 ],
 },
 },
 PossibleNot => {
 Ticket => {
 State => [],
 },
 },
 };
Jakez
--------------
OTRS 3.0.9
ITSM 3.0.4
jakezp
Znuny newbie
Posts: 22
Joined: 10 Sep 2011, 09:39
Znuny Version: 3

Re: States and groups and more...

Post by jakezp »

Got it working !!!

Perfectly...

This opens so many new possibilities.

Don't know if they going to love me or hate me at work as I need to add so many other things now :)

Thanks for pointing me in the right direction ! :)
Jakez
--------------
OTRS 3.0.9
ITSM 3.0.4
vibaceta
Znuny newbie
Posts: 4
Joined: 12 Jul 2017, 23:39
Znuny Version: 5.0 version

Re: [Solved] States and groups and more...ACL is the answer :)

Post by vibaceta »

hi, please, i need the solucion!

the post before isn´t operative......

Please help!
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: [Solved] States and groups and more...ACL is the answer :)

Post by root »

vibaceta wrote: 29 Dec 2022, 21:04 hi, please, i need the solucion!

the post before isn´t operative......

Please help!
Hi,

This is probably of the post's age: more than ten years. I recommend opening a new one describing your use case and needs.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
Locked