RES: Doubt RT

Hi Rick,

How are you? I would like to create some custom fields and

calculate some values in other custom fields in a webpage from the
system, but in the example that you have sent me, I need to know about
the ID of custom fields. How can I get it? Where can I see it?

In the scrip creation, we have three fields to put a peace of

code, where can I put this code to calculate?

Do you have any manual about this feature of system?

Cheers,

-----Mensagem original-----De: Rick Russell [mailto:rickr@rice.edu]
Enviada em: quarta-feira, 22 de junho de 2005 17:42
Para: Rodrigo Blanco
Assunto: Re: Doubt RT

Rodrigo,

It sounds like you should try this:

– Create the three custom fields that you want

– Create a scrip with User Defined conditions and actions. The
User Defined condition would look for any change to the “dates initial”
and “dates resolution” fields of the ticket, example:

if ( ($self->TransactionObj->Field eq ‘custom-field-id-1’)
||
($self->TransactionObj->Field eq ‘custom-field-id-2’)
)
{ return(1); }
else
{ return(undef); }

where custom-field-id-1 is the numerical ID of the first custom field,
and custom-field-id-2 is the numerical ID of the second custom field.

– The User Defined action would be something like this. This is not
real code; you’ll need to write the code.

my StartTimeSeconds = Parsedate(contents of first custom field);
my ResolveTimeSeconds = Parsedate(contents of second custom field);

my SolutionTime = ((ResolveTimeSeconds - StartTime)/60.0);

(Set contents of third custom field to SolutionTime)

Setting custom fields is somewhat difficult, but these Wiki entries will

help you get started:

Request Tracker Wiki
Request Tracker Wiki

Good luck,

Rick R.

Rodrigo Blanco wrote:

Good afternoon Rick,

I am beginner in this ticket system and he/she would like to know if
it
is possible the change of some screens and some increments:

for example, create three fields:
“dates initial of the ticket”
“dates resolution of the ticket”
“time of solution”

he/she would like to know as I do to do a formula that calculates the
time he/she enters the " initial " date and the " final " date, and of
the result in minutes in the field " time of solution "

Please it would like that somebody helped me because I am depending on
that for my work to have success.

Thank you very much and I wait its answer

Rodrigo (Brazil)

For computer help, call xHELP (x4357 or 713-348-4357)
On the web: http://helpdesk.rice.edu/
Rick Russell
Helpdesk Supervisor, Client Services
IT/Academic & Research Computing
Rice University
Voice: 713.348.5267 Fax: 713.348.6099
OpenPGP/GnuPG Public Key at ldap://certificate.rice.edu
761D 1C20 6428 580F BD98 F5E5 5C8C 56CA C7CB B669

Rodrigo Blanco wrote:

the ID of custom fields. How can I get it? Where can I see it?

When you go to “Configuration, Queue, Custom Fields” or “Configuration,
Global, Custom Fields” and select a custom field, the ID number will
appear in the web address (URL) at the top of your browser. For example:

https://rt.zzz.com/Admin/Global/CustomField.html?Queue=0&CustomField=22

In this case, the custom field ID is 22. Presumably, you could also browse
the database tables and find it too.

In the scrip creation, we have three fields to put a peace of
code, where can I put this code to calculate?

First, you’ll need to set the scrip condition and action to “User Defined”.

Second, you’ll need to enter your condition code in the “Custom condition”
field.

Third, you’ll need to enter your action code in either the “Custom action
preparation code” or “Custom action cleanup code” fields. The cleanup code
is executed only if the preparation code returns a value other than zero
or undefined, if I remember correctly.

If you don’t need to divide the prep code and the cleanup code, it’s
traditional to put

return(1);

into the prep code, and write your action code into the cleanup section.

Do you have any manual about this feature of system?

Only wiki.bestpractical.com and this mailing list. I hear that the
BestPractical folks are writing a book, which they will probably mention
shortly after this e-mail is posted to the list :slight_smile:

Rick R.

For computer help, call xHELP (x4357 or 713-348-4357)
On the web: http://helpdesk.rice.edu/
Rick Russell
Helpdesk Supervisor, Client Services
IT/Academic & Research Computing
Rice University
Voice: 713.348.5267 Fax: 713.348.6099
OpenPGP/GnuPG Public Key at ldap://certificate.rice.edu
761D 1C20 6428 580F BD98 F5E5 5C8C 56CA C7CB B669

signature.asc (254 Bytes)