How to create approvals directly?

We are using RT 3.0.7_01.

In our environment, a ticket would be submitted that
asks for a number of resources. Each resource would
be provided by a different group. I modified the
Relationships part of Ticket/Display.html (which is
the Mason component “ShowLinks” so that when the
heading “Children” is clicked on a new ticket is
created that has the “Parents” field already set.

What I would also like to do is have the created
ticket be an approval. I added Type=Approval to the
link but that didn’t seem to work, as the ticket
didn’t show up in Approvals/ for the ticket owner.

What am I doing wrong?

I am trying to stay away from the approvals example
in the documentation because it seems to require
creating a ticket in a special queue that would then
run a scrip that creates the approval ticket? Why
create two tickets instead of creating one approval
ticket by directly clicking a link/button?

All comments appreciated.

Thanks!

-Todd

Answering my own question:

I am still learning the RT architecture. Here is what I
did to make this work. It’s not necessarily the best way
but it works and I can refine it later.

  1. Change ShowLink so that Children is a link:
    <&|/l&>Children</&>:

  2. In Ticket/Create.html add an ARG and and a new
    hidden field:
    $Type => ‘ticket’
    </%ARGS>

<INPUT TYPE=HIDDEN Name=“Type” VALUE=<% $Type %>>

  1. In lib/RT/Interface/Web.pm add Type to the
    create_args hash in sub CreateTicket:

    my %create_args = (
    Type => $ARGS{‘Type’} || ‘ticket’,

Eventually I’ll add a drop-down for Type on the
Create.html form, but this works for now.

-ToddOn Thu, Dec 18, 2003 at 02:44:44PM -0500, Todd Chapman wrote:

We are using RT 3.0.7_01.

In our environment, a ticket would be submitted that
asks for a number of resources. Each resource would
be provided by a different group. I modified the
Relationships part of Ticket/Display.html (which is
the Mason component “ShowLinks” so that when the
heading “Children” is clicked on a new ticket is
created that has the “Parents” field already set.

What I would also like to do is have the created
ticket be an approval. I added Type=Approval to the
link but that didn’t seem to work, as the ticket
didn’t show up in Approvals/ for the ticket owner.

What am I doing wrong?

I am trying to stay away from the approvals example
in the documentation because it seems to require
creating a ticket in a special queue that would then
run a scrip that creates the approval ticket? Why
create two tickets instead of creating one approval
ticket by directly clicking a link/button?

All comments appreciated.

Thanks!

-Todd


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm