Patch for link shredding

The attached patch enables shredding of links that point to local objects
that define different link types than RT::Ticket. (Asset Tracker defines
it’s own link types.)

BTW, shouldn’t link definitions be stored somewhere other than RT::Ticket?
It seems the generalization of RT links has not been fully realized.

Jesse, please let me know if the attached patch isn’t in the preferred
format. This is my first time generating a patch using git and I’m not sure
if I used the correct options for your preferred workflow.

-Todd

0001-Allow-Link-object-shredding-for-link-type-not-define.patch (1.59 KB)

Hi Todd,

Looks good to me. It’s not going into 3.8, but into 3.9-trunk branch.
Any chance you can write some tests around shredding links?On Mon, Oct 25, 2010 at 7:09 PM, Todd Chapman todd@chaka.net wrote:

The attached patch enables shredding of links that point to local objects
that define different link types than RT::Ticket. (Asset Tracker defines
it’s own link types.)
BTW, shouldn’t link definitions be stored somewhere other than RT::Ticket?
It seems the generalization of RT links has not been fully realized.
Jesse, please let me know if the attached patch isn’t in the preferred
format. This is my first time generating a patch using git and I’m not sure
if I used the correct options for your preferred workflow.
-Todd


List info: The rt-devel Archives

Best regards, Ruslan.

Hi Ruslan,

w00t! First RT patch in some years. :slight_smile:

What is keeping the patch from RT 3.8? For the new AT release I have to
override RT::ticket::LINKTYPEMAP(). :frowning:

I’ll try to get some time to add tests. That shredding code is not the
easiest to understand but I am getting there!

Should we relocate the link definitions to RT::Link and then add a method to
RT::Record that returns valid link types for the object?On Tue, Oct 26, 2010 at 8:37 PM, Ruslan Zakirov ruz@bestpractical.comwrote:

Hi Todd,

Looks good to me. It’s not going into 3.8, but into 3.9-trunk branch.
Any chance you can write some tests around shredding links?

On Mon, Oct 25, 2010 at 7:09 PM, Todd Chapman todd@chaka.net wrote:

The attached patch enables shredding of links that point to local objects
that define different link types than RT::Ticket. (Asset Tracker defines
it’s own link types.)
BTW, shouldn’t link definitions be stored somewhere other than
RT::Ticket?
It seems the generalization of RT links has not been fully realized.
Jesse, please let me know if the attached patch isn’t in the preferred
format. This is my first time generating a patch using git and I’m not
sure
if I used the correct options for your preferred workflow.
-Todd


List info:
The rt-devel Archives


Best regards, Ruslan.

Hi.

Sure link maps should be expanded over all records. If you’re going to work
on this then fork rt on github and publish changes earlier, so we can
review. This is especially important if you want to push it into core.

Regards, Ruslan. From phone.

Hi Ruslan,

w00t! First RT patch in some years. :slight_smile:

What is keeping the patch from RT 3.8? For the new AT release I have to
override RT::ticket::LINKTYPEMAP(). :frowning:

I’ll try to get some time to add tests. That shredding code is not the
easiest to understand but I am getting there!

Should we relocate the link definitions to RT::Link and then add a method
to
RT::Record that returns valid link types for the object?

Hi Todd,

Looks good to me. It’s not going into 3.8, but into 3.9-trunk branch.
Any chance you can write some tests around shredding links?

The attached patch enables shredding of links that point to local
objects
that define different link types than RT::Ticket. (Asset Tracker
defines