[Rt-devel] Bug? Imbalance in linking history

Todd Chapman todd at chaka.net
Fri Nov 4 13:27:24 EST 2005


On Fri, Nov 04, 2005 at 07:44:01PM +0100, Rolf Grossmann wrote:
> 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?

There just conventions. One end of the link is no more important
than the other.

> 
> > 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?

Would it be more common to want an AddLink scrip to run once, or
twice (for each end of the link)? Whichever is more common, make
that the default.

> 
> Rolf.


More information about the Rt-devel mailing list