[rt-users] Default Time Worked

Mathew Snyder theillien at yahoo.com
Tue Jun 26 10:04:37 EDT 2007


It isn't working.  This is how I've configured it:
Description: Default Time Worked
Condition: On Create
Action: User Defined
Template: Global template: Transaction
Stage: TransactionCreate

Custom Condition: $self->TicketObj->SetTimeWorked(5);
Custom action preparation code:
Custom action cleanup code: return 1;

I'm wondering though, by using SetTimeWorked(5), won't I just be setting the
time to 5 regardless of the value entered in the field during a comment or reply?

I think what would be preferable in the situation I'm looking at is to have the
value of the field automatically set on the comment/reply screen rather than
have the addition made upon transaction creation.  This is what I meant by a
default.  Rather than present the user with a blank field to have it populated
with "5" and allow them to alter it as necessary.

Keep up with me and what I'm up to: http://theillien.blogspot.com


Edge, Sean wrote:
> Oh, sorry, I thought that's what you were asking.
> 
> If you just want it to start at 5 minutes by default you can simply make
> the condition "On Create" and just make the action:
> $self->TicketObj->SetTimeWorked(5);
> return 1;
> 
> Any new ticket in any Queue (provided you make it a Global Scrip) would,
> on creation, have 5 minutes in the TimeWorked field.
> 
> -Sean 
> 
> -----Original Message-----
> From: Mathew Snyder [mailto:theillien at yahoo.com] 
> Sent: Tuesday, June 26, 2007 9:25 AM
> To: Edge, Sean
> Cc: RT Users
> Subject: Re: [rt-users] Default Time Worked
> 
> That will be good plan "B".  I'll have to clarify with the powers that
> be what they want because we want the ticket to start at 5 and go up as
> people add time.
>  Not necessarily go up by 5 each time.  Although, that might actually
> make more sense just in case people forget to add any time anyway.
> 
> Thanks.  I'll keep your suggestion in mind.  :)
> 
> Keep up with me and what I'm up to: http://theillien.blogspot.com
> 
> 
> Edge, Sean wrote:
>> Mathew,
>> You could accomplish this using a Scrip with conditions "On Comment" 
>> and "On Correspond".  Then just grab the current Time Worked, 
>> increment by 5 and update the db field.  So something like this might 
>> work for your custom Scrip Action:
>> my $temp = $self->TicketObj->TimeWorked; $temp += 5; 
>> $self->TicketObj->SetTimeWorked($temp);
>> return 1;
>>
>>
>> -Sean
>>
>> -----Original Message-----
>> From: rt-users-bounces at lists.bestpractical.com
>> [mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Mathew 
>> Snyder
>> Sent: Tuesday, June 26, 2007 6:55 AM
>> To: RT Users
>> Subject: [rt-users] Default Time Worked
>>
>> Due to the nature of our beast, we need to default the Time Worked 
>> value to 5 on replies and comments.  Anyone know where I go to look at
> this?
>> --
>> Keep up with me and what I'm up to: http://theillien.blogspot.com 
>> _______________________________________________
>> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>>
>> Community help: http://wiki.bestpractical.com Commercial support:
>> sales at bestpractical.com
>>
>>
>> Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
>> Buy a copy at http://rtbook.bestpractical.com
>>
>>
>>
>> This email (including any attachments) is for its intended-recipient's
> 
>> use only. This email may contain information that is confidential or 
>> privileged.  If you received this email in error, please immediately 
>> advise the sender by replying to this email and then delete this 
>> message from your system.  For further information and disclaimers 
>> that apply to this email, see
> [http://www.viacom.com/email_disclaimer.jhtml].
> 
> 
> 
> This email (including any attachments) is for its intended-recipient's
> use only. This email may contain information that is confidential or
> privileged.  If you received this email in error, please immediately
> advise the sender by replying to this email and then delete this message
> from your system.  For further information and disclaimers that apply to
> this email, see [http://www.viacom.com/email_disclaimer.jhtml].
> 



More information about the rt-users mailing list