Comment when ticket transfers queues

I am trying to determine how to get RT to prompt for and add a comment
to the ticket when it is transferred to another queue. I tried editing
the Global OnQueueChange scrip, but I haven’t gotten it right. I tried
to change it from Notify AdminCCs to Notify Watchers and from Global
template: Transaction to Global template: Correspondence or Global
template: Admin Comment. Neither worked. Do I need to create a custom
template? I am new to all of this scrip stuff, but I appreciate the
power it gives RT. Now I just need to understand it better. Thanks for
your time and consideration.

Vicki

Create a custom field to hold the new value. Next, create a scrip to set the value of this custom field on queue change.

Iris-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com]On Behalf Of Vicki
Stanfield
Sent: Friday, June 17, 2005 11:07 AM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] Comment when ticket transfers queues

I am trying to determine how to get RT to prompt for and add a comment
to the ticket when it is transferred to another queue. I tried editing
the Global OnQueueChange scrip, but I haven’t gotten it right. I tried
to change it from Notify AdminCCs to Notify Watchers and from Global
template: Transaction to Global template: Correspondence or Global
template: Admin Comment. Neither worked. Do I need to create a custom
template? I am new to all of this scrip stuff, but I appreciate the
power it gives RT. Now I just need to understand it better. Thanks for
your time and consideration.

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

Be sure to check out the RT Wiki at http://wiki.bestpractical.com

Brookes, Iris wrote:

Create a custom field to hold the new value. Next, create a scrip to set the value of this custom field on queue change.

Iris

-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com]On Behalf Of Vicki
Stanfield
Sent: Friday, June 17, 2005 11:07 AM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] Comment when ticket transfers queues

I am trying to determine how to get RT to prompt for and add a comment
to the ticket when it is transferred to another queue. I tried editing
the Global OnQueueChange scrip, but I haven’t gotten it right. I tried
to change it from Notify AdminCCs to Notify Watchers and from Global
template: Transaction to Global template: Correspondence or Global
template: Admin Comment. Neither worked. Do I need to create a custom
template? I am new to all of this scrip stuff, but I appreciate the
power it gives RT. Now I just need to understand it better. Thanks for
your time and consideration.

Vicki


The rt-users Archives

Be sure to check out the RT Wiki at http://wiki.bestpractical.com

So why would this be a custom field, when all I want is the same result
as if I’d added a comment to the ticket and then transferred it to
another queue? I just want it to be a single action instead of two
steps. Did I state my question badly, or does this really require a
custom field? I would think it could go where the other comments and/or
replies go. Still learning,

Vicki
Vicki

Vicki Stanfield wrote:

I am trying to determine how to get RT to prompt for and add a comment
to the ticket when it is transferred to another queue. I tried editing

  1. RT adds transaction to the ticket that ticket was moved from queue A
    to queue B.
  2. You can’t force user to add comment whe he moves ticket to another
    queue. Learn your users explain thier movement.
  3. You can notify queue and/or ticket watchers that ticket was moved.

What exactly do you want to do?

Ruslan U. Zakirov wrote:

Vicki Stanfield wrote:

I am trying to determine how to get RT to prompt for and add a comment
to the ticket when it is transferred to another queue. I tried editing

  1. RT adds transaction to the ticket that ticket was moved from queue A
    to queue B.
  2. You can’t force user to add comment whe he moves ticket to another
    queue. Learn your users explain thier movement.
  3. You can notify queue and/or ticket watchers that ticket was moved.

What exactly do you want to do?

While I know that I can’t force the user to enter a comment, I would
like to prompt for a comment by popping up the editor place where a
comment would be typed in. I assume that this would be a new template or
the template from Admin Comment or Correspondence. I simply want RT,
when a user selects to transfer a ticket, to offer a place to type in a
comment in the same transaction and then write that to the ticket. I
want the result to be basically the same as if the user added a comment
and then transferred the ticket. When you view the ticket afterward, you
would see something like this:

Fri Jun 10 14:06:11 2005  	*vicki - Correspondence added * 	  	 [Reply 

http://tickets.progeny.com/Ticket/Update.html?id=10929&QuoteTransaction=56871&Action=Respond] [Comment
http://tickets.progeny.com/Ticket/Update.html?id=10929&QuoteTransaction=56871&Action=Comment]

Download (untitled)
http://tickets.progeny.com/Ticket/Attachment/56871/41276/
text/plain 12b
Done.

Vicki

Fri Jun 10 14:06:11 2005  	*vicki - Queue changed from System 

Administration to FollowUp *

Vicki Stanfield wrote:

Brookes, Iris wrote:

Create a custom field to hold the new value. Next, create a scrip to
set the value of this custom field on queue change.

Iris

-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com]On Behalf Of Vicki
Stanfield
Sent: Friday, June 17, 2005 11:07 AM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] Comment when ticket transfers queues

I am trying to determine how to get RT to prompt for and add a comment
to the ticket when it is transferred to another queue. I tried editing
the Global OnQueueChange scrip, but I haven’t gotten it right. I tried
to change it from Notify AdminCCs to Notify Watchers and from Global
template: Transaction to Global template: Correspondence or Global
template: Admin Comment. Neither worked. Do I need to create a custom
template? I am new to all of this scrip stuff, but I appreciate the
power it gives RT. Now I just need to understand it better. Thanks for
your time and consideration.

Vicki


The rt-users Archives

Be sure to check out the RT Wiki at http://wiki.bestpractical.com

So why would this be a custom field, when all I want is the same result
as if I’d added a comment to the ticket and then transferred it to
another queue? I just want it to be a single action instead of two
steps. Did I state my question badly, or does this really require a
custom field? I would think it could go where the other comments and/or
replies go. Still learning,
IMHO Iris didn’t understand you as I, too. CFs can’t help with your
problem much.

Vicki, scrips wouldn’t help you here, too. Scrips can’t affect UI and
can’t interact with client. Scirps can do background job and only after
something had happened already(for example ticket was moved to another
queue).

AFAIU, you want RT shows “add comment” page if user moves ticket. Right?
I think this is possible with hacking RT a little.

Ruslan U. Zakirov wrote:

Vicki Stanfield wrote:

Brookes, Iris wrote:

Create a custom field to hold the new value. Next, create a scrip to
set the value of this custom field on queue change.

Iris

-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com]On Behalf Of Vicki
Stanfield
Sent: Friday, June 17, 2005 11:07 AM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] Comment when ticket transfers queues

I am trying to determine how to get RT to prompt for and add a comment
to the ticket when it is transferred to another queue. I tried editing
the Global OnQueueChange scrip, but I haven’t gotten it right. I tried
to change it from Notify AdminCCs to Notify Watchers and from Global
template: Transaction to Global template: Correspondence or Global
template: Admin Comment. Neither worked. Do I need to create a custom
template? I am new to all of this scrip stuff, but I appreciate the
power it gives RT. Now I just need to understand it better. Thanks for
your time and consideration.

Vicki


The rt-users Archives

Be sure to check out the RT Wiki at http://wiki.bestpractical.com

So why would this be a custom field, when all I want is the same result
as if I’d added a comment to the ticket and then transferred it to
another queue? I just want it to be a single action instead of two
steps. Did I state my question badly, or does this really require a
custom field? I would think it could go where the other comments and/or
replies go. Still learning,

IMHO Iris didn’t understand you as I, too. CFs can’t help with your
problem much.

Vicki, scrips wouldn’t help you here, too. Scrips can’t affect UI and
can’t interact with client. Scirps can do background job and only after
something had happened already(for example ticket was moved to another
queue).

AFAIU, you want RT shows “add comment” page if user moves ticket. Right?
I think this is possible with hacking RT a little.

Vicki
Vicki


The rt-users Archives

Be sure to check out the RT Wiki at http://wiki.bestpractical.com

Yes, that sounds like exactly what I want. What is the next step?

Vicki

Vicki Stanfield wrote:

I am trying to determine how to get RT to prompt for and add a comment
to the ticket when it is transferred to another queue. I tried editing

  1. RT adds transaction to the ticket that ticket was moved from queue A
    to queue B.
  2. You can’t force user to add comment whe he moves ticket to another
    queue. Learn your users explain thier movement.

“The software can’t do it, train your users not to forget” is never an
acceptable answer, Ruslan. :slight_smile:

Yes, I believe that’s what she wants: she wants to force RT to prompt
for a comment transaction to automagically accompany the queue change
transaction.

On reflection, it seems to me that the easiest way to accomplish
that, since the queue in which a ticket lives seems only to be able to
be changed in the GUI from Basics and Jumbo, is to further restrict it
only to the Jumbo screen, and modify the code which catches it to throw
an error on Queue changes unless the comment field has contents in it.

I’m not enough of an RT hacker to know how practical such a change to
the code is, but this sort of speaks to where I was originally going
with ticket-tracking design before I found RT, which is that every
transaction automatically has fields for both private and public
comment, regardless of what sort of transaction it is.

Cheers,
– jra
Jay R. Ashworth jra@baylink.com
Designer Baylink RFC 2100
Ashworth & Associates The Things I Think '87 e24
St Petersburg FL USA http://baylink.pitas.com +1 727 647 1274

  If you can read this... thank a system administrator.  Or two.  --me

Jay R. Ashworth wrote:>On Fri, Jun 17, 2005 at 11:47:46PM +0400, Ruslan U. Zakirov wrote:

Vicki Stanfield wrote:

I am trying to determine how to get RT to prompt for and add a comment
to the ticket when it is transferred to another queue. I tried editing

  1. RT adds transaction to the ticket that ticket was moved from queue A
    to queue B.
  2. You can’t force user to add comment whe he moves ticket to another
    queue. Learn your users explain thier movement.

“The software can’t do it, train your users not to forget” is never an
acceptable answer, Ruslan. :slight_smile:

Yes, I believe that’s what she wants: she wants to force RT to prompt
for a comment transaction to automagically accompany the queue change
transaction.

On reflection, it seems to me that the easiest way to accomplish
that, since the queue in which a ticket lives seems only to be able to
be changed in the GUI from Basics and Jumbo, is to further restrict it
only to the Jumbo screen, and modify the code which catches it to throw
an error on Queue changes unless the comment field has contents in it.

I’m not enough of an RT hacker to know how practical such a change to
the code is, but this sort of speaks to where I was originally going
with ticket-tracking design before I found RT, which is that every
transaction automatically has fields for both private and public
comment, regardless of what sort of transaction it is.

Cheers,
– jra

Yes, this would be an improvement IMHO. I really think it is better to
offer the user an opportunity to comment even if it goes unused much of
the time. The database size change would be minimal and the benefit
would be great. Our situation is that we transfer tickets back and forth
between queues to pass them off for the next stage of work. Sure, I can
go and add a comment to tell them what stage was just completed and what
was done by whom, but it seems to me that wanting to do so would be more
the rule than the exception. Is my intended usage so unusual? Anyway, I
am happy to help in any way that I can with the code modification,
although I suspect that my weak Perl skills probably deter this.

Thanks.
Vicki

Jay R. Ashworth wrote:

Vicki Stanfield wrote:

I am trying to determine how to get RT to prompt for and add a comment
to the ticket when it is transferred to another queue. I tried editing

  1. RT adds transaction to the ticket that ticket was moved from queue A
    to queue B.
  2. You can’t force user to add comment whe he moves ticket to another
    queue. Learn your users explain thier movement.

“The software can’t do it, train your users not to forget” is never an
acceptable answer, Ruslan. :slight_smile:
Hehe, do you have time and knowledge to work on this for free? I work on
other RT relaited projects. Did you see wishlist on the wiki? In my head
and local rt_todo.txt a lot of additions to that list.

Yes, I believe that’s what she wants: she wants to force RT to prompt
for a comment transaction to automagically accompany the queue change
transaction.
You should know that RT doesn’t support mandatory actions at all. For
example you can’t force user to do something if he want do something
else. So to implement this feature in the right way you have to write
basic framework that allows developers to write fallback code paths
easy. By “right way” I mean patch is can be merged into mainline, and
requirements to such patches are far-far away from patches users usualy
send to MLs, it requires docs, tests…

On reflection, it seems to me that the easiest way to accomplish
that, since the queue in which a ticket lives seems only to be able to
be changed in the GUI from Basics and Jumbo, is to further restrict it
only to the Jumbo screen, and modify the code which catches it to throw
an error on Queue changes unless the comment field has contents in it.
solution is broken, because you have to learn your users to use Jumbo
page if he wants move ticket to another queue. Do you often use Jumbo
page? I never used it :slight_smile:

You should catch event in all places, even in bulk update and this would
be right solution.

I’m not enough of an RT hacker to know how practical such a change to
the code is, but this sort of speaks to where I was originally going
with ticket-tracking design before I found RT, which is that every
transaction automatically has fields for both private and public
comment, regardless of what sort of transaction it is.
I don’t understand what are you talking about.

This is Transactions table with comments:
id INTEGER NOT NULL AUTO_INCREMENT,
ObjectType varchar(64) NOT NULL,
ObjectId integer NOT NULL DEFAULT 0 ,

Link to the object: for eaxmle (‘Ticket’, 1)

TimeTaken integer NOT NULL DEFAULT 0 ,

time taken to finish job described in this transaction

Type varchar(20) NULL ,

type of transaction

Field varchar(40) NULL ,
OldValue varchar(255) NULL ,
NewValue varchar(255) NULL ,

what field was changed with this transaction, old value, new value

ReferenceType varchar(255) NULL,
OldReference integer NULL ,
NewReference integer NULL ,

new thing to me, didn’t analize this much

Data varchar(255) NULL ,

private data

Creator integer NOT NULL DEFAULT 0 ,
Created DATETIME NULL ,

common fields

PRIMARY KEY (id)

I don’t see any special fields with public or private comments in the
Transactions table.

PS: sales@bestpractical.com or hack it yourself and share.

Jay R. Ashworth wrote:

Vicki Stanfield wrote:

I am trying to determine how to get RT to prompt for and add a comment
to the ticket when it is transferred to another queue. I tried editing

  1. RT adds transaction to the ticket that ticket was moved from queue A
    to queue B.
  2. You can’t force user to add comment whe he moves ticket to another
    queue. Learn your users explain thier movement.

“The software can’t do it, train your users not to forget” is never an
acceptable answer, Ruslan. :slight_smile:

Hehe, do you have time and knowledge to work on this for free? I work on
other RT relaited projects. Did you see wishlist on the wiki? In my head
and local rt_todo.txt a lot of additions to that list.

At the moment, no. But, if there’s a concensus that it is The Right
Thing To Do, then certainly, someone ought to communicate that
concensus to Those Who Design. No?

Yes, I believe that’s what she wants: she wants to force RT to prompt
for a comment transaction to automagically accompany the queue change
transaction.

You should know that RT doesn’t support mandatory actions at all. For
example you can’t force user to do something if he want do something
else. So to implement this feature in the right way you have to write
basic framework that allows developers to write fallback code paths
easy. By “right way” I mean patch is can be merged into mainline, and
requirements to such patches are far-far away from patches users usualy
send to MLs, it requires docs, tests…

Well, bouncing updates that don’t meet spec is, I suspect already in
there; this amounts merely to changing “doesn’t meet spec” slightly.

The full-sized version of how I’d approach this, myself, though,
constitutes a fairly large change, yes.

On reflection, it seems to me that the easiest way to accomplish
that, since the queue in which a ticket lives seems only to be able to
be changed in the GUI from Basics and Jumbo, is to further restrict it
only to the Jumbo screen, and modify the code which catches it to throw
an error on Queue changes unless the comment field has contents in it.

solution is broken, because you have to learn your users to use Jumbo
page if he wants move ticket to another queue. Do you often use Jumbo
page? I never used it :slight_smile:

If there’s no other place to move it, then what will they do? :slight_smile:

You should catch event in all places, even in bulk update and this would
be right solution.

Well, semantically, bulk updates ought to have comments for (slightly)
different reasons, but going that far pushes it down into a DBMS
trigger, I suspect.

I’m not enough of an RT hacker to know how practical such a change to
the code is, but this sort of speaks to where I was originally going
with ticket-tracking design before I found RT, which is that every
transaction automatically has fields for both private and public
comment, regardless of what sort of transaction it is.

I don’t understand what are you talking about.

Then you didn’t read closely enough.

This is Transactions table with comments:
id INTEGER NOT NULL AUTO_INCREMENT,
ObjectType varchar(64) NOT NULL,
ObjectId integer NOT NULL DEFAULT 0 ,

Link to the object: for eaxmle (‘Ticket’, 1)

TimeTaken integer NOT NULL DEFAULT 0 ,

time taken to finish job described in this transaction

Type varchar(20) NULL ,

type of transaction

Field varchar(40) NULL ,
OldValue varchar(255) NULL ,
NewValue varchar(255) NULL ,

what field was changed with this transaction, old value, new value

ReferenceType varchar(255) NULL,
OldReference integer NULL ,
NewReference integer NULL ,

new thing to me, didn’t analize this much

Data varchar(255) NULL ,

private data

Creator integer NOT NULL DEFAULT 0 ,
Created DATETIME NULL ,

common fields

PRIMARY KEY (id)

I don’t see any special fields with public or private comments in the
Transactions table.

Clearly, you missed where I said “where I was originally
going with ticket-tracking design before I found RT”.

PS: sales@bestpractical.com or hack it yourself and share.

Oh, so we’re not interested in suggestions regarding design issues,
then? That’s an assertion that I think I’ll only actually believe if
it comes with an @bestpractical.com email address.

All The Smart Designers Aren’t You, either, to paraphrase the rule.

Cheers,
– jra
Jay R. Ashworth jra@baylink.com
Designer Baylink RFC 2100
Ashworth & Associates The Things I Think '87 e24
St Petersburg FL USA http://baylink.pitas.com +1 727 647 1274

  If you can read this... thank a system administrator.  Or two.  --me

I tried to clarify it in one of my on-list responses to Ruslan, but
apparently I didn’t do so. I don’t need for it to be forced, but I
wanted it to be one action that prompted for the comment (which could be
empty) and moved the ticket to the named queue. Sorry if I was unclear.
I’ll look at the jumbo option. Thanks.

So, I think the easiest way to do this is just to add the “Queue”
dropdown to the Comment/Reply page, possibly using a callback.

This is entirely untested. And by that, I mean that I’m typing it in my mail client, not a text
editor where I can try it. So there are likely typos.

mkdir
/opt/rt3/local/share/html/Callbacks/Progeny/Ticket/Update/

create BeforeUpdateType in that directory containing:

<%args>
$id => undef
</%args>
<%init>
my $TicketObj = LoadTicket($id);
</%init>

Queue: <& /Elements/SelectQueue, Name => ‘Queue’, Default => $TicketObj->Queue &>

Hey All,

I’m having a hard time seeing if there is a way to add attachments via the
CLI and how I would go about it. I currently have a webpage setup to submit
tickets (externally) and want to be able to add attachments to those
external tickets.

anyone have insights for me or a doc to look at?

thanks in advance,

Mike