How to get RT ticket links

How can I get a hash of links from rt?

By links I mean (Depends on, Depended on by, Parents, Children, Refers to
and, Referred to by).

This will be a script in perl that runs remotely and connects to an RT
machine. my research led me to module RT::Client::REST. It can retrieve
other info on a ticket but not the links. any idea how I can get a hash of
links from rt?

Currently RT::Client::REST->show() only returns

$VAR1 = {
‘TimeEstimated’ => ‘’,
‘Status’ => ‘open’,
‘Queue’ => ‘q1’,
‘AdminCc’ => ‘’,
‘Requestors’ => ‘log@log.com’,
‘Started’ => ‘Thu Feb 19 1:02:58 2009’,
‘InitialPriority’ => ‘40’,
‘Starts’ => ‘Not set’,
‘TimeWorked’ => ‘’,
‘id’ => ‘ticket/2’,
‘Told’ => ‘Not set’,
‘Cc’ => ‘’,
‘Subject’ => ‘test ticket’,
‘FinalPriority’ => ‘90’,
‘TimeLeft’ => ‘’,
‘Creator’ => ‘guy’,
‘Owner’ => ‘guy’,
‘Resolved’ => ‘Not set’,
‘Created’ => ‘Tue Feb 17 13:22:11 2009’,
‘Priority’ => ‘42’,
‘Due’ => ‘Not set’
};

-Mohy

URI: REST/1.0/ticket/nn/links/show

Give it a try. I don’t know if there’s a convenient function for it in
RT::Client::REST but I’ll be adding it to my rt-client ruby gem shortly.

Mohy Farag wrote:

How can I get a hash of links from rt?

By links I mean (Depends on, Depended on by, Parents, Children, Refers to
and, Referred to by).

This will be a script in perl that runs remotely and connects to an RT
machine. my research led me to module RT::Client::REST. It can retrieve
other info on a ticket but not the links. any idea how I can get a hash of
links from rt?

Currently RT::Client::REST->show() only returns

$VAR1 = {
‘TimeEstimated’ => ‘’,
‘Status’ => ‘open’,
‘Queue’ => ‘q1’,
‘AdminCc’ => ‘’,
‘Requestors’ => ‘log@log.com’,
‘Started’ => ‘Thu Feb 19 1:02:58 2009’,
‘InitialPriority’ => ‘40’,
‘Starts’ => ‘Not set’,
‘TimeWorked’ => ‘’,
‘id’ => ‘ticket/2’,
‘Told’ => ‘Not set’,
‘Cc’ => ‘’,
‘Subject’ => ‘test ticket’,
‘FinalPriority’ => ‘90’,
‘TimeLeft’ => ‘’,
‘Creator’ => ‘guy’,
‘Owner’ => ‘guy’,
‘Resolved’ => ‘Not set’,
‘Created’ => ‘Tue Feb 17 13:22:11 2009’,
‘Priority’ => ‘42’,
‘Due’ => ‘Not set’
};

-Mohy


The rt-users Archives

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

– ============================
Tom Lahti
BIT Statement LLC

(425)251-0833 x 117
http://www.bitstatement.net/
– ============================

Mohy Farag wrote:
How can I get a hash of links from rt?

Tom wrote:
URI: REST/1.0/ticket/nn/links/show

Give it a try. I don’t know if there’s a convenient function for it in
RT::Client::REST but I’ll be adding it to my rt-client ruby gem shortly.

rt-client has been updated, version 0.2.2 now includes a links() method for
this. Available on rubyforge, or just “gem install rt-client”. Docs at
http://rt-client.rubyforge.org/

P.S. I can’t believe I top-posted. What a newb.

– ============================
Tom Lahti
BIT Statement LLC

(425)251-0833 x 117
http://www.bitstatement.net/
– ============================

Thanks for your prompt replies but, I need a solution in perl.

-MohyOn Mon, 1 Jun 2009, Tom Lahti wrote:

Mohy Farag wrote:
How can I get a hash of links from rt?

Tom wrote:
URI: REST/1.0/ticket/nn/links/show

Give it a try. I don’t know if there’s a convenient function for it in
RT::Client::REST but I’ll be adding it to my rt-client ruby gem shortly.

rt-client has been updated, version 0.2.2 now includes a links() method for
this. Available on rubyforge, or just “gem install rt-client”. Docs at
http://rt-client.rubyforge.org/

P.S. I can’t believe I top-posted. What a newb.


– ============================
Tom Lahti
BIT Statement LLC

(425)251-0833 x 117
http://www.bitstatement.net/
– ============================

Mohy Farag wrote:

Thanks for your prompt replies but, I need a solution in perl.

-Mohy

There I cannot help you. RT::Client::REST seems to be written by Dmitri
Tikhonov dtikhonov@yahoo.com, you might try seeing if he’s on the RT
developer list, or as a last resort, email him directly.

– ============================
Tom Lahti
BIT Statement LLC

(425)251-0833 x 117
http://www.bitstatement.net/
– ============================

Actually there are more developers who has rights to change this
module, so it’s better to start from rt.cpan.org instead of direct
mailing main maintainer:

http://rt.cpan.org/Public/Dist/Display.html?Name=RT-Client-REST

Looks like that links listing via REST is not implemented in this
extension, but I believe that wouldn’t be hard to add using
transactions method as example.On Tue, Jun 2, 2009 at 1:46 AM, Tom Lahti toml@bitstatement.net wrote:

Mohy Farag wrote:

Thanks for your prompt replies but, I need a solution in perl.

-Mohy

There I cannot help you. RT::Client::REST seems to be written by Dmitri
Tikhonov dtikhonov@yahoo.com, you might try seeing if he’s on the RT
developer list, or as a last resort, email him directly.


– ============================
Tom Lahti
BIT Statement LLC

(425)251-0833 x 117
http://www.bitstatement.net/
– ============================


The rt-users Archives

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

Best regards, Ruslan.