http://ticket/Display.html bug in request-tracker

After installing request-tracker3.6 on debian etch via the package, the ‘RT at a glance’ screen has default search named ’10 highest priority tickets I own’ (or ‘[_1] highest priority tickets I own’). The ticket # column links fine but the subject column creates links like: ‘http://ticket/Display.html?id=13’ that lack the hostname. This is due to a bug in initialdata:

/etc/request-tracker3.6/initialdata contains on line 595:

"$RT::WebPath/Ticket/Display.html?id=__id__\">__Subject__

When it should contain:

"$RT::__WebPath__/Ticket/Display.html?id=__id__\">__Subject__

Which is setup when you first create your database. I see a report of fixing it with rt-setup-database that lacks instructions on how to do so.

I finally found instructions here which amounted to:

1) Use mysql (mysql, then ‘use rtdb;’ or whatever the name of your db is) to find the id of the search entry: ‘select id, Name from Attributes WHERE Name = ‘Search – My Tickets’;’
2) Delete this entry: ‘DELETE FROM Attributes WHERE id = x;’ where x is the ID from above
3) Put the following in a file named repair-search:


@Attributes = (
{ Name => 'Search - My Tickets',
Description => '[_1] highest priority tickets I own', # loc
Content =>
{ Format => "'__id__/TITLE:#', '__Subject__/TITLE:Subject', Priority, QueueName, ExtendedStatus",
Query => " Owner = '__CurrentUser__' AND ( Status = 'new' OR Status = 'open')",
OrderBy => 'Priority',
Order => 'DESC' },
},
);

4) run ‘ rt-setup-database –action insert –datafile repair-search –dba rtuser’ where rtuser is the name of your rtuser.

Things just worked after this, no need to restart apache or clear the mason cache or anything.

It was an upstream bug, debian bug here, references in RT #7637, #7657 and #7854.

1 thought on “http://ticket/Display.html bug in request-tracker

  1. Klaus Engelmann

    Hi, I just read your post and it’s exactly the same problem I have. I finished a brand new RT installation on CentOS 5.2 (version rt3-3.6.5-3.el5).

    For some days it worked fine. Now I cannot display the tickets just like you described (http://ticket/Display.html?id=1).

    I followed your advice but I am unsucessful. I saw inside the initialdata and I found that everything is right.

    I tried to change __WebPath__ to $RT::__WebPath__ and nothing changes. I also execute your repair-search without positive results.

    Please, help me. I can’t find a solution to this problem.

    Thanks, Klaus

    @Attributes = (
    { Name => ‘Search – My Tickets’,
    Description => ‘[_1] highest priority tickets I own’, # loc
    Content =>
    { Format => “‘__id__/TITLE:#’, ‘__Subject__/TITLE:Subject’, Priority, QueueName, ExtendedStatus”,
    Query => ” Owner = ‘__CurrentUser__’ AND ( Status = ‘new’ OR Status = ‘open’)”,
    OrderBy => ‘Priority’,
    Order => ‘DESC’ },
    },
    { Name => ‘Search – Unowned Tickets’,
    Description => ‘[_1] newest unowned tickets’, # loc
    Content =>
    # ‘Take’ #loc
    { Format => “‘__id__/TITLE:#’, ‘__Subject__/TITLE:Subject’, QueueName, ExtendedStatus, CreatedRelative, ‘__loc(Take)__/TITLE: ‘ “,
    Query => ” Owner = ‘Nobody’ AND ( Status = ‘new’ OR Status = ‘open’)”,
    OrderBy => ‘Created’,
    Order => ‘DESC’ },
    },
    { Name => ‘HomepageSettings’,
    Description => ‘HomepageSettings’,
    Content =>
    { ‘body’ => # loc
    [ { type => ‘system’, name => ‘My Tickets’ },
    { type => ‘system’, name => ‘Unowned Tickets’ },
    { type => ‘component’, name => ‘QuickCreate’},
    ],
    ‘summary’ => # loc
    [
    { type => ‘component’, name => ‘MyReminders’ },
    { type => ‘component’, name => ‘Quicksearch’ },
    { type => ‘component’, name => ‘RefreshHomepage’ },
    ]
    },
    }
    );

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.