MemberOf gave a collection of links. Each link
points from Ticket to the MemberOf (in this case
it is a parent). So the end of the arrow (link)
with the arrowhead is the target (parent), and the
end of the arrow without the arrowhead is the base
(the ticket, or child in this case.)
Thanks!
-ToddOn Tue, Jan 27, 2004 at 01:29:07PM -0500, Todd Chapman wrote:
It would help if someone could extend my understanding of bases
and targets.
Also, I lost the link to the RTFM for RT3. Anyone?
Thanks for the help Jesse and all!
-Todd
On Tue, Jan 27, 2004 at 02:12:51PM -0500, Jesse Vincent wrote:
On Tue, Jan 27, 2004 at 01:19:33PM -0500, Todd Chapman wrote:
Ticket #152 is a Child of Ticket #151.
I created an On Correspond scrip with this preparation code:
my $Ticket = $self->TicketObj;
$RT::Logger->debug("Ticket ID: " . $Ticket->id);
my $members = $Ticket->MemberOf;
my $link = $members->First;
my $parent = $link->BaseObj;
Ticket is a MemberOf *. You want to look at targets, not bases
$RT::Logger->debug("BaseObj ID: " . $parent->id);
I would expect BaseObj ID to be 151. Not so. The Ticket
ID and BaseObjID print as 152.
If I change the scrip condition to On Create, the code no
longer works. Is this because the scrip is run before the
link is created? How can I refer to the parent of a ticket
in an On Create scrip?
Thanks.
-ToddOn Tue, Jan 27, 2004 at 02:12:51PM -0500, Jesse Vincent wrote:
On Tue, Jan 27, 2004 at 01:19:33PM -0500, Todd Chapman wrote:
Ticket #152 is a Child of Ticket #151.
I created an On Correspond scrip with this preparation code:
my $Ticket = $self->TicketObj;
$RT::Logger->debug("Ticket ID: " . $Ticket->id);
my $members = $Ticket->MemberOf;
my $link = $members->First;
my $parent = $link->BaseObj;
Ticket is a MemberOf *. You want to look at targets, not bases
$RT::Logger->debug("BaseObj ID: " . $parent->id);
I would expect BaseObj ID to be 151. Not so. The Ticket
ID and BaseObjID print as 152.
Now to figure out how to create a custome scrip condition…
-ToddOn Tue, Jan 27, 2004 at 02:55:11PM -0500, Todd Chapman wrote:
Jesse,
If I change the scrip condition to On Create, the code no
longer works. Is this because the scrip is run before the
link is created? How can I refer to the parent of a ticket
in an On Create scrip?
Thanks.
-Todd
On Tue, Jan 27, 2004 at 02:12:51PM -0500, Jesse Vincent wrote:
On Tue, Jan 27, 2004 at 01:19:33PM -0500, Todd Chapman wrote:
Ticket #152 is a Child of Ticket #151.
I created an On Correspond scrip with this preparation code:
my $Ticket = $self->TicketObj;
$RT::Logger->debug("Ticket ID: " . $Ticket->id);
my $members = $Ticket->MemberOf;
my $link = $members->First;
my $parent = $link->BaseObj;
Ticket is a MemberOf *. You want to look at targets, not bases
$RT::Logger->debug("BaseObj ID: " . $parent->id);
I would expect BaseObj ID to be 151. Not so. The Ticket
ID and BaseObjID print as 152.
Actually, that code predates Ticket->Create’s ability to accept links as
attributes. it could be refactored to pass the linking code into create.
I’ve opened a ticket about this issue.
Allthough you may be afraid of my RT code at this point,
I am interested in getting involved with RT development.
I would take a crack at the changes below but I have
some questions about the development process that were
never answered in this post:
Actually, that code predates Ticket->Create’s ability to accept links as
attributes. it could be refactored to pass the linking code into create.
I’ve opened a ticket about this issue.
Allthough you may be afraid of my RT code at this point,
I am interested in getting involved with RT development.
I would take a crack at the changes below but I have
some questions about the development process that were
never answered in this post:
The short version is that you submit your patches to rt-bugs@fsck.com.
If you’re making patches for intended inclusion in the rt codebase,
you’ll have to patch the RT core libraries and generate unidiffs based
on those changes.
Will I get a notice if the patch is rejected. I don’t like
the idea of submitting to a black hole.
-ToddOn Tue, Jan 27, 2004 at 04:12:16PM -0500, Jesse Vincent wrote:
On Tue, Jan 27, 2004 at 03:18:44PM -0500, Todd Chapman wrote:
Jesse,
Allthough you may be afraid of my RT code at this point,
I am interested in getting involved with RT development.
I would take a crack at the changes below but I have
some questions about the development process that were
never answered in this post:
The short version is that you submit your patches to rt-bugs@fsck.com.
If you’re making patches for intended inclusion in the rt codebase,
you’ll have to patch the RT core libraries and generate unidiffs based
on those changes.
To get a good understanding of base and targets, look at the Links table
with some kind of graphical database table viewer like phpadmin. That will
explain just everything you need to know about how the base, target, and
type structures and methods work.