[SOLVED] Supervisors' access to Company Tickets

Moderator: crythias

Locked
panagiotis
Znuny newbie
Posts: 6
Joined: 19 Feb 2013, 14:25
Znuny Version: 3.1.7

[SOLVED] Supervisors' access to Company Tickets

Post by panagiotis »

Greetings, :)

In the company I work as a trainee we have installed and configured OTRS 3.1.7 and is already connected to our Active Directory from which it takes all the resources it needs (customer names, etc.).

In detail, what we have is:
  • -a group company_tickets in which every customer that is assigned can see the Company Tickets button when logged on to OTRS (meaning: he can have access to the tickets with the same CustomerID as his).
    -the same CustomerID for our customers for the Supervisor to have access to all our company's tickets (we are using the field 'company').
What we need to do is give to a department supervisor access to his subordinates' tickets. As I already said, we have the same CustomerID for all of our customers so the Supervisor to have access to all of our tickets. But what about a department supervisor? How can he have access only to his subordinates' tickets? We have to change the CustomerID for all our customers? Could we change it to the Department (which is already added and we won't have to do it manually again)? If we change CustomerID to Department simply by adding the department supervisor to company_tickets, he will have the access he needs, right? But what about the Supervisor who must have access to all tickets? From what I have read, we need to configure CustomerIDs, so that we will add there the departments and then he shall have the access he needs.

So, (the final question is) what do we need to do? Can we add a new field to our Active Directory for CustomerIDs? Or we can use one that is unused right now? And what must we write as CustomerIDs for the Supervisor to have the access to all of the company's tickets? Is the Active Directory going to complain? Or by simply writing the departments separated by semicolon in the field the CustomerIDs indicates, will work without any error?

Please note that Supervisor and department supervisor are both considered customers to our ticketing system.

Thank You for your Support
Last edited by panagiotis on 20 Feb 2013, 12:05, edited 2 times in total.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Supervisors' access to Company Tickets

Post by crythias »

panagiotis wrote:we can use one that is unused right now?
Yes. (For instance, one of your custom fields)
panagiotis wrote:And what must we write as CustomerIDs for the Supervisor to have the access to all of the company's tickets?
Supervisor will have the custom field of separated CustomerIds. depta,deptb
Is the Active Directory going to complain?
Why should it? You're just going to fill in a blank with text data.
panagiotis wrote:writing the departments separated by semicolon in the field the CustomerIDs indicates, will work without any error?
You'll need to pass the attribute into your CustomerUser Map.
viewtopic.php?f=60&t=7531
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
panagiotis
Znuny newbie
Posts: 6
Joined: 19 Feb 2013, 14:25
Znuny Version: 3.1.7

Re: Supervisors' access to Company Tickets

Post by panagiotis »

Thank you for your answer.

One more thing, this will allow access (as it should be) to the supervisors for the tickets that are going to open, right? Is there a way to let the dpt. supervisor see the employees' tickets of his department that have already been opened before this?
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Supervisors' access to Company Tickets

Post by crythias »

panagiotis wrote:Is there a way to let the dpt. supervisor see the employees' tickets of his department that have already been opened before this?
CustomerIds is a permissions setting, not a ticket attribute. If it works at all, it will work historically for all entries in CustomerIds.

If you're in the process of changing company to department, you can add the company CustomerID as an entry in CustomerIds, along with departments.

if you're interested in retroactively and bulk changing ticket CustomerID, you can do that via Generic Agent. This may potentially be tedious if you have to split departments by email address and you have lots of ticket submitters.
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
panagiotis
Znuny newbie
Posts: 6
Joined: 19 Feb 2013, 14:25
Znuny Version: 3.1.7

Re: Supervisors' access to Company Tickets

Post by panagiotis »

CustomerIds is a permissions setting, not a ticket attribute. If it works at all, it will work historically for all entries in CustomerIds.
We changed CustomerID to 'department' instead of 'company' and by adding to CustomerIDs the departments one should see at his Company Tickets (and by adding him to company_tickets) we have given the access they need for the tickets that will open to the future.
  • -For the tickets that have been opened before, by adding the 'company' name to CustomerIDs of Supervisor, we give him access to all of the past tickets (and by adding dptA;dptB;dptC etc. for all the departments we give him access to all of the new tickets).
    -For the department supervisor, the issue is solved for new tickets but not for the already open/closed ones. A solution for past tickets is not necessary, but just from curiosity, is there an easy way to do it?
Nevertheless, issue is considered solved! Thank you! :-D

Do I have to set this post as solved or change his name or something, or a moderator will do it?
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Supervisors' access to Company Tickets

Post by crythias »

You don't have to do anything here, but if you want to, edit the first post topic and include [solved].

To fix department view, bulk change customerid via generic agent... Filter on a user, change customerid to deptX
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
panagiotis
Znuny newbie
Posts: 6
Joined: 19 Feb 2013, 14:25
Znuny Version: 3.1.7

Re: [SOLVED] Supervisors' access to Company Tickets

Post by panagiotis »

To fix department view, bulk change customerid via generic agent... Filter on a user, change customerid to deptX
There are a lot of customers that are using our ticketing system so this is going to be frustrating...

Beyond that, may I ask another question? In our .config file, the CustomerID => 'field' should be same with the field in map? Or something like the following won't be a problem?

Code: Select all

CustomerID => 'company',
Map => [
[ 'UserCustomerID', 'CustomerID', 'department', 0, 1, 'var', '', 0 ]
],
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: [SOLVED] Supervisors' access to Company Tickets

Post by crythias »

CustomerID => 'company', <== this will cause problems.

I'm not sure what the rest of your query means, nor how to answer it.
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
panagiotis
Znuny newbie
Posts: 6
Joined: 19 Feb 2013, 14:25
Znuny Version: 3.1.7

Re: [SOLVED] Supervisors' access to Company Tickets

Post by panagiotis »

Sorry, I wasn't clear enough. In the config file (/opt/otrs/Kernel/Config.pm I think):

Code: Select all

# customer #
CustomerID => 'FIELD',
CustomerValid => 'valid_id',
    # etc.
    Map => [
        # note: Login, Email and CustomerID needed!
        # var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly, http-link-target
        # etc.
        
      [ 'UserCustomerID', 'CustomerID', 'FIELD', 0, 1, 'var', '', 0 ],
Is there a meaning to FIELD to be the same at CustomerID => 'FIELD' and [ 'UserCustomerID', 'CustomerID', 'FIELD', 0, 1, 'var', '', 0 ] ?? It could cause problems if it is not the same? What problems (can you be specific or is it random)?
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: [SOLVED] Supervisors' access to Company Tickets

Post by crythias »

I made a mistake... My last post was incorrect. I reviewed my config and (for some reason) I thought that what you presented wasn't otherwise included in an structure that allows that type of entry.
Anyway, ignore my last post.


Summary: They should/must/have to match.

CustomerID => 'fieldname' <== this is what is actually used to look it up.

Map => [
[ ... stuff snipped ] <== this is just defining an interface in the Customer Form in which to change or view fields/attributes, as well as to inform OTRS Modules about available Customer Fields.

If they don't match, it won't *hurt* anything, but it will display "department" in the Customer WebForm, but *use* "company" as CustomerID for the database. Further, anywhere you see CustomerID onscreen may reflect what's in the Map, but the database for the ticket may be something else...

<End>
I know what I'm about to say is *generally* a no-no, but you seem like a good forum person, so here's something you might consider... (this manipulates the ticket table directly, though for *YOUR* purposes, it might be helpful.)

excel:
column a: login. Column b: department
column c:

Code: Select all

="UPDATE ticket set customer_id = """ &B2 &""" WHERE customer_user_id = """ & A2 &""""
It ends up with a big column like this:

Code: Select all

UPDATE ticket set customer_id = "depta" WHERE customer_user_id = "test"
UPDATE ticket set customer_id = "deptb" WHERE customer_user_id = "fred"
Which you can copy/paste into a sql environment. Back up first. Danger level: low-medium. In general, this won't be terribly destructive or disruptive, but there is no log for this occurring.
Potential problems:
It doesn't work at all. (possibly wrong logins)
Misspelling of department?
This can be run multiple times.
Test a test ticket (add WHERE tn = (a ticket number) or LIMIT 1) with ONE line if you're skittish.

What is being proposed is roughly the equivalent of what Generic Agent will do, anyway.
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
panagiotis
Znuny newbie
Posts: 6
Joined: 19 Feb 2013, 14:25
Znuny Version: 3.1.7

Re: [SOLVED] Supervisors' access to Company Tickets

Post by panagiotis »

Thank you for your help. :mrgreen:

Regarding your suggestion, there are a lot of customers so (as for now) we'll let the department's supervisor the access only to the tickets that are opened after the change of the CustomerID (she is not unhappy with that).
Locked