Feature request: specialized mutators for creating Links

I’ve been doing serious workflow (fun, once you’ve added enough
debugging code) and have a feature request: I’d like an easy way to add
a dependency link (DependsOn/DependedOnBy) for a ticket. AFAIK, you have
to call

$ticket->AddLink(Type=>“DependsOn”, Target=>$approval_ticket->URI);

to add a dependency. Don’t get me started on how long it took to figure
out where URI() was located. :slight_smile: What I’d really like is something like:

$ticket->AddDependsOnLink($other_ticket_obj);
$ticket->RemoveDependsOnLink($other_ticket_obj);

Yes, this is syntatic sugar but do I really need to know how to generate
a Ticket’s URI? We have lots of other wrappers, but none for simple
linking. If there is interest, I’d be happy to put together a patch.

Thanks,
Drew

I’ve been doing serious workflow (fun, once you’ve added enough
debugging code) and have a feature request: I’d like an easy way to add
a dependency link (DependsOn/DependedOnBy) for a ticket. AFAIK, you have
to call

$ticket->AddLink(Type=>“DependsOn”, Target=>$approval_ticket->URI);

to add a dependency. Don’t get me started on how long it took to figure
out where URI() was located. :slight_smile: What I’d really like is something like:

$ticket->AddDependsOnLink($other_ticket_obj);
$ticket->RemoveDependsOnLink($other_ticket_obj);

Yes, this is syntatic sugar but do I really need to know how to generate
a Ticket’s URI? We have lots of other wrappers, but none for simple
linking. If there is interest, I’d be happy to put together a patch.

I’d really rather not go further on the path to “multiple accessors and
mutators per link type”

However. I’d love a patch that can cope with tickets directly, rather
than just their URIs. (I thought we could already)

-----Original Message-----
From: Jesse Vincent [mailto:jesse@bestpractical.com]
Sent: Thursday, July 20, 2006 6:50 PM
To: Drew Taylor
Cc: rt-devel@lists.bestpractical.com
Subject: Re: [Rt-devel] Feature request: specialized mutators
for creating Links

I’d really rather not go further on the path to “multiple
accessors and mutators per link type”

However. I’d love a patch that can cope with tickets
directly, rather than just their URIs. (I thought we could already)

I just looked through Ticket::AddLink(), Ticket::_AddLink(),
Record::_AddLink() and didn’t see anything obvious about automatically
converting a ticket into the required URI. I’d be happy to work on a
patch if I am indeed not overlooking something. Documenting the proper
values for Target|Base would be included. :slight_smile:

Drew