RT Approvals

Hi all,

I am in the process of refactoring the builtin RT approval processes,
which should be in the next release - 3.8.2. I am making some changes
and dropping the existing scrip-based rules, so this is a heads up if
you made changes to the builtin scrips, you might need to adapt your
changes for 3.8.2. Meanwhile I am interested to know if anyone here
is using the approval features, and if there’s any feature request we
can take into consideration while improving it.

Cheers,
CLk

Hi. I’ve been beating my head against the wall trying to get RT
approvals working so we can use it for change management. I’m getting
this error message in file “warn”:

Jan 11 11:40:33 isdws76250 RT: Use of uninitialized value in hash
element at /opt/rt3/lib/RT/Action/CreateTickets.pm line 863.
(/opt/rt3/lib/RT/Action/CreateTickets.pm:863)
Jan 11 11:40:33 isdws76250 last message repeated 5 times

Setup:

I’m using queue “CMs”.

A scrip for that queue is:
Create Approval Ticket
On Create Create Tickets with template Create Approval Ticket

A template for that queue named “Create Approval Ticket” contains:
===Create-Ticket CreateApprovalTicket
Depended-On-By: TOP
Queue: Approvals
Content: Someone has created a CM ticket. Please review and approve it.
ENDOFCONTENT

I tried changing line 1 from “CreatApprovalTicket” to “Create Approval
Ticket” because I wasn’t certain how the scrip and ticket tie together.
Same result.

I’m logged on as Root which is a member of RT Administrators, which has
super-user powers. Queue “Approvals” exists but no tickets have been
autocreated in it. You can create tickets in it manually.

I’m using SLES 9 with Apache 1.3.29, Perl 5.8.3.32 and RT 3.6.5.

Can anyone see something dumb I’m doing? Or just wrong, though smart?

Hi

I have setup approvals following this doc:
https://www.bestpractical.com/docs/rt/4.2.12/customizing/approvals.html.

I would like to setup multiple approvers based on a value in a custom
field. Is this possible and if so can anybody point me in the right
direction or to a doc that I can read that will help me to achieve this?

Thank you

Kobus

Trustpay Global Limited is an authorised Electronic Money Institution
regulated by the Financial Conduct Authority registration number 900043.
Company No 07427913 Registered in England and Wales with registered address
130 Wood Street, London, EC2V 6DL, United Kingdom.

For further details please visit our website at www.trustpayglobal.com.

The information in this email and any attachments are confidential and
remain the property of Trustpay Global Ltd unless agreed by contract. It is
intended solely for the person to whom or the entity to which it is
addressed. If you are not the intended recipient you may not use, disclose,
copy, distribute, print or rely on the content of this email or its
attachments. If this email has been received by you in error please advise
the sender and delete the email from your system. Trustpay Global Ltd does
not accept any liability for any personal view expressed in this message.

Hi

I have setup approvals following this doc:
https://www.bestpractical.com/docs/rt/4.2.12/customizing/approvals.html.

I would like to setup multiple approvers based on a value in a custom
field. Is this possible and if so can anybody point me in the right
direction or to a doc that I can read that will help me to achieve this?

Thank you

Kobus

Trustpay Global Limited is an authorised Electronic Money Institution
regulated by the Financial Conduct Authority registration number 900043.
Company No 07427913 Registered in England and Wales with registered address
130 Wood Street, London, EC2V 6DL, United Kingdom.

For further details please visit our website at www.trustpayglobal.com.

The information in this email and any attachments are confidential and
remain the property of Trustpay Global Ltd unless agreed by contract. It is
intended solely for the person to whom or the entity to which it is
addressed. If you are not the intended recipient you may not use, disclose,
copy, distribute, print or rely on the content of this email or its
attachments. If this email has been received by you in error please advise
the sender and delete the email from your system. Trustpay Global Ltd does
not accept any liability for any personal view expressed in this message.

Le 14/09/2015 10:27, Kobus Bensch a �crit :

Hi

I have setup approvals following this doc:
https://www.bestpractical.com/docs/rt/4.2.12/customizing/approvals.html.

I would like to setup multiple approvers based on a value in a custom
field. Is this possible and if so can anybody point me in the right
direction or to a doc that I can read that will help me to achieve this?

you’ll have to write code yourself :wink:

You cannot use groups for this?

Here is sample untested code (that needs more time to think of) to get
users with a user cf corresponding to ticket cf. Just an idea …

I would create a new method in local/lib/Ticket_Overlay.pm like:

sub GetApprovers {
my $self = shift;

my $cf_value = $self->FirstCustomFieldValue( 'CF' );

my $Users = RT::Users->new( self->CurrentUser );
$Users->LimitCUstomField( CUSTOMFIELD => 'CF', VALUE => $cf_value );

my @approvers;
while ( my $User = $Users->Next) {
	push @approvers, $User->id;
}
return join(',', @approvers);

}

Then in the approval template, something like:

AdminCc: { $Tickets{TOP}->GetApprovers; }

NB:

  • you can put all of the code in the template, but having an API method
    is a bit better for code maintenance.
  • double think of this, using groups is maybe a better idea
  • not sure what arguments is accepted in AdminCc (list of users id,
    email, …), see lib/RT/Action/CreateTickets.pm

Easter-eggs Sp�cialiste GNU/Linux
44-46 rue de l’Ouest - 75014 Paris - France - M�tro Gait�
Phone: +33 (0) 1 43 35 00 37 - Fax: +33 (0) 1 43 35 00 76
mailto:elacour@easter-eggs.com - http://www.easter-eggs.com

I have setup approvals following this doc:
https://www.bestpractical.com/docs/rt/4.2.12/customizing/approvals.html.

I would like to setup multiple approvers based on a value in a custom
field. Is this possible and if so can anybody point me in the right
direction or to a doc that I can read that will help me to achieve this?

Note this section of the documentation:

https://www.bestpractical.com/docs/rt/latest/customizing/approvals.html#Approvers

Where it says:

Requestors: {$Tickets{TOP}->RequestorAddresses}

The content in the brackets is perl code. And it also talks about
different ways you can assign to people or notify different groups.

So combining that, you can put some code in for the AdminCcGroup: value
(or whatever would fit your workflow) to programmatically determine who
to send the approval to:

AdminCcGroup: { $Tickets{TOP}->FirstCustomFieldValue(‘ApprovalGroup’) }

Regards,