CommandByMail RT Extension

Hi,

I was working with Jesse Vincent on this, but decided to contact the
list with this question since not only might I find an answer here,
but this answer might be useful to others too…

I’d like to use this extension as a means of parsing out custom field
information sent to the queue address by a script. Extension can be
downloaded here:

http://search.cpan.org/~jesse/RT-Extension-CommandByMail-0.02/lib/RT/
Extension/CommandByMail.pm

I’m trying to

  1. verify I have installed this extension correctly, and
  2. verify its intended usage

I’ve added the line:

@MailPlugins = qw(Auth::MailFrom Filter::TakeAction);

to my RT_SiteConfig.pm file, compiled and installed the extension
with no problem, applied the patch with no problems either, and
finally restarted Apache. RT came up fine, but according to the
System Configuration page neither your Extension nor Auth::MailFrom
was loaded… Should this page list CommandByMail, and if so, any
advice on how I can track down this problem?

I’m assuming that once the extension is loaded, I would simply have
to add a line like this somewhere in my message body for this to work?

CF.{CUsername}: jauty

hello

(in this example, this would set CustomField “Username” with the
value “jauty”?)

Is this the intended usage here?

Joe Auty
UITS Messaging
Indiana University
jauty@indiana.edu

PGP.sig (186 Bytes)

At Thursday 6/1/2006 04:03 PM, Joe Auty wrote:

Hi,

I was working with Jesse Vincent on this, but decided to contact the
list with this question since not only might I find an answer here,
but this answer might be useful to others too…

I’d like to use this extension as a means of parsing out custom field
information sent to the queue address by a script. Extension can be
downloaded here:

http://search.cpan.org/~jesse/RT-Extension-CommandByMail-0.02/lib/RT/
Extension/CommandByMail.pm

In terms of functionality, how does this differ from Dirk Pape’s
scrip/template extension for filling in CFs from email?
(http://wiki.bestpractical.com/index.cgi?Contributions ->
ScripActions -> ExtractCustomFieldValues).

Thanks,
Steve

At Thursday 6/1/2006 04:03 PM, Joe Auty wrote:

Hi,

I was working with Jesse Vincent on this, but decided to contact the
list with this question since not only might I find an answer here,
but this answer might be useful to others too…

I’d like to use this extension as a means of parsing out custom field
information sent to the queue address by a script. Extension can be
downloaded here:

http://search.cpan.org/~jesse/RT-Extension-CommandByMail-0.02/lib/RT/
Extension/CommandByMail.pm

In terms of functionality, how does this differ from Dirk Pape’s
scrip/template extension for filling in CFs from email?
(http://wiki.bestpractical.com/index.cgi?Contributions ->
ScripActions -> ExtractCustomFieldValues).

That’s a "pull these bits of data"
This is a full “Do stuff by mail” command mode.

RT-Extension-CommandByMail version 0.0.1

INSTALLATION

Read INSTALL file to get more info about installation.

COPYRIGHT AND LICENCE

Copyright © 2006, Best Practical Solutions LLC.

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.

DESCRIPTION
This extension parse content of incoming messages for list commands.
Format of commands is:

    Command: value
    Command: value
    ...

You can find list of "COMMANDS commands below".

Some commands (like Status, Queue and other) can be used only once.
Commands that manage lists can be used multiple times, for example link,
custom fields and watchers commands. Also, the latter can be used with
"Add" and "Del" prefixes to add/delete values from the current list of
the ticket you reply to or comment on.

COMMANDS
Basic
Queue:
Set new queue for the ticket

    Set new subject to the given string

Status: <status>
    Set new status, one of new, open, stalled, resolved, rejected or
    deleted

Owner: <username>
    Set new owner using the given username

Priority: <#>
    Set new priority to the given value

FinalPriority: <#>
    Set new final priority to the given value

Dates
Set new date/timestamp, or 0 to unset:

    Due: <new timestamp>
    Starts: <new timestamp>
    Started: <new timestamp>

Time
Set new times to the given value in minutes. Note that on
correspond/comment “TimeWorked” add time to the current value.

    TimeWorked: <minutes>
    TimeEstimated: <minutes>
    TimeLeft: <minutes>

Watchers
Manage watchers: requestors, ccs and admin ccs. This commands can be
used several times and/or with “Add” and “Del” prefixes, for example
"Requestor" comand set requestor(s) and the current requestors would be
deleted, but “AddRequestor” command adds to the current list.

    Requestor: <address> Set requestor(s) using the email address
    AddRequestor: <address> Add new requestor using the email address
    DelRequestor: <address> Remove email address as requestor
    AddCc: <address> Add new Cc watcher using the email address
    DelCc: <address> Remove email address as Cc watcher
    AdminCc: <address> Set AdminCc watcher(s) using the email address
    AddAdminCc: <address> Add new AdminCc watcher using the email address
    DelAdminCc: <address> Remove email address as AdminCc watcher

Links
Manage links. These commands are also could be used several times in one
message.

    DependsOn: <ticket id>
    DependedOnBy: <ticket id>
    RefersTo: <ticket id>
    ReferredToBy: <ticket id>
    Members: <ticket id>
    MemberOf: <ticket id>

Custom field values
Manage custom field values. Could be used multiple times.

    CustomField.{C<CFName>}: <custom field value>
    AddCustomField.{C<CFName>}: <custom field value>
    DelCustomField.{C<CFName>}: <custom field value>

Short forms:

    CF.{C<CFName>}: <custom field value>
    AddCF.{C<CFName>}: <custom field value>
    DelCF.{C<CFName>}: <custom field value>

Overview:
http://search.cpan.org/dist/RT-Extension-CommandByMail/lib/RT/Extension/CommandByMail.pm
Installation instructions:
http://search.cpan.org/dist/RT-Extension-CommandByMail/INSTALL
Supported commands:
http://search.cpan.org/dist/RT-Extension-CommandByMail/README

Sorry, I made an error in POD, custom field commands CF.{xxxx} without
C in curly brackets.

Also, note that 3.6 branch needs patching too as 3.4, I think patch
for 3.4.5 should work. Please, send me a note if you couldn’t apply
patch to 3.6 I’ll create new one.On 6/2/06, Stephen Turner sturner@mit.edu wrote:

At Thursday 6/1/2006 04:03 PM, Joe Auty wrote:

Hi,

I was working with Jesse Vincent on this, but decided to contact the
list with this question since not only might I find an answer here,
but this answer might be useful to others too…

I’d like to use this extension as a means of parsing out custom field
information sent to the queue address by a script. Extension can be
downloaded here:

http://search.cpan.org/~jesse/RT-Extension-CommandByMail-0.02/lib/RT/
Extension/CommandByMail.pm

In terms of functionality, how does this differ from Dirk Pape’s
scrip/template extension for filling in CFs from email?
(http://wiki.bestpractical.com/index.cgi?Contributions ->
ScripActions -> ExtractCustomFieldValues).

Thanks,
Steve


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

We’re hiring! Come hack Perl for Best Practical: http://bestpractical.com/about/jobs.html

Best regards, Ruslan.

Awesome! It’s working…

The problem was the extra C in the curly bracket… I hope finding
this typo is useful to others too!On Jun 1, 2006, at 5:03 PM, Ruslan Zakirov wrote:

Overview:
http://search.cpan.org/dist/RT-Extension-CommandByMail/lib/RT/
Extension/CommandByMail.pm
Installation instructions:
http://search.cpan.org/dist/RT-Extension-CommandByMail/INSTALL
Supported commands:
http://search.cpan.org/dist/RT-Extension-CommandByMail/README

Sorry, I made an error in POD, custom field commands CF.{xxxx} without
C in curly brackets.

Also, note that 3.6 branch needs patching too as 3.4, I think patch
for 3.4.5 should work. Please, send me a note if you couldn’t apply
patch to 3.6 I’ll create new one.

On 6/2/06, Stephen Turner sturner@mit.edu wrote:

At Thursday 6/1/2006 04:03 PM, Joe Auty wrote:

Hi,

I was working with Jesse Vincent on this, but decided to contact the
list with this question since not only might I find an answer here,
but this answer might be useful to others too…

I’d like to use this extension as a means of parsing out custom
field
information sent to the queue address by a script. Extension can be
downloaded here:

http://search.cpan.org/~jesse/RT-Extension-CommandByMail-0.02/lib/
RT/
Extension/CommandByMail.pm

In terms of functionality, how does this differ from Dirk Pape’s
scrip/template extension for filling in CFs from email?
(http://wiki.bestpractical.com/index.cgi?Contributions ->
ScripActions -> ExtractCustomFieldValues).

Thanks,
Steve


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

We’re hiring! Come hack Perl for Best Practical: http://
bestpractical.com/about/jobs.html


Best regards, Ruslan.

Joe Auty
UITS Messaging
Indiana University
jauty@indiana.edu