New filter tab on CustomerTicketOverview

Moderator: crythias

Post Reply
iwill
Znuny newbie
Posts: 65
Joined: 10 Feb 2021, 10:47
Znuny Version: 6.0
Real Name: William Craveiro

New filter tab on CustomerTicketOverview

Post by iwill »

Hi guys,
Im trying to create a tab called "Waiting for approval" in CustomerTicketOverview which show tickets in specific conditions:
-Only show state "pending approval" (pending reminder state type)
-Appears to self customer user of ticket
-Appears to a customer user who is equals to a key of DynamicField_ApproverList on ticket Im already make a separator on CustomerTicketOverview.pm, but i need help to figure it out what search parameters that i should use on it:
Image

Some code that i have:

Code: Select all

       Pending => {
                Name   => 'Waiting for approval',
                Prio   => 1300,
                Search => {
                    #CustomerUserLoginRaw => $Self->{UserID},
		    StateType           => 'pending reminder',
		    # States           => 'pending approval',
                    # OrderBy              => $OrderByCurrent,
                    # SortBy               => $SortBy,
                    # CustomerUserID       => $Self->{customerID},
					UserID => 1,
					DynamicField_ApproverList => {
						Equals => $Self->{UserID},
					},
                    #Permission           => 'ro',
                },
            },
iwill
Znuny newbie
Posts: 65
Joined: 10 Feb 2021, 10:47
Znuny Version: 6.0
Real Name: William Craveiro

Re: New filter tab on CustomerTicketOverview

Post by iwill »

Ok, now im succefuly put on "waiting for approval" tab the pending aprovals, and appears as well in both (customer of the ticket and for UserID that equals to dynamicField value)

But, because of another user that are not the customer user of ticket, he doesnt have permissions to view and reply on ticket. Any help?
Image
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: New filter tab on CustomerTicketOverview

Post by reneeb »

You should enable that line:

Code: Select all

                    #CustomerUserLoginRaw => $Self->{UserID},
(just remove the "#")
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
iwill
Znuny newbie
Posts: 65
Joined: 10 Feb 2021, 10:47
Znuny Version: 6.0
Real Name: William Craveiro

Re: New filter tab on CustomerTicketOverview

Post by iwill »

reneeb wrote: 30 Aug 2021, 10:40 You should enable that line:

Code: Select all

                    #CustomerUserLoginRaw => $Self->{UserID},
(just remove the "#")
If i do that, the "director" customer, cant see any tickets.
In fact, with this code, if customers have the same Customer ID, no problem. The problem insuficient rights comes when the ticket comes from a user which have a diferent Customer ID.
Because of that, i think that a new permission module which bypass that or give a permission if email of customer user constains "@xpot1.com".
And yes, i dont have a clue how to do it.
Post Reply