Re: [rt-users] Help with Correspond condition

2010-10-11 Thread Raed El-Hames
Ken:

Can you post the code that you cut and pasted to get a better idea of the 
problem.
Also something that I always fall into , is writing my action code in Custom 
action cleanup code:  and forgetting about and leaving
Custom action preparation code:  completely empty, you will need
return true ;
there.

Roy

From: rt-users-boun...@lists.bestpractical.com 
[mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of Kenneth Crocker
Sent: 08 October 2010 17:25
To: rt-users@lists.bestpractical.com
Subject: [rt-users] Help with Correspond condition

To List,

I have some code that strips information out of the content and sticks it into 
a Custom Field. IT works great when I trigger it with an condition set for 
email create tickets. Every time, it works with no problem.

However, when I set the condition for On Correspond it does nothing. I want 
to be able to update that Custom FIeld the same way I create it initially and I 
figured On Correspond was the right condition. Apparently not.

I look ed in the TRANSACTIONS Table and I See the Type as Correspond. So why 
doesn't the same code (I copied and pasted) that works for a Create not work 
for On Correspond?

My error messages (which don't make sense since I am user 146 and am a 
SuperUser) are below:

[Fri Oct  8 16:07:44 2010] [warning]: Couldn't enable user 146 
(/opt/rt3/bin/../lib/RT/User_Overlay.pm:1143)
[Fri Oct  8 16:12:51 2010] [error]: Group::HasMember was called with an 
argument that isn't an RT::Principal or id. It's (undefined) 
(/opt/rt3/bin/../lib/RT/Group_Overlay.pm:1046)


Can anyone help me on this? I just need to get the condition right.

Thanks.

Kenn
LBNL

RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!

[rt-users] getting 'time worked' for one user and one time period

2010-10-11 Thread John Constable
Hi all,

 

Hoping someone else has done this already I can crib from..

 

Our team uses RT for trouble tickets, and record how much time they
spend on each update.  They also pass tickets among themselves.  I run a
very basic report of tickets modified that week in that queue, and,
downloading the spreadsheet, calculate the time worked field for each
owner.  This has a number of problems, the most pertinent of which is
that it seems to show all the time worked, and hence that users may
'benefit' from work on the ticket by others but its applied to just
their userid, and there is no way to extract just the time worked in
that week.

 

Has anyone done this in a more elegant, accurate way?  I'm happy to
write some code to do this, but was wondering if RT stores the data for
time in a (say) array for each ticket, or just an incremented counter,
which would mean I could never separate the ticket out between the
multiple contributors, or times contributed.. Some advice would be
appreciated!

 

Cheers

 

John

--

John Constable

Group IT Manager

ip.access Ltd

DDI: +44 1954 713723

Don't forget IT On call No: +44 1954 717909

Please raise all IT issues via i...@ipaccess.com

 






This message contains confidential information and may be privileged. If you 
are not the intended recipient, please notify the sender and delete the message 
immediately.

ip.access Ltd, registration number 3400157, Building 2020, 
Cambourne Business Park, Cambourne, Cambridge CB23 6DW, United Kingdom



RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!

Re: [rt-users] getting 'time worked' for one user and one time period

2010-10-11 Thread Johan Sjöberg
Maybe you can use this report?
http://wiki.bestpractical.com/view/TimeWorked

/Johan

From: rt-users-boun...@lists.bestpractical.com 
[mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of John Constable
Sent: den 11 oktober 2010 12:56
To: rt-users@lists.bestpractical.com
Subject: [rt-users] getting 'time worked' for one user and one time period

Hi all,

Hoping someone else has done this already I can crib from..

Our team uses RT for trouble tickets, and record how much time they spend on 
each update.  They also pass tickets among themselves.  I run a very basic 
report of tickets modified that week in that queue, and, downloading the 
spreadsheet, calculate the time worked field for each owner.  This has a number 
of problems, the most pertinent of which is that it seems to show all the time 
worked, and hence that users may 'benefit' from work on the ticket by others 
but its applied to just their userid, and there is no way to extract just the 
time worked in that week.

Has anyone done this in a more elegant, accurate way?  I'm happy to write some 
code to do this, but was wondering if RT stores the data for time in a (say) 
array for each ticket, or just an incremented counter, which would mean I could 
never separate the ticket out between the multiple contributors, or times 
contributed.. Some advice would be appreciated!

Cheers

John
--
John Constable
Group IT Manager
ip.access Ltd
DDI: +44 1954 713723
Don't forget IT On call No: +44 1954 717909
Please raise all IT issues via i...@ipaccess.commailto:i...@ipaccess.com





This message contains confidential information and may be privileged. If you 
are not the intended recipient, please notify the sender and delete the message 
immediately.

ip.access ltd, registration number 3400157, Building 2020,
Cambourne Business Park, Cambourne, Cambridge CB23 6DW, United Kingdom


RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!

Re: [rt-users] Getting CustomField 'Sort' order in Scrip

2010-10-11 Thread Kevin Falcone
On Mon, Oct 11, 2010 at 03:50:22PM +1100, Stuart Browne wrote:
 Am trying to do a select-a-worded-priority for our interface and
 have set the sort order to the numeric priority values, but I can't
 figure out how to get the sort order from a Scrip on the queue so I
 can set the ticket's Priority ($ticket-SetPriority(xxx)).

Have you seen RT-Extension-PriorityAsString ?

 Is there a way using ObjectCustomFieldValues or just
 CustomFieldValues, instead of having to write a hash-map of
 word-to-number?

You can iterate through the CustomFieldValues collection from a CF and
request -SortOrder, or you could just load columns directly.

-kevin


pgpKlFsZjm2EA.pgp
Description: PGP signature

RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!

Re: [rt-users] Summary Searches

2010-10-11 Thread Torsten Brumm
Have a Look in Cpan for summarybyowner from ruslan, think thats what You're 
Looking for.

Von meinem iPhone gesendet

Am 11.10.2010 um 17:08 schrieb Jason Ledford jledf...@biltmore.com:

 I have searched the wiki and mailing list and can’t find my answer, so if its 
 there feel free to point me in that direction.  I want to setup a search 
 similar to the quicksearch, where I get (for example) the users I am 
 concerned with seeing, and then across the top the same new open and stalled 
 with summary numbers below.   That way each manager can easily see statistics 
 on their reports without having to see the detail of each call. 
  
 I have created a search for these users and get get the search to work, but 
 can’t figure out how to do the grouping to get summary numbers.  Help is 
 appreciated.
 
 Thanks.
  
  
 
 RT Training in Washington DC, USA on Oct 25  26 2010
 Last one this year -- Learn how to get the most out of RT!

RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!

[rt-users] custom fields (simple?) question

2010-10-11 Thread Carlos Javier
Hi,

I promise I've searched through http://www.gossamer-threads.com, but
either I'm very bad searching, or my question is too stupid (or
both!). Setup: RT 3.8.8, RTFM 2.4.2, RT-IR 2.4.4, Apache, RHEL.

I want to create several queues that behave as closely to Incident
Report as possible, but different ones, so different Groups can see
each one of them.

So I created the first one, let's say IR - 1. I add for it the same
Ticket Custom Fields that Incident Report has. Just for test, and not
have problems with permissions, I give Everyone all permissions on
this queue.

Then, I go to create a ticket for this IR - 1 queue:

- the custom fields do not appear, the entry window is just as a
general ticket window
- instead of the title Create a new Incident Report, it shows
Create a new ticket
- I create the ticket, anyway. In ticket metadata, the custom
fields tab is empty

What am I doing wrong?

Many thanks,

Carlos

RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!


Re: [rt-users] custom fields (simple?) question

2010-10-11 Thread Kenneth Crocker
Carlos,

RT is designed to allow flexibility when granting permissions. I can grant
MosifyTicket to someone, but that doesn't mean they can create comments or
update Custom Fields. The ModifyTIcket right is for the basic MetatData
fields you find in a Ticket. Comments are separate. So are Custom Fields. If
you take a close look at the rights you can grant a group (I say group
because we don't really like to grant rights to individual users. WAY TOO
MUCH maintenance when you have to modify/grant the same rights to a bunch of
people. We put them in groups. Much easier) you will see ModifyTicket,
CommentOnTicket. This allows you to grant the right to make commonets on a
ticket, but not the MetaData in the TIcket. Same for Email. Custom FIelds
allow granting rights by Group.I can create a Queue, apply a Custom FIeld
to it and yet NEVER grant rights to see or modify that Custom Field because
I want ONLY RT to do it thru scrips. Let's say I wanted a TimeStamp for
every Transaction (Just an example). I could create the CF, apply it to a
Queue and then modify that CF with the current Date/Time whenever a
transaction goes against a ticket. In the DataBase, the old Ticket Custom
Field would be disabled (but still visable via SQL) and a new one created as
a OBJECTCUSTOMFIELDVALUES Table record.
I could also grantSeeCustomField to a certain group of users and they
would be able to SEE it, but not Modify it. I could also create a Custom
Field, grant all sorts of rights to it, but not apply it to any Queue. NO
one would be able to see it or modify it because it wouldn't exist for any
ticket in any Queue because it was not applied.
S in your situation, when you went to Config-CustomFields-Group Rights
... what rights did you give to what group of users?
Check it out and let me know. Hope this helps.

Kenn
LBNL

On Mon, Oct 11, 2010 at 8:28 AM, Carlos Javier carlosjavie...@gmail.comwrote:

 Hi,

 I promise I've searched through http://www.gossamer-threads.com, but
 either I'm very bad searching, or my question is too stupid (or
 both!). Setup: RT 3.8.8, RTFM 2.4.2, RT-IR 2.4.4, Apache, RHEL.

 I want to create several queues that behave as closely to Incident
 Report as possible, but different ones, so different Groups can see
 each one of them.

 So I created the first one, let's say IR - 1. I add for it the same
 Ticket Custom Fields that Incident Report has. Just for test, and not
 have problems with permissions, I give Everyone all permissions on
 this queue.

 Then, I go to create a ticket for this IR - 1 queue:

 - the custom fields do not appear, the entry window is just as a
 general ticket window
 - instead of the title Create a new Incident Report, it shows
 Create a new ticket
 - I create the ticket, anyway. In ticket metadata, the custom
 fields tab is empty

 What am I doing wrong?

 Many thanks,

 Carlos

 RT Training in Washington DC, USA on Oct 25  26 2010
 Last one this year -- Learn how to get the most out of RT!


RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!

Re: [rt-users] custom fields (simple?) question

2010-10-11 Thread Kevin Falcone
On Mon, Oct 11, 2010 at 05:28:47PM +0200, Carlos Javier wrote:
 Hi,
 
 I promise I've searched through http://www.gossamer-threads.com, but
 either I'm very bad searching, or my question is too stupid (or
 both!). Setup: RT 3.8.8, RTFM 2.4.2, RT-IR 2.4.4, Apache, RHEL.

I suspect your problem is that RTIR is a bit magical with regards to
queues / custom fields for RTIR.  

You're going to need to do considerable work to make RTIR understand alternate
queues being equivalent to Incident Reports.

You may want to concentrate on ways to keep the tickets in IR instead
and segregate rights.


-kevin

 I want to create several queues that behave as closely to Incident
 Report as possible, but different ones, so different Groups can see
 each one of them.
 
 So I created the first one, let's say IR - 1. I add for it the same
 Ticket Custom Fields that Incident Report has. Just for test, and not
 have problems with permissions, I give Everyone all permissions on
 this queue.
 
 Then, I go to create a ticket for this IR - 1 queue:
 
 - the custom fields do not appear, the entry window is just as a
 general ticket window
 - instead of the title Create a new Incident Report, it shows
 Create a new ticket
 - I create the ticket, anyway. In ticket metadata, the custom
 fields tab is empty
 
 What am I doing wrong?
 
 Many thanks,
 
 Carlos
 
 RT Training in Washington DC, USA on Oct 25  26 2010
 Last one this year -- Learn how to get the most out of RT!


pgpDLu6FxSpRx.pgp
Description: PGP signature

RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!

Re: [rt-users] Help with Correspond condition

2010-10-11 Thread Kenneth Crocker
Raed,

Thanks for responding. Yse, I do have a return 1; in the Custom PRep area.
Actually, I have tried getting this to work with the code in one or the
other Custom Action areas. As an explanation of the context, I have not been
able to get CommanByMail to update a Custom Field defined as either text
or Wikitext if the content is over 76 or so characters. Apparantly, bith
Gmail and Thunderbird and perhaps others email providers embed a line break
character after that many characters and that causes a line Break in CBM
and I end up with only partial updates. So, being the stubborn person I am,
I got a perl guy to write some code I could put into a scrip that would
examine the content of an email, look for a define delimiter (like
Description of Issue:) in the content and put everything after that
delimiter into the Custom Field. Make sense? It did to me. In fact, it works
perfectly when I set the condition to a Type = Create and message header =
received. But on a Correspond (meaning an update email as opposed to a
create), it just doesn't seem to see the email at all. Nothing. Nada.
Well, anyway, here's the code:

# Setup initial values

my $trans = $self-TransactionObj;
my $ticket = $self-TicketObj;
my $cf_obj = RT::CustomField-new($RT::SystemUser);
my $cf_name = Description;
my $cf_value = Didn't work;
my $message = $ticket-Transactions-First-Content;
my $passed = 0;
my $content;
my $line;

# split up lines in content by line break

my @lines = split(\n, $message);

# walk thru @lines and find the description

foreach $line (@lines)
{
 if  ($passed == 1)
 {
  if  ($content =~ m/^\n$/)
  {
   $content = $content.$line;
  }
  else
  {
   $content = $content.\n.$line;
  }
 }
 if  ($line =~ m/^Description of Issue:/)
 {
  $line =~ s/Description of Issue://;
  $content = $content.\n.$line;
  $passed = 1;
 }
}

$cf_value = $content;

# set the value for CF Description

$cf_obj-LoadByName( Name = $cf_name );
$RT::Logger-debug( Loaded \$cf_obj-Name = . $cf_obj-Name() .\n );
$ticket-AddCustomFieldValue( Field=$cf_obj, Value=$cf_value,
RecordTransaction=0 );

return 1;

Thanks for your help.

Kenn
LBNL

On Mon, Oct 11, 2010 at 2:36 AM, Raed El-Hames raed.el-ha...@vialtus.comwrote:

  Ken:



 Can you post the code that you cut and pasted to get a better idea of the
 problem.

 Also something that I always fall into , is writing my action code in “Custom
 action cleanup code:”  and forgetting about and leaving

 “Custom action preparation code:”  completely empty, you will need

 return true ;

 there.



 Roy



 *From:* rt-users-boun...@lists.bestpractical.com [mailto:
 rt-users-boun...@lists.bestpractical.com] *On Behalf Of *Kenneth Crocker
 *Sent:* 08 October 2010 17:25
 *To:* rt-users@lists.bestpractical.com
 *Subject:* [rt-users] Help with Correspond condition



 To List,

 I have some code that strips information out of the content and sticks it
 into a Custom Field. IT works great when I trigger it with an condition set
 for email create tickets. Every time, it works with no problem.

 However, when I set the condition for On Correspond it does nothing. I
 want to be able to update that Custom FIeld the same way I create it
 initially and I figured On Correspond was the right condition. Apparently
 not.

 I look ed in the TRANSACTIONS Table and I See the Type as Correspond. So
 why doesn't the same code (I copied and pasted) that works for a Create
 not work for On Correspond?

 My error messages (which don't make sense since I am user 146 and am a
 SuperUser) are below:

 [Fri Oct  8 16:07:44 2010] [warning]: Couldn't enable user 146
 (/opt/rt3/bin/../lib/RT/User_Overlay.pm:1143)
 [Fri Oct  8 16:12:51 2010] [error]: Group::HasMember was called with an
 argument that isn't an RT::Principal or id. It's (undefined)
 (/opt/rt3/bin/../lib/RT/Group_Overlay.pm:1046)


 Can anyone help me on this? I just need to get the condition right.

 Thanks.

 Kenn
 LBNL


RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!

Re: [rt-users] LastUpdated x days ago

2010-10-11 Thread Kenneth Crocker
Matthew,

We use LastUpdated  '15 days ago' and it works fine. Every ticket updated
15 or more days ago gets in the report. Are there other criteria you forgot
to mention?

Kenn
LBNL

On Mon, Oct 11, 2010 at 2:27 AM, Raed El-Hames raed.el-ha...@vialtus.comwrote:

 Matthew;

 I 've used:
 LastUpdated = '15 days ago'

 And it always worked for me.

 Regards;
 Roy

  -Original Message-
  From: rt-users-boun...@lists.bestpractical.com [mailto:rt-users-
  boun...@lists.bestpractical.com] On Behalf Of Mathew Snyder
  Sent: 11 October 2010 03:23
  To: RT Users
  Subject: [rt-users] LastUpdated x days ago
 
  I'm trying to write  a script that will check for tickets last updated
  15 days ago. I'm using the FromSQL method. As far as I can tell, it
  doesn't like the '-15 days' or '15 days ago' options. If I use either
  one every ticket in the queue I'm searching in is returned. Am I
  doomed to perform a separate comparison for tickets last updated
  129600 miliseconds ago or is there a more succinct way to do this?
 
  -Mathew
 
  RT Training in Washington DC, USA on Oct 25  26 2010
  Last one this year -- Learn how to get the most out of RT!

 RT Training in Washington DC, USA on Oct 25  26 2010
 Last one this year -- Learn how to get the most out of RT!


RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!

Re: [rt-users] LastUpdated x days ago

2010-10-11 Thread Kenneth Crocker
Matthew,

Opps. Acutally that's LastUpdated  '14 days ago'.

Kenn
LBNL

On Mon, Oct 11, 2010 at 9:48 AM, Kenneth Crocker kfcroc...@lbl.gov wrote:

 Matthew,

 We use LastUpdated  '15 days ago' and it works fine. Every ticket updated
 15 or more days ago gets in the report. Are there other criteria you forgot
 to mention?

 Kenn
 LBNL


 On Mon, Oct 11, 2010 at 2:27 AM, Raed El-Hames 
 raed.el-ha...@vialtus.comwrote:

 Matthew;

 I 've used:
 LastUpdated = '15 days ago'

 And it always worked for me.

 Regards;
 Roy

  -Original Message-
  From: rt-users-boun...@lists.bestpractical.com [mailto:rt-users-
  boun...@lists.bestpractical.com] On Behalf Of Mathew Snyder
  Sent: 11 October 2010 03:23
  To: RT Users
  Subject: [rt-users] LastUpdated x days ago
 
  I'm trying to write  a script that will check for tickets last updated
  15 days ago. I'm using the FromSQL method. As far as I can tell, it
  doesn't like the '-15 days' or '15 days ago' options. If I use either
  one every ticket in the queue I'm searching in is returned. Am I
  doomed to perform a separate comparison for tickets last updated
  129600 miliseconds ago or is there a more succinct way to do this?
 
  -Mathew
 
  RT Training in Washington DC, USA on Oct 25  26 2010
  Last one this year -- Learn how to get the most out of RT!

 RT Training in Washington DC, USA on Oct 25  26 2010
 Last one this year -- Learn how to get the most out of RT!




RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!

[rt-users] Merged tickets missing from search

2010-10-11 Thread Dan Mahoney, System Admin

Hey all,

We're running rt3.8.6, under FreeBSD, installed from ports.  All 
modifications done via rt_siteconfig.pm (and there are not many).


The problem I'm seeing is this: we have a ticket which is not showing in 
the list of unowned tickets.  A second ticket has been merged into it 
which was also unowned, and I suspect that's related but I'm not sure why 
or how, and I'm not able to duplicate it by merging two other tickets.


In fact, when I search the queue and say show all tickets, of any status, 
that ticket still does not show in the list.  It doesn't show when I 
browse the list.


Is there some DB-consistency check I can run?  This ticket has gone 
phantom on us, and it's making our support folks wonder where else it 
could happen.


-Dan

--


RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!


Re: [rt-users] LastUpdated x days ago

2010-10-11 Thread Ruslan Zakirov
Hi.

LastUpdated  x means updated since x.   means updated before x. So
LastUpdated  '15 days ago' is probably what you need and means tickets that
are not touched last 15 days.

Regards, Ruslan. From phone.
2010 10 11 20:49 пользователь Kenneth Crocker kfcroc...@lbl.gov написал:
 Matthew,

 Opps. Acutally that's LastUpdated  '14 days ago'.

 Kenn
 LBNL

 On Mon, Oct 11, 2010 at 9:48 AM, Kenneth Crocker kfcroc...@lbl.gov
wrote:

 Matthew,

 We use LastUpdated  '15 days ago' and it works fine. Every ticket
updated
 15 or more days ago gets in the report. Are there other criteria you
forgot
 to mention?

 Kenn
 LBNL


 On Mon, Oct 11, 2010 at 2:27 AM, Raed El-Hames raed.el-ha...@vialtus.com
wrote:

 Matthew;

 I 've used:
 LastUpdated = '15 days ago'

 And it always worked for me.

 Regards;
 Roy

  -Original Message-
  From: rt-users-boun...@lists.bestpractical.com [mailto:rt-users-
  boun...@lists.bestpractical.com] On Behalf Of Mathew Snyder
  Sent: 11 October 2010 03:23
  To: RT Users
  Subject: [rt-users] LastUpdated x days ago
 
  I'm trying to write a script that will check for tickets last updated
  15 days ago. I'm using the FromSQL method. As far as I can tell, it
  doesn't like the '-15 days' or '15 days ago' options. If I use either
  one every ticket in the queue I'm searching in is returned. Am I
  doomed to perform a separate comparison for tickets last updated
  129600 miliseconds ago or is there a more succinct way to do this?
 
  -Mathew
 
  RT Training in Washington DC, USA on Oct 25  26 2010
  Last one this year -- Learn how to get the most out of RT!

 RT Training in Washington DC, USA on Oct 25  26 2010
 Last one this year -- Learn how to get the most out of RT!




RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!

Re: [rt-users] Continuous Login (RT 3.8.8)

2010-10-11 Thread Sebastian Podjasek
Your problem is with PostgreSQL not RT.
In version 9.0 default behaviour for bytea fields
changed and now they're returned as hex
(as described in
http://www.postgresql.org/docs/9.0/static/release-9-0.html#AEN99024).

To change this add:

   bytea_output = escape

to postgresql.conf and restart it.

Regards,
Sebastian

-- 
Sebastian Podjasek
morenet.pl

RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!