Automatically computing the value of a custom field or adding hyperlinks to custom fields

Hi,

My institution is being enforced to calculate the costs of the services
that it provides in a currency that we call “Service Unit” (“SU” for
short). We have some queues that represent different kinds of work
provided by us, so I have created a custom field called SU, which is
applied to tickets, no matter their queue (it is applied to many
different queues). Depending on the queue, the value of SU could be
calculated based on the value of other custom fields. For example, let
us have three queues Q1, Q2 and Q3. Tickets of Q1 have SU, CFQ1A and
CFQ1B custom fields, whereas tickets of Q2 have SU and CFQ2A. Tickets of
Q3 only have one custom field, which is SU.

  • If the queue of a ticket is Q1, then SU = CFQ1A + CFQ1B
  • If the queue of a ticket is Q2, then SU = 3 x CFQ2A.
  • If the queue of a ticket is Q3, then the value of SU should be
    manually introduced.

This simplified problem shows what I want to do. In my real problem,
there are more queues and the formulas for computing SUs are not as easy
as those. I would like to compute the value of SU automatically when it
is possible rather than introducing its value manually. Is there an
relatively easy way to do this? Can scrips help me?

If not, I would like to create at least an hyperlink near the SU custom
field to a page where proprietaries of tickets can look for the formulas
that they have to use based on the kind of problem (queue) they are
resolving. I had the idea of using the “Include page” attribute of the
SU custom field in order to add a link to a page where this information
would be available. It works fine, but unfortunately only when the SU
custom field has a value. If SU has no value (the CF is empty), then the
link isn’t shown. How can I always show this link? Where can I add it in
order to be always present when people examine tickets?

Help and advices are always welcome.

Thanking you for your time,
Carlos


| __ __ | Carlos Garc�a Montoro Ingeniero Inform�tico
|_Y/| Instituto de F�sica Corpuscular Centro Mixto CSIC - UV
|_] [
/| Servicios Inform�ticos
| [] | Edificio Institutos de Investigaci�n cgarcia@ific.uv.es
|C S I C| Apartado de Correos 22085 E-46071 Valencia Tel: +34 963543706
|
______| Espa�a / Spain Fax: +34 963543488

cgarcia.vcf (441 Bytes)

Hi,

My institution is being enforced to calculate the costs of the
services that it provides in a currency that we call “Service Unit”
(“SU” for short). We have some queues that represent different kinds
of work provided by us, so I have created a custom field called SU,
which is applied to tickets, no matter their queue (it is applied to
many different queues). Depending on the queue, the value of SU
could be calculated based on the value of other custom fields. For
example, let us have three queues Q1, Q2 and Q3. Tickets of Q1 have
SU, CFQ1A and CFQ1B custom fields, whereas tickets of Q2 have SU and
CFQ2A. Tickets of Q3 only have one custom field, which is SU.

  • If the queue of a ticket is Q1, then SU = CFQ1A + CFQ1B
  • If the queue of a ticket is Q2, then SU = 3 x CFQ2A.
  • If the queue of a ticket is Q3, then the value of SU should be
    manually introduced.

This simplified problem shows what I want to do. In my real problem,
there are more queues and the formulas for computing SUs are not as
easy as those. I would like to compute the value of SU automatically
when it is possible rather than introducing its value manually. Is
there an relatively easy way to do this? Can scrips help me?

Of course you can (should?) use scrips for this. Action seems easy, just
set a CF value based on other CFs and queue. What is not clear is when
do you need to fill this CF in the ticket life (at resolve time?).

Looks at http://wiki.bestpractical.com/ for scrips examples with
customfields uses.

Emmanuel Lacour wrote:

Hi,

My institution is being enforced to calculate the costs of the
services that it provides in a currency that we call “Service Unit”
(“SU” for short). We have some queues that represent different kinds
of work provided by us, so I have created a custom field called SU,
which is applied to tickets, no matter their queue (it is applied to
many different queues). Depending on the queue, the value of SU
could be calculated based on the value of other custom fields. For
example, let us have three queues Q1, Q2 and Q3. Tickets of Q1 have
SU, CFQ1A and CFQ1B custom fields, whereas tickets of Q2 have SU and
CFQ2A. Tickets of Q3 only have one custom field, which is SU.

  • If the queue of a ticket is Q1, then SU = CFQ1A + CFQ1B
  • If the queue of a ticket is Q2, then SU = 3 x CFQ2A.
  • If the queue of a ticket is Q3, then the value of SU should be
    manually introduced.

This simplified problem shows what I want to do. In my real problem,
there are more queues and the formulas for computing SUs are not as
easy as those. I would like to compute the value of SU automatically
when it is possible rather than introducing its value manually. Is
there an relatively easy way to do this? Can scrips help me?

Of course you can (should?) use scrips for this. Action seems easy, just
set a CF value based on other CFs and queue. What is not clear is when
do you need to fill this CF in the ticket life (at resolve time?).

Yes, usually these CF values are established when the ticket is being
resoled.

Looks at http://wiki.bestpractical.com/ for scrips examples with
customfields uses.

Thank you for the advice. I’ll do.


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

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

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


| __ __ | Carlos Garc�a Montoro Ingeniero Inform�tico
|_Y/| Instituto de F�sica Corpuscular Centro Mixto CSIC - UV
|_] [
/| Servicios Inform�ticos
| [] | Edificio Institutos de Investigaci�n cgarcia@ific.uv.es
|C S I C| Apartado de Correos 22085 E-46071 Valencia Tel: +34 963543706
|
______| Espa�a / Spain Fax: +34 963543488

cgarcia.vcf (441 Bytes)