Creating related ticket fails (Approvals)

Dear list,
i run into trouble trying to implement RT’s approval system to my
rt3.0 installation.

What i did was that:
creating a queue named purchase
creating a queue named approvals
created a group named purchasers
created a group named approvers
granted full rights for group purchasers on queue purchase
granted full rights for group approvers on queue approvals
added user x to group purchase
added user y to group approvers

configured a scrip for queue purchase named Approval
here some additional info about the scrip:
description: Approval
condition: On Create
action: Create Tickets
template: Global Template: Approval needed

than i created a global template named "Approval needed"
content of template:

===Create-Ticket: Approval
Owner: root
Queue: approvals
Type: Approval
Depended-On-By: {$Tickets{“TOP”}->id}
Content: This ticket was created automatically for approval purpose.
Please check your personal approvals for smooth workflow!
ENDOFCONTENT

If i now create a ticket in queue purchase, no ticket in approvals
is created!!!

If i examine rt3’s error-logs i get the following message:
…[error]: Couldn’t create a related ticket for XXX Could not create
ticket. Queue not set (/opt/rt3/lib/RT/Action/CreateTickets.pm:443)

I am not at all familiar with perl, so i can only guess what happens
at line 443 what makes ticketcreation fail…

Can anyone help me? Don’t think, that there are problems with
permissions, cause i can manually create tickets in every queue i
want, regardingless which user! This error only appears during
approval-matters (auto-creation of a ticket)

Also there is no ticket in appropriate mysql-table (tickets) with type
Approval!

Please help, or i drivin’ insane.

Thank you in advance, Markus Muessig

Markus Muessig MULTA MEDIO Informationssysteme AG
Mergentheimer Str. 76a
97082 Wuerzburg
mailto:mmuessig@multamedio.de Tel: +49 (0)931 79717-18
http://www.multamedio.de Fax: +49 (0)931 79717-30

Markus Muessig wrote:

Depended-On-By: {$Tickets{“TOP”}->id}

That should read

Depended-On-By: TOP

if I’m remembering right.
Phil Homewood, Systems Janitor, http://www.SnapGear.com
pdh@snapgear.com Ph: +61 7 3435 2810 Fx: +61 7 3891 3630
SnapGear - Custom Embedded Solutions and Security Appliances

Markus Muessig wrote:

Depended-On-By: {$Tickets{“TOP”}->id}

That should read

Depended-On-By: TOP

if I’m remembering right.

Phil Homewood, Systems Janitor, http://www.SnapGear.com
pdh@snapgear.com Ph: +61 7 3435 2810 Fx: +61 7 3891 3630
SnapGear - Custom Embedded Solutions and Security Appliances


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

i tried that also. does not work! still the same errormessage…

any further ideas?

greetings, markus muessig

Markus Muessig MULTA MEDIO Informationssysteme AG
Mergentheimer Str. 76a
97082 Wuerzburg
mailto:mmuessig@multamedio.de Tel: +49 (0)931 79717-18
http://www.multamedio.de Fax: +49 (0)931 79717-30

Thus spake Markus Muessig (mmuessig@multamedio.de) [01/08/03 07:13]:

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

i tried that also. does not work! still the same errormessage…

any further ideas?

I’ve just put it in, using all the information from this thread, and while I
do get a ticket that’s created, I don’t see it in the queue listing.

i.e. We have queue ‘Wants’, and queue ‘Approvals’. I can create the ticket
in Wants, and it /will/ create the ticket in Approvals (I can see this in
the logs).

If I go ‘Home’, I the ticket listing for Approvals shows 0 tickets. As does
a search for the queue (and no other restrictions). However, if I open up
the original Wants ticket, I can go to the corresponding ticket via the
Links section.

Thus spake Markus Muessig (mmuessig@multamedio.de) [01/08/03 07:13]:

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

i tried that also. does not work! still the same errormessage…

any further ideas?

I’ve just put it in, using all the information from this thread, and while I
do get a ticket that’s created, I don’t see it in the queue listing.

i.e. We have queue ‘Wants’, and queue ‘Approvals’. I can create the ticket
in Wants, and it /will/ create the ticket in Approvals (I can see this in
the logs).
Not in my case. Automatical ticket creation in queue approvals does
not work. I can see this in the logs, i cant find a ticket with typeapproval` in the tickets table of rt3’s database and i also cannot
see the approval in approval-section of webinterface…

If I go ‘Home’, I the ticket listing for Approvals shows 0 tickets. As does
a search for the queue (and no other restrictions). However, if I open up
the original Wants ticket, I can go to the corresponding ticket via the
Links section.


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
Of course i read the FAQ. But, i am in trouble with rt3 and approvals
are new to rt3. This FAQ is rt2-related…

I suspect template content:

===Create-Ticket: approval_needed
Owner: root
Queue: approvals
Type: Approval
Depended-On-By: TOP

   Content: This ticket was created automatically for approval
        purpose...
	Please check your approvals for a smooth workflow...
	
	RT-SYSTEM

ENDOFCONTENT

that’s it. The error-message i get is:
[error]: OWNER: - QUEUE: - ID: 0 - Couldn’t create a related
ticket for 428 Could not create ticket. Queue not set
(/opt/rt3/lib/RT/Action/CreateTickets.pm:443)

The OWNER, QUEUE and ID output is manually added in CreateTickets.pm
to check whether parameters are transferred correctly. But obviously
they didn’t, cause they are empty!

So, do i have an error in my template-content?

Please help.

Greetings and thanks in advance, Markus Muessig

Markus Muessig MULTA MEDIO Informationssysteme AG
Mergentheimer Str. 76a
97082 Wuerzburg
mailto:mmuessig@multamedio.de Tel: +49 (0)931 79717-18
http://www.multamedio.de Fax: +49 (0)931 79717-30

Problem solved:
It was as simple as amazing. The content-field of the template must
not start with blanks.

I had blanks before my parameter-names for optical reasons (better
reading). That was my fault. I found that out, as i added custom
error-messages in Perl file CreateTickets (line 443) and realized,
that the only argument correctly transmitted to CreateTickets.pm was
the one accidentally not beginning with blanks.

So, maybe it would be a good idea to patch perl-modules taking
parameters from any input-fields to cut off leading and trailing
blanks?
I am not really (actually not at all) familiar with perl, so i can’t
do that.
Maybe one of those cracks outside.

Greetings, and thank you for your efforts!
Markus Muessig

Markus Muessig MULTA MEDIO Informationssysteme AG
Mergentheimer Str. 76a
97082 Wuerzburg
mailto:mmuessig@multamedio.de Tel: +49 (0)931 79717-18
http://www.multamedio.de Fax: +49 (0)931 79717-30