File: URL in Children field causes 'Can't call method "Id"' error in Display page

Hi all,

My department is evaluating RT, and one of the things we’re exploring involves linking to files on our network (supporting documents), so I’ve been trying to figure out the best way/place to put a file: URL in a ticket. Attaching the files is sub-optimal because the files in question can change, and it gets too messy attaching multiple versions and expecting people to find the right one. The only way I’ve found to have RT create a link from a URL is to put it in one of the Links fields (Parents, Children, etc.), but that’s where my problem pops up.

I can use any of the Links fields except Children, but the Children field seems the most appropriate. The problem is, I put a file: URL in the Children field, and when I’m on the ModifyLinks page everything looks fine, but when I switch back to Display, the page draws okay until it gets to the Links section, where it displays a System Error in place of the Links section. This does not occur with any of the other Links fields. I have pasted the error text below.

We’re using RT 3.4.1 because it was easy to install from Debian, which is what our dev box runs. I realize the Links fields are intended to house RT tickets, not miscellaneous files, so in addition to help with this error, I welcome suggestions for better ways to accomplish making supporting files on our local network available in tickets.

Thanks!


HTTP/1.1 200 OK Date: Wed, 20 Sep 2006 18:07:48 GMT Server: Apache/1.3.33 (Debian GNU/Linux) mod_ssl/2.8.22 OpenSSL/0.9.7e mod_perl/1.29 Pragma: no-cache Cache-control: no-cache Keep-Alive: timeout=15, max=99 Connection: Keep-Alive, Keep-Alive Transfer-Encoding: chunked, chunked Content-Type: text/html; charset=iso-8859-1

System error

error: Can’t call method “Id” on an undefined value at /usr/share/request-tracker3.4/html/Ticket/Elements/ShowMembers line 50.

context: …
46: % if ($members->Count) {
47:


    48: % while (my $link = $members->Next) {
    49: % my $member= $link->BaseObj;
    50:
  • <%$member->Id%>: <%$member->Subject%> [<%loc($member->Status)%>]

    51: % if ($depth < 8) {
    52: <&/Ticket/Elements/ShowMembers, Ticket => $member, depth => ($depth+1) &>
    53: % }
    54: % }

    code stack: /usr/share/request-tracker3.4/html/Ticket/Elements/ShowMembers:50
    /usr/share/request-tracker3.4/html/Elements/ShowLinks:79
    /usr/share/request-tracker3.4/html/Ticket/Elements/ShowSummary:87
    /usr/share/request-tracker3.4/html/Ticket/Display.html:57
    /usr/share/request-tracker3.4/html/autohandler:215

    raw error

    Can’t call method “Id” on an undefined value at /usr/share/request-tracker3.4/html/Ticket/Elements/ShowMembers line 50.

    Trace begun at /usr/local/share/perl/5.8.4/HTML/Mason/Exceptions.pm line 129
    HTML::Mason::Exceptions::rethrow_exception(‘Can’t call method “Id” on an undefined value at /usr/share/request-tracker3.4/html/Ticket/Elements/ShowMembers line 50.^J’) called at /usr/share/request-tracker3.4/html/Ticket/Elements/ShowMembers line 50
    HTML::Mason::Commands::ANON(‘Ticket’, ‘RT::Ticket=HASH(0x9b64ce8)’) called at /usr/local/share/perl/5.8.4/HTML/Mason/Component.pm line 135
    HTML::Mason::Component::run(‘HTML::Mason::Component::FileBased=HASH(0x9eb3e3c)’, ‘Ticket’, ‘RT::Ticket=HASH(0x9b64ce8)’) called at /usr/local/share/perl/5.8.4/HTML/Mason/Request.pm line 1251
    eval {…} at /usr/local/share/perl/5.8.4/HTML/Mason/Request.pm line 1245
    HTML::Mason::Request::comp(undef, undef, ‘Ticket’, ‘RT::Ticket=HASH(0x9b64ce8)’) called at /usr/share/request-tracker3.4/html/Elements/ShowLinks line 79
    HTML::Mason::Commands::ANON(‘Ticket’, ‘RT::Ticket=HASH(0x9b64ce8)’) called at /usr/local/share/perl/5.8.4/HTML/Mason/Component.pm line 135
    HTML::Mason::Component::run(‘HTML::Mason::Component::FileBased=HASH(0x9eb08b8)’, ‘Ticket’, ‘RT::Ticket=HASH(0x9b64ce8)’) called at /usr/local/share/perl/5.8.4/HTML/Mason/Request.pm line 1251
    eval {…} at /usr/local/share/perl/5.8.4/HTML/Mason/Request.pm line 1245
    HTML::Mason::Request::comp(undef, undef, ‘Ticket’, ‘RT::Ticket=HASH(0x9b64ce8)’) called at /usr/share/request-tracker3.4/html/Ticket/Elements/ShowSummary line 87
    HTML::Mason::Commands::ANON(‘Ticket’, ‘RT::Ticket=HASH(0x9b64ce8)’, ‘Attachments’, ‘RT::Attachments=HASH(0x9da3488)’) called at /usr/local/share/perl/5.8.4/HTML/Mason/Component.pm line 135
    HTML::Mason::Component::run(‘HTML::Mason::Component::FileBased=HASH(0x9e375e8)’, ‘Ticket’, ‘RT::Ticket=HASH(0x9b64ce8)’, ‘Attachments’, ‘RT::Attachments=HASH(0x9da3488)’) called at /usr/local/share/perl/5.8.4/HTML/Mason/Request.pm line 1251
    eval {…} at /usr/local/share/perl/5.8.4/HTML/Mason/Request.pm line 1245
    HTML::Mason::Request::comp(undef, undef, ‘Ticket’, ‘RT::Ticket=HASH(0x9b64ce8)’, ‘Attachments’, ‘RT::Attachments=HASH(0x9da3488)’) called at /usr/share/request-tracker3.4/html/Ticket/Display.html line 57
    HTML::Mason::Commands::ANON(‘id’, 16, ‘id’, 16) called at /usr/local/share/perl/5.8.4/HTML/Mason/Component.pm line 135
    HTML::Mason::Component::run(‘HTML::Mason::Component::FileBased=HASH(0x9d44fc0)’, ‘id’, 16, ‘id’, 16) called at /usr/local/share/perl/5.8.4/HTML/Mason/Request.pm line 1251
    eval {…} at /usr/local/share/perl/5.8.4/HTML/Mason/Request.pm line 1245
    HTML::Mason::Request::comp(undef, undef, ‘id’, 16, ‘id’, 16) called at /usr/local/share/perl/5.8.4/HTML/Mason/Request.pm line 914
    HTML::Mason::Request::call_next(‘HTML::Mason::Request::ApacheHandler=HASH(0x9da68dc)’, ‘id’, 16) called at /usr/share/request-tracker3.4/html/autohandler line 215
    HTML::Mason::Commands::ANON(‘id’, 16) called at /usr/local/share/perl/5.8.4/HTML/Mason/Component.pm line 135
    HTML::Mason::Component::run(‘HTML::Mason::Component::FileBased=HASH(0x9ad9dc8)’, ‘id’, 16) called at /usr/local/share/perl/5.8.4/HTML/Mason/Request.pm line 1246
    eval {…} at /usr/local/share/perl/5.8.4/HTML/Mason/Request.pm line 1245
    HTML::Mason::Request::comp(undef, undef, undef, ‘id’, 16) called at /usr/local/share/perl/5.8.4/HTML/Mason/Request.pm line 459
    eval {…} at /usr/local/share/perl/5.8.4/HTML/Mason/Request.pm line 459
    eval {…} at /usr/local/share/perl/5.8.4/HTML/Mason/Request.pm line 411
    HTML::Mason::Request::exec(‘HTML::Mason::Request::ApacheHandler=HASH(0x9da68dc)’) called at /usr/local/share/perl/5.8.4/HTML/Mason/ApacheHandler.pm line 168
    HTML::Mason::Request::ApacheHandler::exec(‘HTML::Mason::Request::ApacheHandler=HASH(0x9da68dc)’) called at /usr/local/share/perl/5.8.4/HTML/Mason/ApacheHandler.pm line 826
    HTML::Mason::ApacheHandler::handle_request(‘HTML::Mason::ApacheHandler=HASH(0x862ab50)’, ‘Apache=SCALAR(0x82049d0)’) called at /usr/share/request-tracker3.4/libexec/webmux.pl line 137
    eval {…} at /usr/share/request-tracker3.4/libexec/webmux.pl line 137
    RT::Mason::handler(‘Apache=SCALAR(0x82049d0)’) called at /dev/null line 0
    eval {…} at /dev/null line 0

Hi all,

My department is evaluating RT, and one of the things we’re exploring involves linking to files on our network (supporting documents), so I’ve been trying to figure out the best way/place to put a file: URL in a ticket. Attaching the files is sub-optimal because the files in question can change, and it gets too messy attaching multiple versions and expecting people to find the right one. The only way I’ve found to have RT create a link from a URL is to put it in one of the Links fields (Parents, Children, etc.), but that’s where my problem pops up.

I can use any of the Links fields except Children, but the Children field seems the most appropriate. The problem is, I put a file: URL in the Children field, and when I’m on the ModifyLinks page everything looks fine, but when I switch back to Display, the page draws okay until it gets to the Links section, where it displays a System Error in place of the Links section. This does not occur with any of the other Links fields. I have pasted the error text below.

I’m almost certain that this was fixed for 3.4.5. But I’d probably use
"Refers to" rather than children, myself.

Best,
Jesse

Jesse wrote:>On Wed, Sep 20, 2006 at 01:47:45PM -0600, Worsley, John wrote:

Hi all,

[…]

I can use any of the Links fields except Children, but the Children
field seems the most appropriate. The problem is, I put a file: URL
in the Children field, and when I’m on the ModifyLinks page
everything looks fine, but when I switch back to Display, the page
draws okay until it gets to the Links section, where it displays a
System Error in place of the Links section. This does not occur
with any of the other Links fields. I have pasted the error text
below.

I’m almost certain that this was fixed for 3.4.5. But I’d probably
use “Refers to” rather than children, myself.

This problem still occurs in 3.6.1 with non local URLs of any type. If
you copy share/html/Ticket/Elements/ShowMembers to
local/html/Ticket/Elements/ and apply the following patch, you should
be OK. I’m not sure whether this is the best way to do it, but it
works for us here.

— local/html/Ticket/Elements/ShowMembers.orig 2006-06-19 22:44:04.000000000 +0000
+++ local/html/Ticket/Elements/ShowMembers 2006-09-26 04:50:07.000000000 +0000
@@ -46,12 +46,18 @@
% if ($members->Count) {

    % while (my $link = $members->Next) { +% if ($link->LocalBase) { % my $member= $link->BaseObj;
  • <%$member->Id%>: <%$member->Subject%> [<%loc($member->Status)%>]
    % if ($depth < 8) { <&/Ticket/Elements/ShowMembers, Ticket => $member, depth => ($depth+1) &> % } % } +% else { +% my $url = $link->Base; +
  • <%$url%>
    +% } +% }
% }

Michael Brader michael.brader@youramigo.com

IMPORTANT - This email message is for the sole use of the intended
recipient(s) and may contain confidential and privileged information in
which case neither is intended to be waived. YourAmigo retains ownership of
all copyright, trade secrets and other intellectual property rights in the
email and attachments. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
notify us and remove it from your system. It is your responsibility to check
any attachments for viruses and defects before opening or sending them on.
YourAmigo collects personal information to provide and market our services.
For more information about use, disclosure and access, see our privacy
policy at http://www.youramigo.com

Thanks! Will that fix work for 3.4.1?
I intend to upgrade but it will be a while since the new version will be going on a Solaris box.

Jesse wrote:>On Wed, Sep 20, 2006 at 01:47:45PM -0600, Worsley, John wrote:

Hi all,

[…]

I can use any of the Links fields except Children, but the Children
field seems the most appropriate. The problem is, I put a file: URL
in the Children field, and when I’m on the ModifyLinks page
everything looks fine, but when I switch back to Display, the page
draws okay until it gets to the Links section, where it displays a
System Error in place of the Links section. This does not occur
with any of the other Links fields. I have pasted the error text
below.

I’m almost certain that this was fixed for 3.4.5. But I’d probably
use “Refers to” rather than children, myself.

This problem still occurs in 3.6.1 with non local URLs of any type. If
you copy share/html/Ticket/Elements/ShowMembers to
local/html/Ticket/Elements/ and apply the following patch, you should
be OK. I’m not sure whether this is the best way to do it, but it
works for us here.

— local/html/Ticket/Elements/ShowMembers.orig 2006-06-19 22:44:04.000000000 +0000
+++ local/html/Ticket/Elements/ShowMembers 2006-09-26 04:50:07.000000000 +0000
@@ -46,12 +46,18 @@
% if ($members->Count) {

    % while (my $link = $members->Next) { +% if ($link->LocalBase) { % my $member= $link->BaseObj;
  • <%$member->Id%>: <%$member->Subject%> [<%loc($member->Status)%>]
    % if ($depth < 8) { <&/Ticket/Elements/ShowMembers, Ticket => $member, depth => ($depth+1) &> % } % } +% else { +% my $url = $link->Base; +
  • <%$url%>
    +% } +% }
% }

Michael Brader michael.brader@youramigo.com

Worsley, John writes:

Thanks! Will that fix work for 3.4.1?

I don’t know, but I’d guess it would. I got the method/member names
rom RT Essentials so I doubt they’re new. Why don’t you give it a try?

Michael Brader michael.brader@youramigo.com