Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Request Tracker: Users

Using RTIR - How to send notices to clients who do not respond to Investigations

 

 

Request Tracker users RSS feed   Index | Next | Previous | View Threaded


landonstewart at gmail

Jul 31, 2013, 5:43 PM

Post #1 of 5 (45 views)
Permalink
Using RTIR - How to send notices to clients who do not respond to Investigations

Hello,

I'd post this to the RTIR mailing list but it's extremely low volume and
I've never had a reply from there before.

In a nutshell I've been trying to figure this out but I can't figure out
how to get Correspond() to *not* update the LastUpdated field on a ticket.
The only real example of this function I can find is in
RecordCorrespondence.pm which I am actually using. I've actually copied it
to a new .pm and added SquelchMailTo() line to it so messages aren't CC'd
to root when using rt-crontool.

I've had absolutely no luck trying to figure out how to use
Action/SendEmail.pm but I want the correspondence to be in the ticket
anyway and preferably use templates too so that's no big deal.

What I'm afraid of is that I'm using the wrong method to skin this cat. Is
there a better way to look at this or contribution already available for
notifying Correspondents that they haven't updated a ticket? I'd like to
send two or three warnings before the ticket is flagged for us to consider
suspension of the client for not responding.

Thanks for reading!

--
Landon Stewart <LandonStewart [at] Gmail>


falcone at bestpractical

Jul 31, 2013, 6:37 PM

Post #2 of 5 (42 views)
Permalink
Re: Using RTIR - How to send notices to clients who do not respond to Investigations [In reply to]

On Wed, Jul 31, 2013 at 05:43:54PM -0700, Landon wrote:
> I'd post this to the RTIR mailing list but it's extremely low volume and I've never had a
> reply from there before.

I just checked - I've replied to a number of your emails on the rtir
mailing list, and you've replied to me there. You've actually replied
to *fewer* of my replies on rt-users.

However, this is in no way an RTIR specific question.

> In a nutshell I've been trying to figure this out but I can't figure out how to get
> Correspond() to *not* update the LastUpdated field on a ticket. The only real example of this
> function I can find is in RecordCorrespondence.pm which I am actually using. I've actually
> copied it to a new .pm and added SquelchMailTo() line to it so messages aren't CC'd to root
> when using rt-crontool.
> I've had absolutely no luck trying to figure out how to use Action/SendEmail.pm but I want the
> correspondence to be in the ticket anyway and preferably use templates too so that's no big
> deal.
> What I'm afraid of is that I'm using the wrong method to skin this cat. Is there a better way
> to look at this or contribution already available for notifying Correspondents that they
> haven't updated a ticket? I'd like to send two or three warnings before the ticket is flagged
> for us to consider suspension of the client for not responding.
> Thanks for reading!

I've generally just used RT::Action::Notify and --action-arg AdminCc to
notify the AdminCcs (or other arguments as needed). For Notify, you
must use --transaction first or --transaction last and keep in mind
that Notify.pm obeys the NotifyActor note. RecordCorrespondence might
work fine, I've just never used it. Using SendEmail directly is
almost never what you want.

Keep in mind however that any code that records a transaction on a
ticket (so RecordCorrespondence, which records a transaction by
calling the Correspond method) is going to update LastUpdated on the
ticket. You're updating the ticket, so LastUpdated moves.

Sending mail without that is likely to be *very* difficult. You
likely actually want a Condition module that checks for a status
change or checks for the first notification to do your calculations,
or to record something in a custom field for easier querying.

-kevin


landonstewart at gmail

Aug 6, 2013, 12:37 PM

Post #3 of 5 (21 views)
Permalink
Re: Using RTIR - How to send notices to clients who do not respond to Investigations [In reply to]

On 31 July 2013 18:37, Kevin Falcone <falcone [at] bestpractical> wrote:

> I've generally just used RT::Action::Notify and --action-arg AdminCc to
> notify the AdminCcs (or other arguments as needed). For Notify, you
> must use --transaction first or --transaction last and keep in mind
> that Notify.pm obeys the NotifyActor note. RecordCorrespondence might
> work fine, I've just never used it. Using SendEmail directly is
> almost never what you want.
>
> Keep in mind however that any code that records a transaction on a
> ticket (so RecordCorrespondence, which records a transaction by
> calling the Correspond method) is going to update LastUpdated on the
> ticket. You're updating the ticket, so LastUpdated moves.
>
> Sending mail without that is likely to be *very* difficult. You
> likely actually want a Condition module that checks for a status
> change or checks for the first notification to do your calculations,
> or to record something in a custom field for easier querying.
>
>
I think I've got the Condition module worked out. Using two custom fields
that update on correspondence (if we update it sets the StaffUpdate to Y
and increments a counter). If the customer updates it sets StaffUpdate to
N and resets the counter. This in conjunction with the LastUpdated and
other fields seems very useful for the condition checking.

I've attempted to use RT::Action::Notify briefly and then realized I don't
know how to use it because it looks like it calls functions in
RT::Action::SendEmail and tries to parse a template but I don't know how to
tell it what template to use. When I run it with rt-crontool it basically
chokes on the Parse part of RT::Action::SendEmail. Do you know of any
functioning examples using Notify and SendEmail? I've been googling but
this seems to be a bit of a gray area apparently. I see posts about people
asking but no examples of it working.

Thanks!

--
Landon Stewart <LandonStewart [at] Gmail>


falcone at bestpractical

Aug 7, 2013, 7:45 AM

Post #4 of 5 (19 views)
Permalink
Re: Using RTIR - How to send notices to clients who do not respond to Investigations [In reply to]

On Tue, Aug 06, 2013 at 12:37:57PM -0700, Landon wrote:
>
> I think I've got the Condition module worked out. Using two custom fields that update on
> correspondence (if we update it sets the StaffUpdate to Y and increments a counter). If the
> customer updates it sets StaffUpdate to N and resets the counter. This in conjunction with the
> LastUpdated and other fields seems very useful for the condition checking.

Good

> I've attempted to use RT::Action::Notify briefly and then realized I don't know how to use it
> because it looks like it calls functions in RT::Action::SendEmail and tries to parse a
> template but I don't know how to tell it what template to use. When I run it with rt-crontool
> it basically chokes on the Parse part of RT::Action::SendEmail.


Looking in the documentation for rt-crontool
http://bestpractical.com/docs/rt/latest/rt-crontool.html#template
should make clear how to use a template

> Do you know of any functioning examples using Notify and SendEmail?
> I've been googling but this seems to be a bit of a gray area
> apparently. I see posts about people asking but no examples of it

It's a grey area because you don't want to use SendEmail directly, as
I believe I said in my previous email.

Either use Notify if you just want to record an Outgoing Email
transaction or use RecordCorrespondence if you want a real reply and
email.

-kevin


landonstewart at gmail

Aug 7, 2013, 1:55 PM

Post #5 of 5 (18 views)
Permalink
Re: Using RTIR - How to send notices to clients who do not respond to Investigations [In reply to]

On 7 August 2013 07:45, Kevin Falcone <falcone [at] bestpractical> wrote:

> It's a grey area because you don't want to use SendEmail directly, as
> I believe I said in my previous email.
>
> Either use Notify if you just want to record an Outgoing Email
> transaction or use RecordCorrespondence if you want a real reply and
> email.
>

LOL this is not nearly as complicated as I thought it was. Since I didn't
use the --template parameter on rt-crontool it gave me a warning about
SendEmail not being able to parse a template. That's what I had difficulty
with. I wasn't aware of the --template parameter and that made all the
difference. Works like a charm now.

Basically:
/opt/rt4/bin/rt-crontool --search RT::Search::FromSQL --search-arg '<my SQL
query for outstanding tickets>' --action RT::Action::Notify --action-arg
Requestor --template "No Update Warning" --transaction last

Thanks again Kevin for clarifying the use of RT::Action::Notify and how it
relates to RT::Action::SendEmail. It works like a charm.

--
Landon Stewart <LandonStewart [at] Gmail>

Request Tracker users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.