No tickets showed in 'My tickets' view (customer interface - customer.pl)
Moderator: crythias
-
- Znuny newbie
- Posts: 29
- Joined: 23 Feb 2015, 19:02
- Znuny Version: 3.3.6
- Real Name: Roberto Anselmi
- Company: Deloitte XBS
No tickets showed in 'My tickets' view (customer interface - customer.pl)
Hi, all.
My OTRS is 3.3.6 version on Windows Server with IIS7.
I activate the HttpBasicAuth module for SSO-like authentication and it works, both for agents and for customer users.
But from the customer user dashboard (customer.pl) a customer user cannot see his own tickets in 'My tickets' view: every time OTRS ask for 'Create your first ticket'.
For example, let me login in customer.pl form as 'br-ame\TestOTRS1' customer user. Then in the log file I find:
[Kernel::System::CustomerAuth::HTTPBasicAuth::Auth] User: br-ame\TestOTRS1 Authentication ok (REMOTE_ADDR: XXX.XXX.XXX.XXX)
In the customer user dashboard I create my first ticket and then logout.
Then I jump to the agent interface (index.pl) with another agent account and I see this brand new ticket 'br-ame\TestOTRS1' has just created. I open it and in TicketZoom panel I see all the informations about the customer user.
Then I login again as ‘br-ame\TestOTRS1’ in customer.pl and I don’t see anything in ‘MyTickets’ view: the OTRS system ask me again to create my first ticket. What’s the matter?
Thanks in advance for your kind attention
Roberto Anselmi
My OTRS is 3.3.6 version on Windows Server with IIS7.
I activate the HttpBasicAuth module for SSO-like authentication and it works, both for agents and for customer users.
But from the customer user dashboard (customer.pl) a customer user cannot see his own tickets in 'My tickets' view: every time OTRS ask for 'Create your first ticket'.
For example, let me login in customer.pl form as 'br-ame\TestOTRS1' customer user. Then in the log file I find:
[Kernel::System::CustomerAuth::HTTPBasicAuth::Auth] User: br-ame\TestOTRS1 Authentication ok (REMOTE_ADDR: XXX.XXX.XXX.XXX)
In the customer user dashboard I create my first ticket and then logout.
Then I jump to the agent interface (index.pl) with another agent account and I see this brand new ticket 'br-ame\TestOTRS1' has just created. I open it and in TicketZoom panel I see all the informations about the customer user.
Then I login again as ‘br-ame\TestOTRS1’ in customer.pl and I don’t see anything in ‘MyTickets’ view: the OTRS system ask me again to create my first ticket. What’s the matter?
Thanks in advance for your kind attention
Roberto Anselmi
OTRS 3.3.6 - Windows Server 2008 R2 standard - IIS 7.5
MySQL 5.1.51 - ActivePerl 5.16.2
MySQL 5.1.51 - ActivePerl 5.16.2
-
- Znuny newbie
- Posts: 29
- Joined: 23 Feb 2015, 19:02
- Znuny Version: 3.3.6
- Real Name: Roberto Anselmi
- Company: Deloitte XBS
Re: No tickets showed in 'My tickets' view (customer interface - customer.pl)
Hi, all.
I understand that the problem is in the backslash ("\") character and the way MySQL read it (escape sequence).
If I try a simple select query directly in 'customer_user' table, for example searching 'xxx\myname', I get nothing if I use "SELECT * FROM customer_table WHERE login = 'xxx\myname'" but I get the right record if I use "SELECT * FROM customer_table WHERE login = 'xxx\\myname'" (with a double backslash).
So I think that there is a SQL string somewhere in the code that can be writtten better (I don't know how and where ) because I have no problems with agent but with customer user only.
Any idea about it?
Thanks in advance.
Roberto
I understand that the problem is in the backslash ("\") character and the way MySQL read it (escape sequence).
If I try a simple select query directly in 'customer_user' table, for example searching 'xxx\myname', I get nothing if I use "SELECT * FROM customer_table WHERE login = 'xxx\myname'" but I get the right record if I use "SELECT * FROM customer_table WHERE login = 'xxx\\myname'" (with a double backslash).
So I think that there is a SQL string somewhere in the code that can be writtten better (I don't know how and where ) because I have no problems with agent but with customer user only.
Any idea about it?
Thanks in advance.
Roberto
OTRS 3.3.6 - Windows Server 2008 R2 standard - IIS 7.5
MySQL 5.1.51 - ActivePerl 5.16.2
MySQL 5.1.51 - ActivePerl 5.16.2
-
- Znuny advanced
- Posts: 121
- Joined: 30 Aug 2011, 10:48
- Znuny Version: 3.3.8 && 4.0.9
- Real Name: Artjoms Petrovs
- Location: Latvia
Re: No tickets showed in 'My tickets' view (customer interface - customer.pl)
OTRS uses prepared statements throughout the system, so backshlashes should not be a problem this time.
Please check your mapping in Config.pm, whether CustomerID and CustomerUserID fields are filling up with according values from LDAP.
Please check your mapping in Config.pm, whether CustomerID and CustomerUserID fields are filling up with according values from LDAP.
Ar cieņu / Kind regards,
----------------------------------------
Artjoms Petrovs
Sistēmu analītiķis/Programmētājs /
Systems Analyst/Programmer
----------------------------------------
Artjoms Petrovs
Sistēmu analītiķis/Programmētājs /
Systems Analyst/Programmer
-
- Znuny newbie
- Posts: 29
- Joined: 23 Feb 2015, 19:02
- Znuny Version: 3.3.6
- Real Name: Roberto Anselmi
- Company: Deloitte XBS
Re: No tickets showed in 'My tickets' view (customer interface - customer.pl)
Hi, artjoms15.
First of all, thanks for your answer.
I use DB as customers backend (not LDAP) and HttpBasicAuth for customers authentication.
The same for the agents.
Do you think I need to link at AD-LDAP anyway?
This is my Config.pm (I've stripped off some comments and other stuffs):
First of all, thanks for your answer.
I use DB as customers backend (not LDAP) and HttpBasicAuth for customers authentication.
The same for the agents.
Do you think I need to link at AD-LDAP anyway?
This is my Config.pm (I've stripped off some comments and other stuffs):
Code: Select all
# --
# Kernel/Config.pm - Config file for OTRS kernel
# Copyright (C) 2001-2013 xxx, http://otrs.org/
# --
package Kernel::Config;
use strict;
use warnings;
use utf8;
sub Load {
my $Self = shift;
# ---------------------#
# database settings #
# ---------------------#
$Self->{'DatabaseHost'} = 'localhost';
$Self->{'Database'} = "dbase";
$Self->{'DatabaseUser'} = "dbaseuser";
$Self->{'DatabasePw'} = 'password';
$Self->{'DatabaseDSN'} = "DBI:mysql:database=$Self->{Database};host=$Self->{DatabaseHost}";
# ------------------ #
# fs root directory #
# ------------------ #
$Self->{Home} = 'C:/OTRS';
# ---------------------------------------- #
# Customer user backend and settings #
# ---------------------------------------- #
$Self->{CustomerUser} = {
Name => 'DB backend',
Module => 'Kernel::System::CustomerUser::DB',
Params => {
Table => 'customer_user',
CaseSensitive => 0,
},
# customer unique id
CustomerKey => 'login',
# customer #
CustomerID => 'customer_id',
CustomerValid => 'valid_id',
CustomerUserListFields => [ 'first_name', 'last_name', 'email' ],
CustomerUserSearchFields => [ 'login', 'first_name', 'last_name', 'customer_id' ],
CustomerUserSearchPrefix => '*',
CustomerUserSearchSuffix => '*',
CustomerUserSearchListLimit => 250,
CustomerUserPostMasterSearchFields => ['email'],
CustomerUserNameFields => [ 'title', 'first_name', 'last_name' ],
CustomerUserEmailUniqCheck => 1,
CustomerCompanySupport => 1,
# cache time to live in sec. - cache any database queries
CacheTTL => 60 * 60 * 24,
Map => [
# note: Login, Email and CustomerID needed!
# var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly, http-link-target, link class(es)
[ 'UserTitle', 'Title', 'title', 1, 0, 'var', '', 0 ],
[ 'UserFirstname', 'Firstname', 'first_name', 1, 1, 'var', '', 0 ],
[ 'UserLastname', 'Lastname', 'last_name', 1, 1, 'var', '', 0 ],
[ 'UserLogin', 'Username', 'login', 1, 1, 'var', '', 0 ],
[ 'UserPassword', 'Password', 'pw', 0, 0, 'var', '', 0 ],
[ 'UserEmail', 'Email', 'email', 1, 1, 'var', '', 0 ],
[ 'UserCustomerID', 'Office', 'customer_id', 1, 0, 'var', '', 0 ],
[ 'UserPhone', 'Phone', 'phone', 1, 0, 'var', '', 0 ],
[ 'UserFax', 'Fax', 'fax', 1, 0, 'var', '', 0 ],
[ 'UserMobile', 'Mobile', 'mobile', 1, 0, 'var', '', 0 ],
[ 'UserStreet', 'Company', 'street', 1, 0, 'var', '', 0 ],
[ 'UserCity', 'Language', 'city', 1, 0, 'var', '', 0 ],
[ 'UserCountry', 'Country', 'country', 1, 0, 'var', '', 0 ],
[ 'UserComment', 'Comment', 'comments', 1, 0, 'var', '', 0 ],
[ 'ValidID', 'Valid', 'valid_id', 0, 1, 'int', '', 0 ],
],
};
$Self->{CustomerCompany} = {
Name => 'DB backend',
Module => 'Kernel::System::CustomerCompany::DB',
Params => {
Table => 'customer_company',
CaseSensitive => 0,
},
# company unique id
CustomerCompanyKey => 'customer_id',
CustomerCompanyValid => 'valid_id',
CustomerCompanyListFields => ['name'],
CustomerCompanySearchFields => ['name'],
CustomerCompanySearchPrefix => '',
CustomerCompanySearchSuffix => '*',
CustomerCompanySearchListLimit => 250,
CacheTTL => 60 * 60 * 24,
Map => [
# var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly
[ 'CustomerID', 'Office ID', 'customer_id', 0, 1, 'var', '', 0 ],
[ 'CustomerCompanyName', 'Office', 'name', 1, 1, 'var', '', 0 ],
[ 'CustomerCompanyStreet', 'Street', 'street', 1, 0, 'var', '', 0 ],
[ 'CustomerCompanyZIP', 'Zip', 'zip', 1, 0, 'var', '', 0 ],
[ 'CustomerCompanyCity', 'City', 'city', 1, 0, 'var', '', 0 ],
[ 'CustomerCompanyCountry', 'Country', 'country', 1, 0, 'var', '', 0 ],
[ 'CustomerCompanyURL', 'URL', 'url', 1, 0, 'var', '$Data{"CustomerCompanyURL"}', 0 ],
[ 'CustomerCompanyComment', 'Comment', 'comments', 1, 0, 'var', '', 0 ],
[ 'ValidID', 'Valid', 'valid_id', 0, 1, 'int', '', 0 ],
],
};
# -------------------------------------------------- #
# Authentication for customer user and agent #
# -------------------------------------------------- #
# Customer user
$Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::HTTPBasicAuth';
# Agent
$Self->{'AuthModule'} = 'Kernel::System::Auth::HTTPBasicAuth';
# ---------------------------- #
# data inserted by installer #
# ---------------------------- #
$Self->{'LogModule'} = 'Kernel::System::Log::File';
$Self->{'LogModule::LogFile'} = 'C:/OTRS/var/log/otrs.log';
# $DIBI$
}
# ----------------------------------------- #
# needed system stuff (don't edit this) #
# ----------------------------------------- #
use base qw(Kernel::Config::Defaults);
# ------------------------------------------#
1;
Last edited by crythias on 29 Jul 2015, 18:47, edited 1 time in total.
Reason: [code] tags for sanity.
Reason: [code] tags for sanity.
OTRS 3.3.6 - Windows Server 2008 R2 standard - IIS 7.5
MySQL 5.1.51 - ActivePerl 5.16.2
MySQL 5.1.51 - ActivePerl 5.16.2
-
- Znuny advanced
- Posts: 121
- Joined: 30 Aug 2011, 10:48
- Znuny Version: 3.3.8 && 4.0.9
- Real Name: Artjoms Petrovs
- Location: Latvia
Re: No tickets showed in 'My tickets' view (customer interface - customer.pl)
Well, you should check that customer groups functionality is enabled in SysConfig and assign at least one group to every customer ( default groups )
I believe it might help with your issue
I believe it might help with your issue
Ar cieņu / Kind regards,
----------------------------------------
Artjoms Petrovs
Sistēmu analītiķis/Programmētājs /
Systems Analyst/Programmer
----------------------------------------
Artjoms Petrovs
Sistēmu analītiķis/Programmētājs /
Systems Analyst/Programmer
-
- Znuny newbie
- Posts: 29
- Joined: 23 Feb 2015, 19:02
- Znuny Version: 3.3.6
- Real Name: Roberto Anselmi
- Company: Deloitte XBS
Re: No tickets showed in 'My tickets' view (customer interface - customer.pl)
I just set up the customer groups functionality and I assigned all groups to the customers.
As I said, I use DB as customers backend and when I used the normal authentication method (DB login) and test the system with normal username (without the backslash '\') everything works fine.
It's frustrating ...
Roberto
As I said, I use DB as customers backend and when I used the normal authentication method (DB login) and test the system with normal username (without the backslash '\') everything works fine.
It's frustrating ...
Roberto
OTRS 3.3.6 - Windows Server 2008 R2 standard - IIS 7.5
MySQL 5.1.51 - ActivePerl 5.16.2
MySQL 5.1.51 - ActivePerl 5.16.2
-
- Moderator
- Posts: 10169
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: No tickets showed in 'My tickets' view (customer interface - customer.pl)
My tickets matches exactly the login user with the username (customer_user_id) of the ticket.
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
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
-
- Znuny newbie
- Posts: 29
- Joined: 23 Feb 2015, 19:02
- Znuny Version: 3.3.6
- Real Name: Roberto Anselmi
- Company: Deloitte XBS
Re: No tickets showed in 'My tickets' view (customer interface - customer.pl)
Hi, Crythias.
Your posts help me many times in the past, so thank you a lot.
I search the web and this forum about my problem, but without success.
The behaviour I describe take place only with customer_user.login like 'xxx\username' (i.e. with a backslash) in the DB backend.
In this case, when one login as customer user to customer.pl (with or without httpbasicauth method), OTRS tell him 'welcome, open your first ticket' always, even if this customer user has opened more than one ticket. So a customer user cannot follow his tickets.
On the other side, in the agent interface everything is right: I (as agent) can see all the tickets from this customer user associated to him.
Roberto
Your posts help me many times in the past, so thank you a lot.
I search the web and this forum about my problem, but without success.
The behaviour I describe take place only with customer_user.login like 'xxx\username' (i.e. with a backslash) in the DB backend.
In this case, when one login as customer user to customer.pl (with or without httpbasicauth method), OTRS tell him 'welcome, open your first ticket' always, even if this customer user has opened more than one ticket. So a customer user cannot follow his tickets.
On the other side, in the agent interface everything is right: I (as agent) can see all the tickets from this customer user associated to him.
Roberto
OTRS 3.3.6 - Windows Server 2008 R2 standard - IIS 7.5
MySQL 5.1.51 - ActivePerl 5.16.2
MySQL 5.1.51 - ActivePerl 5.16.2
-
- Znuny newbie
- Posts: 29
- Joined: 23 Feb 2015, 19:02
- Znuny Version: 3.3.6
- Real Name: Roberto Anselmi
- Company: Deloitte XBS
Re: No tickets showed in 'My tickets' view (customer interface - customer.pl)
I see in another thread about a similar problem that you say:
"Customers will see tickets in "My Tickets" if:
they are members of the group that the ticket is in the queue of the same group
AND
the login of the current user matches the login/customer_user_id (not customer_id) of the ticket.
CustomerGroupSupport off = customer is able to see all groups
CustomerGroupSupport on = customer is a member of CustomerGroupsAlwaysGroups and directly assigned Customers <-> Groups"
I check every single point and everything 'seems' right.
Weird .
"Customers will see tickets in "My Tickets" if:
they are members of the group that the ticket is in the queue of the same group
AND
the login of the current user matches the login/customer_user_id (not customer_id) of the ticket.
CustomerGroupSupport off = customer is able to see all groups
CustomerGroupSupport on = customer is a member of CustomerGroupsAlwaysGroups and directly assigned Customers <-> Groups"
I check every single point and everything 'seems' right.
Weird .
OTRS 3.3.6 - Windows Server 2008 R2 standard - IIS 7.5
MySQL 5.1.51 - ActivePerl 5.16.2
MySQL 5.1.51 - ActivePerl 5.16.2
-
- Znuny newbie
- Posts: 29
- Joined: 23 Feb 2015, 19:02
- Znuny Version: 3.3.6
- Real Name: Roberto Anselmi
- Company: Deloitte XBS
Re: No tickets showed in 'My tickets' view (customer interface - customer.pl)
Hi, all.
Trying to resolve my little problem, I understand that the authentication system adopted doesn't matter.
So I open another thread focused on the fact that I don't see any ticket in 'My Tickets' (costumer interface - customer.pl) using the normal authentication method (DB): "No tickets in 'My Tickets' view (Db customer authentication)".
Roberto
Trying to resolve my little problem, I understand that the authentication system adopted doesn't matter.
So I open another thread focused on the fact that I don't see any ticket in 'My Tickets' (costumer interface - customer.pl) using the normal authentication method (DB): "No tickets in 'My Tickets' view (Db customer authentication)".
Roberto
OTRS 3.3.6 - Windows Server 2008 R2 standard - IIS 7.5
MySQL 5.1.51 - ActivePerl 5.16.2
MySQL 5.1.51 - ActivePerl 5.16.2