User's Owned Tickets show incorrect URL string for subject

Hi everyone,

Not sure where to take this one. Tried a couple google searches but the
problem is pretty generic to describe and thus difficult to get relevant
results.

Here is my problem. When doing a search for tickets you own, or on the
RT at a glance page, if you mouse over or try to click on the
hyperlinked ticket subject you get the following URL:
http://ticket/Display.html?id=2. Obviously that URL isn’t going to
work. If you click on the ticket number or check on the “10 newest
unowned tickets” section, the hyperlink is correct and takes you to the
ticket.

I’ve checked my RT_SiteConfig.pm file and it appears to be correct.
Everything else seems to work except that, and obviously its causing
quite a stir for my users since they click on their ticket and firefox
tries to auto resolve the domain taking them to a concert ticket website
:).

Any help is appreciated. I can post logs, configs, whatever is needed.

Thanks,
Josh

Josh Barron wrote:

When doing a search for tickets you own, or on the
RT at a glance page, if you mouse over or try to click on the
hyperlinked ticket subject you get the following URL:
http://ticket/Display.html?id=2. Obviously that URL isn’t going to
work.
Yes, I’ve reported this problem twice on this list and received no response.

-Kevin Murphy

At the very least could someone point me in the right direction to where
the page is generating that URL string? Maybe I could try to debug it
from there?

Also, to Kevin, are you running version 3.6.0?

-Josh

[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Kevin
MurphySent: Monday, July 03, 2006 11:42 AM
To: RT Users
Subject: Re: [rt-users] User’s Owned Tickets show incorrect URL string
forsubject

Josh Barron wrote:

When doing a search for tickets you own, or on the
RT at a glance page, if you mouse over or try to click on the
hyperlinked ticket subject you get the following URL:
http://ticket/Display.html?id=2. Obviously that URL isn’t going to
work.
Yes, I’ve reported this problem twice on this list and received no
response.

-Kevin Murphy

http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

We’re hiring! Come hack Perl for Best Practical:

Josh Barron wrote:

At the very least could someone point me in the right direction to where
the page is generating that URL string? Maybe I could try to debug it
from there?

Also, to Kevin, are you running version 3.6.0?

Yes, I’m running 3.6.0.

It appears to be a bug in etc/initialdata, but that gets loaded into the
database (by rt-setup-database) when RT is installed, so that doesn’t
directly help us.

In:

@Attributes = (
{ Name => ‘Search - My Tickets’,
Description => ‘[_1] highest priority tickets I own’, # loc
Content =>
{ Format => “’<a
href=“WebPath/Ticket/Display.html?id=id”>id/TITLE:#’,
’<a
href=”$RT::WebPath/Ticket/Display.html?id=id">Subject/TITLE:Subje
ct’, Priority, QueueName, ExtendedStatus",
Query => " Owner = ‘CurrentUser’ AND ( Status = ‘new’ OR
Status = ‘open’)",
OrderBy => ‘Priority’,
Order => ‘DESC’ },
},

it looks like “$RT::WebPath” should be “WebPath

I’m sure an RT guru could pretty easily delete the 'Search - My Tickets’
record from the attributes table in the database and then re-insert the
above record using a modified etc/initialdata file, but I don’t know how
to do it safely without spending time reading code.

I’m just talking out of my ^%# here, so I may be totally wrong on any or
all of the above comments.

Kevin Murphy

The search results are displayed at /rt/Search/Results.html. Looking the
/html/Search/Results.html source code we find out
that the component used to display the results is /Elements/TicketList.
In this component there’s a call to other in order to display the row,
but this action is governed by the $Format variable. That can be passed
to the component or use the $RT::DefaultSearchResultFormat default.

So, in the RT_Config.pm there must be a Set($DefaultSearchResultFormat,
), and actually there is! :slight_smile:
The value I can se here is:


Set ($DefaultSearchResultFormat, qq{
id/TITLE:#’,
Subject/TITLE:Subject’,
Status,
QueueName,
OwnerName,
Priority,
NEWLINE’,
’’,
Requestors’,
CreatedRelative’,
ToldRelative’,
LastUpdatedRelative’,
TimeLeft’});

The first two lines are responsible for the first two columns, ticket id
and subject. They will work if the WebPath is set correctly in my
RT_SiteConfig.pm, and for me they work.

But RT allows users to customize the search format display (it’s a per
user configuration), and it may be the problem’s source.
If it is, then these configurations must be deleted. (DELETE FROM
Attributes WHERE Name = ‘SearchDisplay’, in MySQL, may in PostgreeSQL
too, but i’m not sure :slight_smile: ). Use this with caution, all user’s
SearchDisplay will be deleted and the default (set in RT_Config.pm, or
overridden in RT_SiteConfig.pm) used.

By the way, I’m using RT 3.6.

Gilmar Santos Jr

Josh Barron escreveu:

Gilmar Santos Jr wrote:

But RT allows users to customize the search format display (it’s a per
user configuration), and it may be the problem’s source.
If it is, then these configurations must be deleted. (DELETE FROM
Attributes WHERE Name = ‘SearchDisplay’, in MySQL, may in PostgreeSQL
too, but i’m not sure :slight_smile: ). Use this with caution, all user’s
SearchDisplay will be deleted and the default (set in RT_Config.pm, or
overridden in RT_SiteConfig.pm) used.

Yes, my problem (and probably Josh’s) is that the attributes table entry
where name is ‘Search - My Tickets’ exists and has a content column
populated with the mimed/frozen version of the seemingly bad content
data in etc/initialdata.

If I replace that with the mimed/frozen version of the “fixed” version
of that record in etc/initialdata, then the “N highest priority tickets
I own” display is correct.

-Kevin Murphy

Kevin Murphy escreveu:

Yes, my problem (and probably Josh’s) is that the attributes table
entry where name is ‘Search - My Tickets’ exists and has a content
column populated with the mimed/frozen version of the seemingly bad
content data in etc/initialdata.

If I replace that with the mimed/frozen version of the “fixed” version
of that record in etc/initialdata, then the “N highest priority
tickets I own” display is correct.
That’s absolutely right!
I’ve just looked the “Format” field of attribute 'Search - My Tickets’
and the $RT::WebPath was replaced by the actual value, so things would
break if I changed this value (the database wouldn’t be upgraded).

To solve the problem its enough to remove from database the wrong
version of the registers, modify the initialdata (replace $RT::WebPath
by WebPath and erase all other things) and run rt-setup-database
–action insert --datafile :slight_smile:

Where can I report this bug to authors? (Since they are subscribed to
this list… is it necessary? :slight_smile: )

Gilmar Santos Jr

Gilmar Santos Jr wrote:

Where can I report this bug to authors? (Since they are subscribed to
this list… is it necessary? :slight_smile: )

I sent a patch of etc/initialdata to rt-bugs@fsck.com

I think one can either send there or to the rt-devel list.

-Kevin