Re: [rt-users] RT Approvals

2015-09-18 Thread Todd Wade

On 9/11/15 9:47 AM, Kobus Bensch wrote:

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,



[rt-users] RT Approvals

2015-09-14 Thread Kobus Bensch

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.


Re: [rt-users] RT Approvals

2015-09-14 Thread Emmanuel Lacour
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 ;)

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:elac...@easter-eggs.com  -   http://www.easter-eggs.com


[rt-users] RT Approvals

2015-09-11 Thread Kobus Bensch

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.


[rt-users] RT Approvals

2008-01-11 Thread Roger Mastrude
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
Subject: Approval for {$Tickets{'TOP'}-Subject}
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? 

 

___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com