[Rt-devel] duplicating a scrip in code
Todd Chapman
todd at chaka.net
Thu Jan 5 23:10:44 EST 2006
On Fri, Jan 06, 2006 at 12:48:38PM +1100, Jens Porup wrote:
> On Thu, Jan 05, 2006 at 10:32:31AM -0500, Todd Chapman wrote:
> > I understand want you want but it's just not the right way
> > and will probably not work. Adding links during ticket creation
> > is not documented, but it's not hard. Just pass an option
> > with the link type and the id of the ticket you are linking
> > to. For example:
> >
> > $ticket->Create(
> > Queue => 5,
> > Subject => 'test',
> > Parent => 234,
> > DependsOn => [ 189, 190 ]
>
> Ok.... Thanks! This helps.
>
> But what about getter and setter methods, though, after ticket
> creation? Like:
>
> $Ticket->SetParent('123');
> $Ticket->SetChildren('234');
See Ticket::AddLink
>
> This is because after I set the Parent value for the child ticket,
> I now have to set the Children value for the parent ticket, but
> there doesn't seem to be a subroutine in the Ticket*.pm modules
> to do that.
No you don't. By definition link are bi-directional.
>
> Another tack:
>
> Where is the code that takes a create ticket template and sets
> up all the reciprocal relationships? Is there really no way
> for me to plugin to that code, and have it set up all this
> stuff for me?
Good luck on doing it the hard way.
>
> Thanks,
>
> Jens
More information about the Rt-devel
mailing list