Skip Menu |

This queue is for tickets about the RT-Extension-CommandByMail CPAN distribution.

Report information
The Basics
Id: 106069
Status: new
Priority: 0/
Queue: RT-Extension-CommandByMail

People
Owner: Nobody in particular
Requestors: jjahns [...] vmware.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Issue Setting Owner Via Email
Date: Fri, 24 Jul 2015 21:51:59 +0000
To: "bug-RT-Extension-CommandByMail [...] rt.cpan.org" <bug-RT-Extension-CommandByMail [...] rt.cpan.org>
From: Jay Jahns <jjahns [...] vmware.com>
Running version RT 4.2.11 Plugin version is 1.00 Issue is when trying to set owner of a newly created ticket that nobody owns. Getting the following errors: [12516] [Fri Jul 24 21:42:38 2015] [warning]: Failed command '?owner: jjahns' Error message: Command '?owner' is unknown (/opt/rt4/local/plugins/RT-Extension-CommandByMail/lib/RT/Interface/Email/Filter/TakeAction.pm:756) [12516] [Fri Jul 24 21:42:38 2015] [crit]: Extended mailgate error: Failed command '?owner: jjahns' Error message: Command '?owner' is unknown (/opt/rt4/sbin/../lib/RT/Interface/Email.pm:245) rt-mailgate returns the following: Failed command '?owner: jjahns' Error message: Command '?owner' is unknown? I have been looking at the TakeAction.pm file to find out why this is the case. We are simply specifying Owner and the username as defined in RT. The user is authorized to take ownership of the ticket and there are no issues like this in the UI, so its definitely the plugin from what I can tell. Thanks for all your hard work, and thank you for making a fantastic product/extension.
Subject: RE: [rt.cpan.org #106069] Issue Setting Owner Via Email
Date: Mon, 27 Jul 2015 04:16:46 +0000
To: "bug-RT-Extension-CommandByMail [...] rt.cpan.org" <bug-RT-Extension-CommandByMail [...] rt.cpan.org>
From: Jay Jahns <jjahns [...] vmware.com>
So according to the TakeAction.pm, the value is located in the REGULAR_ATTRIBUTES: our @REGULAR_ATTRIBUTES = qw(Queue Owner Subject Status Priority FinalPriority); However, it appears that it fails at this section of code: foreach my $cmd ( keys %cmds ) { my ($val, $msg) = _CheckCommand( $cmd ); unless ( $val ) { $results{ $cmd } = { value => delete $cmds{ $cmd }, result => $val, message => $msg, }; } } The _CheckCommand function is as defined here: sub _CheckCommand { my ($cmd, $val) = (lc shift, shift); return 1 if $cmd =~ /^(add|del|)customfield{.*}$/i; return 1 if $cmd =~ /^transactioncustomfield{.*}$/i; if ( grep $cmd eq lc $_, @REGULAR_ATTRIBUTES, @TIME_ATTRIBUTES, @DATE_ATTRIBUTES ) { return 1 unless ref $val; return (0, "Command '$cmd' doesn't support multiple values"); } return 1 if grep $cmd eq lc $_, @LINK_ATTRIBUTES, @WATCHER_ATTRIBUTES; if ( $cmd =~ /^(?:add|del)(.*)$/i ) { my $cmd = $1; if ( grep $cmd eq lc $_, @REGULAR_ATTRIBUTES, @TIME_ATTRIBUTES, @DATE_ATTRIBUTES ) { return (0, "Command '$cmd' doesn't support multiple values"); } return 1 if grep $cmd eq lc $_, @LINK_ATTRIBUTES, @WATCHER_ATTRIBUTES; } return (0, "Command '$cmd' is unknown"); } I'm not sure yet on what the problem is, but I'm currently testing the removal of this check to see if that allows us to set the owner.