Re: [rt-users] Condition

2010-12-17 Thread Kevin Falcone
On Thu, Dec 16, 2010 at 12:06:21PM -0800, Leo Gorauskas wrote:
 I need to create a conditional statement that check for the current
 page name, for example if /Ticket/Elements/EditCustomFields is
 called from /index.html then display the Custom Fields in single
 column otherwise display them in the default 2 column.

I suspect you want HTML::Mason's caller method.

-kevin


pgpSUklRsVYif.pgp
Description: PGP signature


Re: [rt-users] Rép. : Re: Ticket Forwarding

2010-12-17 Thread Kevin Falcone
On Fri, Dec 17, 2010 at 07:44:28AM +0100, Horst Kriegers wrote:
As temporarily workaround :
- Can I add manually a note at the ticket, so that the forward works for 
 this ticket ? If yes,
how ?

Not easily, RT doesn't make modifying ticket history easy.

- It is possible to create a temporarily scrip which adds automatically a 
 note if note is
empty ?

There is a template that is used to generate This is a forward of
ticket #1234 which you could tweak

-kevin

Horst
 
 Le Jeudi, 16. Decembre 2010 �   16:32, Kevin Falcone 
 falc...@bestpractical.com a ecrit :
 
On Thu, Dec 16, 2010 at 10:18:40AM +0100, Horst Kriegers wrote:
I've reproduced this problem by creating a new ticket with a binary 
 attachment and without
notes.

If I create a new ticket with a binary attachment AND a note, the 
 forward works fine.
 
Horst
 
Thanks for your work figuring out a reproduction case.  I'm going to
bounce your ticket into the bugtracker so we can have a look.
 
I'm relatively sure that the issue is because there is no ContentObj
(which RT expects to be a textual component)
 
-kevin
 
 Le Jeudi, 16. Decembre 201009:21, Horst Kriegers a ecrit :

Yes, unmerged ticket with binary is fine.

I've tried following, from History page :
- Forward only the first ticket (without attachment) : OK
- Forward only the second ticket (with binary) : KO


The second ticket has only the attached file, without any note.
The attached file is a PDF file.
During the ticket creation, the file was attached without his 
 extension (.pdf ).



Horst


 Le Mercredi, 15. Decembre 201017:03, Kevin Falcone 
 falc...@bestpractical.com a
ecrit
:

On Wed, Dec 15, 2010 at 08:13:09AM +0100, Horst Kriegers wrote:
- RT Version 3.8.8
- It seems to be for only for a specific merged tickets wich 
 contains a binary
attached
file

So, just to confirm, binary attachment, unmerged is fine, but binary +
merge seems to break when forwarding the whole ticket?

Also, I'm curious if this is a ticket where there isn't a message,
just the attachment or if there is a note + attachment.

-kevin

- Stacktraces gives only : See attached RT_forward_stack.txt 
 file


Tanks for your help
Horst

 Le Mardi, 14. Decembre 201017:14, Kevin Falcone 
 falc...@bestpractical.com a
ecrit
:

On Tue, Dec 14, 2010 at 04:11:16PM +0100, Horst Kriegers wrote:
Hi list,

following error apear by using the ticket Forward function :

A blank page with only the text Can't call method 
 ContentAsMIME on an
undefined
value
at
/opt/rt_prd/bin/../lib/RT/Transaction_Overlay.pm line 529, 
 line 276. 

RT Version?
Is this on any ticket or one in particule?
What do you get if you enable stacktraces in your config on 
 errors?

-kevin

RT log says only :
[Tue Dec 14 15:02:57 2010] [debug]: We found a merged 
 ticket. 30160/30162
(/opt/rt_prd/bin/../lib/RT/Ticket_Overlay.pm:185)



 ___

Le contenu de ce courriel est uniquement reserve `a la personne 
 ou l'organisme `a qui
il
est
destine. Si vous n'etes pas le destinataire prevu, veuillez nous 
 en informer au plus
vite
et
detruire le present courriel. Dans ce cas, il ne vous est pas 
 permis de copier ce
courriel,
de
le distribuer ou de l'utiliser de quelque maniere que ce soit.


 ___

The content of this e-mail is intended only and solely for the 
 use of the named
recipient
or
organisation. If you are not the named recipient, please inform 
 us immediately and
delete
the
present e-mail. In this case, you are nor allowed to copy, 
 distribute or use this
e-mail in
any way.


 ___

 ==
  Displayed on Screen
 ==
 System error
 error:  Can't call method ContentAsMIME on an undefined value at
/opt/rt_prd/bin/../lib/RT/Transaction_Overlay.pm line 529, DATA 
 line 276.
 context:
 ...
 525:  sub ContentAsMIME {
 526:  my $self = shift;
 

Re: [rt-users] getting the Resolver Name / address into a template?

2010-12-17 Thread Joseph Spenner

--- On Fri, 12/17/10, Kevin Falcone falc...@bestpractical.com wrote:


  
    (is there a way to get the
 [rt.foo.com #287] from not showing up?)
 
 No, RT is going to stick that into generated mail because
 it wants to
 protect itself if the mail comes back in
 
  Also, how would I change the From address?  I
 would rather make it such that a Reply to the above
 message does not go back into RT.
 
 You should be able to clobber From: in the template
 
  In the past, I was able to modify the RT_SiteConfig.pm
 to change the TO address with the following:
  
  Set($FriendlyToLineFormat, 'nob...@foo.com');
  
  Can a similar variable be set in the template itself,
 a $FriendlyFromLineFormat or something?
 
 There is a friendly from line format, but it isn't for what
 you want.
 You also appear to be doing something odd with your
 FriendlyToLineFormat,
 but I guess it works for you.
 
 -kevin
 

Thanks for the info.  I think I'm set!

The reason I did the FriendlyToLineFormat above was to get rid of the 
'undisclosed recipients'.  I tried several things with no success, but the 
above worked fine.  I then made an alias to redirect the 'nobody' mail to 
/dev/null.






Re: [rt-users] Tracking down rogue dashboard subscriptions

2010-12-17 Thread Francis L Fabrizio
To first answer Kevin's question, yep that's the only record that is returned 
when doing select * from Attributes where Name = 'Subscription';

The crontab entry is:

0 * * * * /usr/local/rt/sbin/rt-email-dashboards

Thanks,
Fran

 -Original Message-
 From: rt-users-boun...@lists.bestpractical.com [mailto:rt-users-
 boun...@lists.bestpractical.com] On Behalf Of Shawn M Moore
 Sent: Thursday, December 16, 2010 11:20 AM
 To: rt-users@lists.bestpractical.com
 Subject: Re: [rt-users] Tracking down rogue dashboard subscriptions
 
 On 10/12/16 11:29, Francis L Fabrizio wrote:
  Content of attribute #91: $VAR1 = {
 'ContentType' =  'storable',
 'Content' =  {
'Frequency' =  'never',
'Recipient' =  '',
'DashboardId' =  '70',
'Hour' =  '06:00',
'Dom' =  '1',
'Rows' =  '0',
'Fow' =  '1',
'Counter' =  24,
'Dow' =  'Monday'
  },
 'Description' =  'Subscription to dashboard 70',
 'Name' =  'Subscription',
 'ObjectId' =  '52',
 'ObjectType' =  'RT::User'
   };
 
 That looks correct, rt-email-dashboards should be skipping the
 subscription if the frequency is never. Hm. Can you produce the
 crontab entry for rt-email-dashboards? Perhaps it mistakenly has --all
 in its options, which always issues mail for dashboard subscriptions
 regardless of their frequency.
 
 Shawn


[rt-users] GnuPG no default secret key

2010-12-17 Thread Susan McClure

I am running 3.8.8 on RHEL5 and was trying to setup and use
gpg encryption and signing.  I hoped to allow some users, on some
queues, to encrypt and/or sign messages (specifically for RTIR queues)

After setting up a key for myself, and setting my key in my Preferences,
I could not create a ticket.

The error log shows:

[Fri Dec 17 19:12:58 2010] [error]: gpg: no default secret key: secret 
key not available
gpg: signing failed: secret key not available 
(/opt/opt.CORE/rt-3.8.8/rhel5/bin/../lib/RT/Crypt/GnuPG.pm:498)


So I moved aside the secring.gpg file, and dropped back to the old 
(empty) one but
I still receive the error.  In my preferences, it still shows my 
Cryptography-Preferred Key.


Any ideas on how to change my Cryptography preferences back to NO KEY ?

My RT_SiteConfig.pm relevant options are:


 GnuPG  from rt1 setup
Set( %GnuPG,
Enable = 1,
OutgoingMessagesFormat = 'RFC', # Inline
AllowEncryptDataInDB   = 0,

RejectOnMissingPrivateKey = 1,
RejectOnBadData   = 1,
);

Set(%GnuPGOptions,
homedir = '/usr/site/rt/var/data/gpg',

# URL of a keyserver
keyserver = 'hkp://pgp.x.edu',

# enables the automatic retrieving of keys when encrypting
'auto-key-locate' = 'keyserver',

# enables the automatic retrieving of keys when verifying signatures
'keyserver-options' = 'auto-key-retrieve',
);

Any info on setting up GnuPG and setting up keys for individual users 
would be

appreciated.

Thanks,
Susan McClure



[rt-users] Are privileged users able to customize RT at a Glance?

2010-12-17 Thread Sharon . Belliveau
We are running RT 3.8.7.  Are privileged users allowed to customize their
home page,  RT at a Glance?  Some thought they were able to with earlier
versions but are unable to know. The Preferences option is missing as well.
Have we disable some right(s)?  If so, how can we enable folks to customize
their home pages and preferences?

Sharon Belliveau



Re: [rt-users] Tracking down rogue dashboard subscriptions

2010-12-17 Thread Shawn M Moore

On 10/12/17 11:42, Francis L Fabrizio wrote:

To first answer Kevin's question, yep that's the only record that is returned 
when doing select * from Attributes where Name = 'Subscription';

The crontab entry is:

0 * * * * /usr/local/rt/sbin/rt-email-dashboards

Thanks,
Fran


Can you turn up your log level to debug and run 
/usr/local/rt/sbin/rt-email-dashboards with the --time argument needed 
to hit your 6am dashboard time? You can figure out the right argument 
with this script, replacing America/New_York with your time zone:


perl -MDateTime -e 'print DateTime-now(time_zone = 
America/New_York)-set_hour(6)-set_time_zone(UTC)-epoch'


Shawn


[rt-users] Sending Email to CustomField upon closure

2010-12-17 Thread Vikas Srivastava
Hi All ,

Could you please help me creating a custom scrip by which on a ticket
resolution it send a resolution notify  to an email address put in a
CustomeField say CustomFieldValues(10)  .

Something like ?

Mailto : my $To = $self-TicketObj-CustomFieldValues(10);

Thanks a lot .

Kind Regards
Vikas Srivastava


Re: [rt-users] Some RTIR automation?

2010-12-17 Thread Landon Stewart
Hello RT-Users,

To recap what I wrote about in this thread before was:
- An incident report comes in...
- If it has at least one IP address in the _RTIR_IP field do EITHER:
-- Link to an existing incident by IP address *OR*
-- Create a new incident

(The goal is to automatically group Incident Reports by IP address instead
of doing it manually.)

Ruslan wrote back saying:

 It's totally doable with scrips. RTIR itself has a lot of examples
 with bits you need. Basicly you need:

 When IR is created with and IP is set or when IP is changed from no
 value to a value, link to existing incident or create a new one. First
 part is a condition and second part is an action.

 For example lib/RT/Condition/RTIR_
 BlockActivation.pm is quite close.
 Checks whether ticket is created with active state or state is changed
 to active.

 Action is not that straightforward, but try it and if you have
 problems return back to us with detailed questions.



OK lets talk about the Condition first...

Is this enough to trigger the condition?
my $self = shift;
my $txn = $self-TransactionObj;
my $type = $txn-Type;
return 1 if $type eq 'Create'
   ($self-TicketObj-FirstCustomFieldValue('_RTIR_IP'));

The other thing is the action... I really don't know where to start on the
action.  I know its going to be lengthy though because there's some checks
has to do itself to decide what the exact course of action will be.

Here's what it should do, I think:
- foreach IP address in _RTIR_IP
-- Look for an Incident that contains that IP address
-- When it finds one, LINK to that Incident
-- If it does not find one, create a new Incident

There will probably need to be a list of exclusions somewhere.  For example
if someone does a lookup on a domain we host and sends a complaint about it
they might sent the domain name, the IP address it resolves to as well as
the IP address of our name server.  I wouldn't want every report that
contained the IP address our name server linked to a common Incident.

Also there's a what if here...  What if they report two IP addresses that
already each have an Incident created for them.  Would I merge them all
together into one Incident?

Any ideas on where to start writing the action and reviewing the condition
above would be appreciated.  On or off list is fine with me.

Thank you!

-- 
Landon Stewart lstew...@superb.net
SuperbHosting.Net by Superb Internet Corp.
Toll Free (US/Canada): 888-354-6128 x 4199
Direct: 206-438-5879
Web hosting and more Ahead of the Rest: http://www.superbhosting.net