Company Tickets and Search

Moderator: crythias

Locked
jwhite
Znuny newbie
Posts: 5
Joined: 14 Apr 2013, 01:51
Znuny Version: 3.1.11

Company Tickets and Search

Post by jwhite »

In the Customer portal, I would like to configure the Company Tickets to return results differently than the Search.

My OTRS implementation is used in many geographical regions. Currently the 'Company Tickets' tab only returns tickets from that particular users site. This was done by assigning the CustomerID field from the AD directory to point to the name of the users site. For the Search feature, I would like the results to include tickets from all geographical regions.

What would be a good starting point to implementing this?
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Company Tickets and Search

Post by crythias »

The customer will only have tickets she is allowed to see -- tickets she made or tickets her company (what matches CustomerID) has made.

If you want company tickets to allow users to see geographic regions, you will destroy the security model by assigning the Geographic Region as CustomerID but it would work how you wish.

The customer will definitely see, potentially, security or other information for random person whom she shouldn't normally have access to. Plus, she may be able to reply to those tickets as well, AND have access to email name, and potentially other contact information attached to the ticket. This would be a spammer's dream.
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
jwhite
Znuny newbie
Posts: 5
Joined: 14 Apr 2013, 01:51
Znuny Version: 3.1.11

Re: Company Tickets and Search

Post by jwhite »

The OTRS system is used internally by an organization so we are using the security model as you described as a means to filter tickets (hence, there are no issues with security, spam, etc).

When a user clicks on 'Company Tickets' the results returned are based on the geographic region (as you currectly described in your response by setting the CustomerID to the geographic region). When a user selects the 'Search' button (instead of 'Company Tickets'), I would like all tickets meeting the search criteria to be displayed which originated across all geographic regions (i.e. no longer filtered by geographical region).
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Company Tickets and Search

Post by crythias »

Try the "CustomerIDs" option or ... set every customer/ticket to the same CustomerID...?
Either way, there is no effective way (as far as I can tell) to segregate "Company Tickets" as a subset of "tickets I can find"
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
jwhite
Znuny newbie
Posts: 5
Joined: 14 Apr 2013, 01:51
Znuny Version: 3.1.11

Re: Company Tickets and Search

Post by jwhite »

From the research I've done, by following the 'CustomerIDs' option, a customer would get back all results when clicking on 'Company Tickets'.

What I would really like is:

My Tickets = returns back only my tickets
Company Tickets = returns back the tickets for a customer's location (CustomerID is currently set equal to 'l' in LDAP which represents a customers site location)
Search = returns back all tickets in the entire system.

I don't really see an easy way to do this without performing custom edits? Is there a good place in the code to perform a customer edit that would not prune out the tickets from the other site locations?

Thanks in advance.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Company Tickets and Search

Post by crythias »

viewtopic.php?f=53&t=20449#p81045
crythias wrote:there is no effective way (as far as I can tell) to segregate "Company Tickets" as a subset of "tickets I can find"
jwhite wrote:Is there a good place in the code to perform a customer edit that would not prune out the tickets from the other site locations?
If I were to do this, it would be this:
Kernel/Modules/CustomerTicketOverview.pm, in the Company Tickets section, change CustomerIDs to CustomerID_custom (all places where "CustomerIDs" is used. An example of "all" is below.

Code: Select all

CompanyTickets => {
            All => {
                Name   => 'All',
                Prio   => 1000,
                Search => {
#                    CustomerID =>
                        [ $Self->{UserObject}->CustomerIDs( User => $Self->{UserLogin} ) ],
                    CustomerID => $Self->{UserCustomerID},
                    OrderBy        => $Self->{OrderBy},
                    SortBy         => $Self->{SortBy},
                    CustomerUserID => $Self->{UserID},
                    Permission     => 'ro',
                },
            },
In addition, I'd make sure that all locations are applied to all customers in the attribute that holds CustomerIDs and is mapped within the Map of CustomerUser.
This is different from CustomerID, which will hold one value -- the customer's location.

This hasn't been tested, but the concept seems to be the least painless for your purposes.
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
Locked