
hello, things are going great with the otrs system we started using earlier in the week, really enjoying it, thanks for the great software. i'm running into errors in GenericAgent.pm which I've been unable to find any threads about in the archives of this list. the error refers to the first line of the 'close spam' job which i copy/pasted from http://doc.otrs.org/1.2/en/html/generic-agent-example.html#AEN1035 into my Kernel/Config/GenericAgent.pm here are the errors: tickets:/opt/otrs # bin/GenericAgent.pl Useless use of a constant in void context at /opt/otrs/Kernel/Config/GenericAgent.pm line 44. Useless use of single ref constructor in void context at /opt/otrs/Kernel/Config/GenericAgent.pm line 44. I'm running OTRS 1.2.2 under SuSE 9.0 my GenericAgent.pm version is GenericAgent.pm.dist,v 1.7 2004/02/12 perms are as set by rpm/YaST2 at install and a recent run of bin/SetPermissions.sh here is the job copy/pasted from my Kernel/Config/GenericAgent.pm: <snip> # -- # [name of job] -> close all tickets in queue Junk # -- 'close spam' => { # get all tickets with this properties Queue => 'spam', States => ['new', 'open'], Locks => ['unlock'], # new ticket properties (no option is required, use just the options # which should be changed!) New => { # new queue Queue => 'spam', # possible states (closed successful|closed unsuccessful|open|new|remove d) State => 'closed successful', # new ticket owner (if needed) Owner => 'root@localhost', # if you want to add a Note Note => { From => 'GenericAgent', Subject => 'spam!', Body => 'Closed by GenericAgent.pl because it is spam!', }, }, }, </snip> the queue named 'spam' does exist. any ideas what i might be doing wrong? tia, ~steven

On Thursday, March 25, 2004 6:27 PM
Steven Shults
here is the job copy/pasted from my Kernel/Config/GenericAgent.pm: <snip> # -- # [name of job] -> close all tickets in queue Junk # -- 'close spam' => { # get all tickets with this properties Queue => 'spam', States => ['new', 'open'], Locks => ['unlock'], # new ticket properties (no option is required, use just the options # which should be changed!) New => { # new queue Queue => 'spam', # possible states (closed successful|closed unsuccessful|open|new|remove d)
BEEP_BEEP: clean this up. ;) I guess that's it. hth, Robert Kehl -- ((otrs.de)) :: OTRS GmbH :: Norsk-Data-Str. 1 :: 61352 Bad Homburg http://www.otrs.de/ :: Tel. +49 (0)6172 4832388

actually that was just the way it was wrapped in the terminal window which I copy/pasted from. here's the version copied from a maximized terminal window and pasted into a maximized PINE window showing the actual line breaks as they are in GenericAgent.pm: # -- # [name of job] -> close all tickets in queue Junk # -- 'close spam' => { # get all tickets with this properties Queue => 'spam', States => ['new', 'open'], Locks => ['unlock'], # new ticket properties (no option is required, use just the options # which should be changed!) New => { # new queue Queue => 'spam', # possible states (closed successful|closed unsuccessful|open|new|removed) State => 'closed successful', # new ticket owner (if needed) Owner => 'root@localhost', # if you want to add a Note Note => { From => 'GenericAgent', Subject => 'spam!', Body => 'Closed by GenericAgent.pl because it is spam!', }, }, }, On Thu, 25 Mar 2004, Robert Kehl wrote:
On Thursday, March 25, 2004 6:27 PM Steven Shults
wrote: here is the job copy/pasted from my Kernel/Config/GenericAgent.pm: <snip> # -- # [name of job] -> close all tickets in queue Junk # -- 'close spam' => { # get all tickets with this properties Queue => 'spam', States => ['new', 'open'], Locks => ['unlock'], # new ticket properties (no option is required, use just the options # which should be changed!) New => { # new queue Queue => 'spam', # possible states (closed successful|closed unsuccessful|open|new|remove d)
BEEP_BEEP: clean this up. ;) I guess that's it.
hth,
Robert Kehl

On Thursday, March 25, 2004 8:00 PM
Steven Shults
here's the version copied from a maximized terminal window and pasted into a maximized PINE window showing the actual line breaks as they are in GenericAgent.pm:
diff it to this one: 'close spam' => { Queue => 'spam', States => ['new', 'open'], Locks => ['unlock'], New => { Queue => 'spam', State => 'closed successful', Owner => 'root@localhost', Note => { From => 'GenericAgent', Subject => 'spam!', Body => 'Closed by GenericAgent.pl because it is spam!', }, }, }, hth, Robert Kehl -- ((otrs.de)) :: OTRS GmbH :: Norsk-Data-Str. 1 :: 61352 Bad Homburg http://www.otrs.de/ :: Tel. +49 (0)6172 4832388

only difference is the comments, but i deleted mine and pasted your version without comments into it the file in it's place i get the same errors except they refer to line 40 now, which is still this line: 'close spam' => { On Thu, 25 Mar 2004, Robert Kehl wrote:
On Thursday, March 25, 2004 8:00 PM Steven Shults
wrote: here's the version copied from a maximized terminal window and pasted into a maximized PINE window showing the actual line breaks as they are in GenericAgent.pm:
diff it to this one:
'close spam' => { Queue => 'spam', States => ['new', 'open'], Locks => ['unlock'], New => { Queue => 'spam', State => 'closed successful', Owner => 'root@localhost', Note => { From => 'GenericAgent', Subject => 'spam!', Body => 'Closed by GenericAgent.pl because it is spam!', }, }, },
hth,
Robert Kehl

will PINE wrapped the possible states comment line anyway. i assure you the only line break in the comment which lists possible states is after 'removed) line 44 which the error messages refer to is the first line of the job, this line: 'close spam' => { On Thu, 25 Mar 2004, Steven Shults wrote:
actually that was just the way it was wrapped in the terminal window which I copy/pasted from.
here's the version copied from a maximized terminal window and pasted into a maximized PINE window showing the actual line breaks as they are in GenericAgent.pm:
# -- # [name of job] -> close all tickets in queue Junk # -- 'close spam' => { # get all tickets with this properties Queue => 'spam', States => ['new', 'open'], Locks => ['unlock'], # new ticket properties (no option is required, use just the options # which should be changed!) New => { # new queue Queue => 'spam', # possible states (closed successful|closed unsuccessful|open|new|removed) State => 'closed successful', # new ticket owner (if needed) Owner => 'root@localhost', # if you want to add a Note Note => { From => 'GenericAgent', Subject => 'spam!', Body => 'Closed by GenericAgent.pl because it is spam!', }, }, },
On Thu, 25 Mar 2004, Robert Kehl wrote:
On Thursday, March 25, 2004 6:27 PM Steven Shults
wrote: here is the job copy/pasted from my Kernel/Config/GenericAgent.pm: <snip> # -- # [name of job] -> close all tickets in queue Junk # -- 'close spam' => { # get all tickets with this properties Queue => 'spam', States => ['new', 'open'], Locks => ['unlock'], # new ticket properties (no option is required, use just the options # which should be changed!) New => { # new queue Queue => 'spam', # possible states (closed successful|closed unsuccessful|open|new|remove d)
BEEP_BEEP: clean this up. ;) I guess that's it.
hth,
Robert Kehl
_______________________________________________ OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs Support oder Consulting für Ihr OTRS System? => http://www.otrs.de/

On Thursday, March 25, 2004 8:06 PM
Steven Shults
will PINE wrapped the possible states comment line anyway. i assure you the only line break in the comment which lists possible states is after 'removed)
Ok, got that clear. It's far too often the error, so don't get me wrong to insist on it. ;) Could it be your mssing this right before the first job? %Jobs = ( Or perhaps you have this before the 'close spam' jobs: ); In other words, the syntax is broken, you clsed the array before the 'close spam' job. hth, Robert Kehl -- ((otrs.de)) :: OTRS GmbH :: Norsk-Data-Str. 1 :: 61352 Bad Homburg http://www.otrs.de/ :: Tel. +49 (0)6172 4832388

On Thursday, March 25, 2004 8:14 PM
Robert Kehl
In other words, the syntax is broken, you clsed the array before the 'close spam' job.
The general structure of a current GenericAgent.pm is as follows: #################### snip #################### package Kernel::Config::GenericAgent; use strict; use vars qw($VERSION @ISA @EXPORT %Jobs); require Exporter; @ISA = qw(Exporter); @EXPORT = qw(%Jobs); $VERSION = '$Revision: 1.7 $'; $VERSION =~ s/^\$.*:\W(.*)\W.+?$/$1/; %Jobs = ( # -- # [job 1 name] -> job 1 description # -- 'job 1 name' => { #job specs }, # -- # [job 2 name] -> job 2 description # -- 'job 2 name' => { #job specs }, # -- # [job 3 name] -> job 3 description # -- 'job 3 name' => { #job specs }, ); 1; #################### snup #################### hth, Robert Kehl -- ((otrs.de)) :: OTRS GmbH :: Norsk-Data-Str. 1 :: 61352 Bad Homburg http://www.otrs.de/ :: Tel. +49 (0)6172 4832388

Or perhaps you have this before the 'close spam' jobs: );
that was it, thank you robert. it's working great now. take care, ~Steven On Thu, 25 Mar 2004, Robert Kehl wrote:
On Thursday, March 25, 2004 8:06 PM Steven Shults
wrote: will PINE wrapped the possible states comment line anyway. i assure you the only line break in the comment which lists possible states is after 'removed)
Ok, got that clear. It's far too often the error, so don't get me wrong to insist on it. ;)
Could it be your mssing this right before the first job? %Jobs = (
Or perhaps you have this before the 'close spam' jobs: );
In other words, the syntax is broken, you clsed the array before the 'close spam' job.
hth,
Robert Kehl
-- ((otrs.de)) :: OTRS GmbH :: Norsk-Data-Str. 1 :: 61352 Bad Homburg http://www.otrs.de/ :: Tel. +49 (0)6172 4832388
_______________________________________________ OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs Support oder Consulting für Ihr OTRS System? => http://www.otrs.de/
participants (2)
-
Robert Kehl
-
Steven Shults