[Rt-devel] Bug? Imbalance in linking history

Rolf Grossmann rg at progtech.net
Fri Nov 4 13:44:01 EST 2005


Todd Chapman wrote:

> That seems to imply that one end of the link is more important than
> the other, and I don't think that's the case. Base and Target are just
> conventions, and it could have easily been reversed.

I'm not quite sure I follow. The conventions have been chosen, so why
not use them?

> The thing that concerns me about two scrips is, what if you
> want to send an e-mail on AddLink, but you only want to do
> it once. How do you make the two scrips aware of each other
> so that only one performs the action? If there is a simple
> solution to this problem, then 2 scrips is fine wiht me.
> Otherwise I think it's better to have one scrip run and
> the user and figure out what object was at the other end.

You can tell from the transaction's Field property what is being
changed. Right now, you'd probably run the scrip for every AddLink
transaction, and you have to figure out whether it's for the Base or the
Target side of the link. If we run scrips for both objects (since both
should have the transaction), you would only run the scrip for the base
or the target object or the right Field type (e.g. only RefersTo not
ReferredToBy). Is there a problem with that which I'm missing?

The more I think about it, two transactions are probably the better
solution. Right now, the transaction is recorded depending on where the
user makes the change. Since linking always involves two objects, there
should be a transaction for both of them. And since a transaction
invokes scrips, two sets of scrips will be run. What's new then, is that
one operation by the user can result in two transactions. Shouldn't be a
problem, right?

Rolf.


More information about the Rt-devel mailing list