I am experiencing some issues with company tickets

Moderator: crythias

Locked
rzanon
Znuny newbie
Posts: 9
Joined: 17 Feb 2014, 15:47
Znuny Version: 3.3.4
Real Name: Romain ZANON
Company: Tyredating
Location: Lyon, FRANCE

I am experiencing some issues with company tickets

Post by rzanon »

Hi there,

I am trying to use the company tickets feature but without success.

I followed the OTRS documentation http://doc.otrs.org/3.3/en/html/external-backends.html and created a new column in the customer_user table and add a field to the config.pm file.

I created some customers (companies) and added them to some customer users (in tried both in customer_id and customer_ids field). In the both cases, I am experiencing some issues when I try to show the company tickets from the customer interface :

- For some users it works but all company tickets are displayed both on Company tickets page and on My Ticket page. I don't understand how to display only my tickets on My ticket page
- For some other users it simply doesn't work. No one company ticket is displayed. The configurations/permissions are the same for these users

I checked the customer_id and customer_ids values on the customer_user MySQL table as well as the customer_id value on ticket table after creating a new ticket and the values are corrects.

I logged the MySQL server to show queries sent with the users which I am experiencing some issues and the customer_id value used through the query is not the good one. In fact, the previous one is used and it doesn't take in account any new customer_id I set. So, I tried to see how the customer_id and customer_ids are obtained via the code (/opt/otrs/Kernel/System/TicketSearch.pm, $SQLFrom and $SQLExt variables) but not enough explicit for me.

I was using the OTRS 3.3.1 with ITSM and I upgraded to 3.3.4 but no change.

Any help would be greatly appreciated.

Thanks.
OTRS version 3.3.4
ITSM version 3.3.4
MySQL Server 5.1
OS : GNU/Debian 6 Squeeze
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: I am experiencing some issues with company tickets

Post by crythias »

rzanon wrote:For some users it works but all company tickets are displayed both on Company tickets page and on My Ticket page. I don't understand how to display only my tickets on My ticket page
viewtopic.php?t=23956&p=94585#p94513
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
rzanon
Znuny newbie
Posts: 9
Joined: 17 Feb 2014, 15:47
Znuny Version: 3.3.4
Real Name: Romain ZANON
Company: Tyredating
Location: Lyon, FRANCE

Re: I am experiencing some issues with company tickets

Post by rzanon »

Thank you crythias.

However it resolves only my first issue (to separate company tickets and my tickets).

It does not resolve the second issues. If I add some customer_ids to some customer_users, for some of them the list in my company tickets is empty.

In addition, if I remove the customer_ids values to a customer user (from the admin interface) from which the company ticket feature works in order to remove him the ability to display these tickets, that does not change anything, and all previous company tickets are still displayed. In fact, if I monitor the queries while clicking on the company tickets button, the values assign to @customer_ids (but removed from the admin interface) are still present :

SELECT COUNT(DISTINCT(st.id)) FROM ticket st INNER JOIN queue sq ON sq.id = st.queue_id WHERE 1=1 AND ((st.customer_id) IN (('CompanyX'), ('CompanyY'), ('CompanyZ')) OR st.customer_user_id = 'my_user_id') AND sq.group_id IN (1, 19, 37) AND (((st.customer_id = 'CompanyX') ) OR ((st.customer_id = 'CompanyY') ) OR ((st.customer_id = 'AnotherCompany') )) LIMIT 10000

Any idea?

Is something wrong in my OTRS configuration?

Thanks in advance.
OTRS version 3.3.4
ITSM version 3.3.4
MySQL Server 5.1
OS : GNU/Debian 6 Squeeze
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: I am experiencing some issues with company tickets

Post by crythias »

rzanon wrote: If I add some customer_ids to some customer_users, for some of them the list in my company tickets is empty.
rzanon wrote:n addition, if I remove the customer_ids values to a customer user (from the admin interface) from which the company ticket feature works in order to remove him the ability to display these tickets, that does not change anything, and all previous company tickets are still displayed.
I'm not sure which to fix here.

In the first case, I can only assume that the individual's customer_id and customer_ids doesn't match any tickets.

In the second, I'd probably like to see proof/screenshots/select from sql but not sure.
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
rzanon
Znuny newbie
Posts: 9
Joined: 17 Feb 2014, 15:47
Znuny Version: 3.3.4
Real Name: Romain ZANON
Company: Tyredating
Location: Lyon, FRANCE

Re: I am experiencing some issues with company tickets

Post by rzanon »

Crythias,

I have found the issue : it is a cache issue.

After each customer_id or customer_ids modification, I have to run manually the perl script otrs.DeleteCache.pl.

How can I include it in the OTRS scheduler?

Is it risky to run this script frequently from the crontab? Does OTRS often needs his cache?

Thanks in advance for your answer.
OTRS version 3.3.4
ITSM version 3.3.4
MySQL Server 5.1
OS : GNU/Debian 6 Squeeze
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: I am experiencing some issues with company tickets

Post by jojo »

yes, it is risky to delete the cache. If you are experimenting with customers set the CacheTTL to 0 during test (in the CustomerUser section)
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
rzanon
Znuny newbie
Posts: 9
Joined: 17 Feb 2014, 15:47
Znuny Version: 3.3.4
Real Name: Romain ZANON
Company: Tyredating
Location: Lyon, FRANCE

Re: I am experiencing some issues with company tickets

Post by rzanon »

Hi Jojo,

Thank you. I changed the CacheTTL to 0 on my testing platform. It was configured to 24 hours (60 * 60 *24).

I am going to change it on the prod server as well to 2 hours (60 * 60 * 2). That's enough time for the cache.

Issue fixed. :)
OTRS version 3.3.4
ITSM version 3.3.4
MySQL Server 5.1
OS : GNU/Debian 6 Squeeze
Locked