[rt-users] Asset tracker - REST api

2013-09-23 Thread Alexander Kucheryuk

Hi!

I have a question regarding extension asset tracker.
How does it store the items ?
Is it the same way as regular tickets ?

The reason I am asking is because we have a number of domains that we 
need to keep track of expiring. My idea was to put domains with expiry 
date into RT with AT extension and write a small php cron (that will 
communicate with RT via REST API) to send email reminders to certain RT 
groups (eg. admins).


--
RT Training in New York, October 8th and 9th: http://bestpractical.com/training


[rt-users] Approvals on Assets Tracker?

2013-09-23 Thread Matthias Plotkowski

Hello,

i am trying to make approvals work on Assets in the Asset Tracker module on a 4.0.10 RT.

 

Approvals are working for a normal Ticket queue, but not for an asset type in AT.

I think its because the template is not loaded by the scrip. 

 

I dont have the conditions to choose from on AT like in RT.

Im missing the "On Create" condition and the "Create Tickets" action on the scrip-create in AT.

 

Any idea how i can make this work and create an approval in ___Approvals when an asset is created?

 

Thank you!!

Malic 


-- 
RT Training in New York, October 8th and 9th: http://bestpractical.com/training

Re: [rt-users] rt-dump-metadata selecting nonextistent column

2013-09-23 Thread Len Jaffe
I swear I searched before I posted.

Given that I'm getting a XML file back from rt-d-m, what's your opinion of
it's trustworthyness?

Is there an ETA on an update or a patch?

Thank you,
Len.


On Fri, Sep 20, 2013 at 8:24 PM, Kevin Falcone wrote:

> On Fri, Sep 20, 2013 at 08:12:21PM -0400, Len Jaffe wrote:
> >Per the excellent advice I received at Ohio LinuxFest, I tried to run
> rt-dump-metadata, but
> >received the following error message:
> >[Sat Sep 21 00:04:11 2013] [warning]: DBD::Oracle::db prepare failed:
> ORA-00904: "PRIVATEKEY":
> >invalid identifier (DBD ERROR: error possibly near <*> indicator at
> char 7 in 'SELECT
> ><*>privatekey FROM Users WHERE id = :p1') [for Statement "SELECT
> privatekey FROM Users WHERE
> >id = ?"] at
> >
>  
> /webdata/perl5/perlbrew/perls/perl-5.18.0/lib/site_perl/5.18.0/DBIx/SearchBuilder/Handle.pm
> >line 549.
> >I checked, and my Users table does not have a privatekey column.
> >This installation started with 4.0.15, and I've since installed 4.016
> and 4.0.17 over the top,
> >but I don't recall being instructed to upgrade the database with
> either point release.
> >Did I miss a memo?
>
> http://issues.bestpractical.com/Ticket/Display.html?id=22465
>
> -kevin
>
>
> --
> RT Training in New York, October 8th and 9th:
> http://bestpractical.com/training
>



-- 
lenja...@jaffesystems.com   614-404-4214@lenjaffe
Software Engineer, Founder Volunteerable ,
Host of Columbus Code Jam 
www.lenjaffe.com http://www.theycomewithcheese.com
Perl Advent Planet  - Advent
Calendars: Perlish and otherwise.

-- 
RT Training in New York, October 8th and 9th: http://bestpractical.com/training

Re: [rt-users] Custom Field as a column in search results?

2013-09-23 Thread Kevin Falcone
On Mon, Sep 23, 2013 at 12:18:12AM -0400, Bill McGonigle wrote:
> On 09/05/2013 10:16 AM, Kevin Falcone wrote:
> > As a superuser -
> > 
> > Click on Edit, click on Edit this Saved Search, click on Advanced, add
> > __CustomField.{Impact to user}__ to the search, update the search.
> > 
> > If you were building a Queue specific search, you'd be able to do it
> > from the normal Format builder at the bottom of the Query builder.
> 
> I'm trying to get this working on 4.0.8 (it was working for us on
> 3.6.7).  What I'm seeing is that the search works fine when defined, but
> it's not 'sticking' to be the default search as it was before.
> 
> Here's the step-by-step - I'm hoping somebody can point out my error:
> 
> 1) log in as root
> 2) click the queue in the 'Quick search' box

I'm not sure why this would have worked on 3.8, because the code is
the same.  The Quick Search widget does not have it's own Format
saved.  It uses $DefaultSearchResultFormat set in your
RT_SiteConfig.pm

http://bestpractical.com/docs/rt/latest/RT_Config.html#DefaultSearchResultFormat

The instructions I gave were for editing *searches* on the home page,
not the quick search.

-kevin

> 3) click 'Edit Search'
> 4) in 'Display Columns', choose the field, and move it right with the
> arrow button.  Adjust position as required.
> 4a) tuned it in 'Advanced' for layout (definition included below)
> 5) click 'Update Format and Search' (looks perfect)
> 6) verify the custom field is still there by clicking among [Edit,
> Advanced, Show Results] - looks great
> 7) return to 'Home'
> 8) click queue again.  <<=== Custom Field Gone ===>>


pgpIdOwQJng9z.pgp
Description: PGP signature

-- 
RT Training in New York, October 8th and 9th: http://bestpractical.com/training

Re: [rt-users] Asset tracker - REST api

2013-09-23 Thread Kevin Falcone
On Mon, Sep 23, 2013 at 12:42:01PM +0300, Alexander Kucheryuk wrote:
> The reason I am asking is because we have a number of domains that
> we need to keep track of expiring. My idea was to put domains with
> expiry date into RT with AT extension and write a small php cron
> (that will communicate with RT via REST API) to send email reminders
> to certain RT groups (eg. admins).

It might be easier to just make repeating tickets.
https://metacpan.org/module/RT::Extension::RepeatTicket

-kevin


pgpdRyGtnKh56.pgp
Description: PGP signature

-- 
RT Training in New York, October 8th and 9th: http://bestpractical.com/training

Re: [rt-users] Problem with groups and "Couldn't load the specified principal"

2013-09-23 Thread Kevin Falcone
On Sat, Sep 21, 2013 at 04:35:07PM -0700, Jaye Mathisen wrote:
>If I go to "Modify global group rights", and type in a new group name down 
> in the add group
>box, I get:
> 
>  * Couldn't load the specified principal
> 
>If I got to tools and try to create a user-defined group,  call it "TEMP", 
> I get "Group
>created", and i can add a member to it, which succeeds, but I can't see 
> them in group rights,
>or do anything useful.

What happens when you go back to Modify global group rights and type
in TEMP now?  In 3.8 we used to list every group in the system on that
page, but that was horrible if you had a lot of groups.  The group
rights autocompleter doesn't make new groups for you, it just provides
a better way to select one of thousands of possible groups.

-kevin


pgpMtYZQDg6cN.pgp
Description: PGP signature

-- 
RT Training in New York, October 8th and 9th: http://bestpractical.com/training

Re: [rt-users] Problem with groups and "Couldn't load the specified principal"

2013-09-23 Thread Jaye Mathisen
I see the problem.  You type in a group and then have to assign rights 
to it at the time.  It doesn't appear to work to just create a group, 
then assign rights.


It's working fine once I type in a group name, and then click any of the 
checkboxes then hit save.


My apologies for my confusion.

4.0.17 is working great.  Might bite the bullet and jump to 4.2 before 
we get too far into this.


Thanks for your help.

On 9/23/2013 8:32 AM, Kevin Falcone wrote:

On Sat, Sep 21, 2013 at 04:35:07PM -0700, Jaye Mathisen wrote:

If I go to "Modify global group rights", and type in a new group name down 
in the add group
box, I get:

  * Couldn't load the specified principal

If I got to tools and try to create a user-defined group,  call it "TEMP", I get 
"Group
created", and i can add a member to it, which succeeds, but I can't see 
them in group rights,
or do anything useful.

What happens when you go back to Modify global group rights and type
in TEMP now?  In 3.8 we used to list every group in the system on that
page, but that was horrible if you had a lot of groups.  The group
rights autocompleter doesn't make new groups for you, it just provides
a better way to select one of thousands of possible groups.

-kevin




--
Jaye Mathisen, Lil Pantry
P:541-476-0152
F:541-476-0152

<>
-- 
RT Training in New York, October 8th and 9th: http://bestpractical.com/training

Re: [rt-users] Change Queue Name Not Persisting

2013-09-23 Thread Jason Ledford
Sorry, version v4.  It must have been cached somewhere as it has corrected 
itself.

-Original Message-
From: rt-users-boun...@lists.bestpractical.com 
[mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of Kevin Falcone
Sent: Friday, September 20, 2013 1:50 PM
To: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Change Queue Name Not Persisting

On Fri, Sep 20, 2013 at 10:26:38AM -0400, Jason Ledford wrote:
>I have changed the queue name in an RT install and everything seems fine 
> except any dropdowns,
>like new ticket it or quick ticket all still have the old name.  I have 
> rebooted and cleared
>mason cache.  Any thoughts?  I have shredded all data at this point so not 
> concerned if data
>is interrupted.

You don't say, but I assume you're running 3.8 and didn't log out and back in.  
This was addressed in 4.0.

-kevin

-- 
RT Training in New York, October 8th and 9th: http://bestpractical.com/training


Re: [rt-users] Problem with groups and "Couldn't load the specified principal"

2013-09-23 Thread Kevin Falcone
On Mon, Sep 23, 2013 at 09:31:03AM -0700, Jaye Mathisen wrote:
> I see the problem.  You type in a group and then have to assign
> rights to it at the time.  It doesn't appear to work to just create
> a group, then assign rights.

Ah - yes, you type a name, select it from the autocompleter, assign
the rights you want changed (you'll also see the title changes) and
*then* save.

-kevin


pgpdfV0Tf33Ur.pgp
Description: PGP signature

-- 
RT Training in New York, October 8th and 9th: http://bestpractical.com/training

Re: [rt-users] Big problem with encoding subject

2013-09-23 Thread Albert Shih
 Le 20/09/2013 à 23:01:56+0200, Albert Shih a écrit
>  Le 20/09/2013 à 08:58:35+0400, Ruslan Zakirov a écrit
> Hi, 
> 
> > 
> > You didn't say how to reproduce the problem. Should it be email? Should it 
> > be
> > UI?
> 
> Only from email.
> 
> When I send a email with some utf-8 character inside the subject the
> problem appear.
> 
> I try to track the problem, so I installe a new server (FreeBSD), dump the
> all mysql base and rt config, put inside the new server and the problem
> still here.
> 
> I disable all plugin and enable debug mode in RT : 
> 
> Here the log I find (It's really at the beginning : )
> 
> Sep 20 20:53:37 support-new RT: Converting 'iso-8859-1' to 'utf-8' for 
> text/plain - Essai é, è, ã
> Sep 20 20:53:37 support-new RT: Mail from user #22 (albert.s...@obspm.fr)
> Sep 20 20:53:37 support-new RT: About to think about scrips for transaction 
> #203642
> Sep 20 20:53:37 support-new RT: About to think about scrips for transaction 
> #203643
> Sep 20 20:53:37 support-new RT: About to think about scrips for transaction 
> #203644
> Sep 20 20:53:37 support-new RT: About to think about scrips for transaction 
> #203645
> Sep 20 20:53:37 support-new RT: About to think about scrips for transaction 
> #203646
> Sep 20 20:53:37 support-new RT: About to prepare scrips for transaction 
> #203646
> Sep 20 20:53:37 support-new RT: Found 3 scrips for TransactionCreate stage 
> with applicable type(s) Create for txn #203646 on ticket #10767
> Sep 20 20:53:37 support-new RT: Converting 'utf-8' to 'utf-8' for text/plain 
> - =?UTF-8?B?W0luZm8gT2JzcG0gIzEwNzY3XSBFc3NhaSDvv70sIO+/vSwg77+9?=
> Sep 20 20:53:37 support-new RT: Converting 'utf-8' to 'utf-8' for text/plain 
> - =?UTF-8?B?W0luZm8gT2JzcG0gIzEwNzY3XSBFc3NhaSDvv70sIO+/vSwg77+9?=
> 
> 
> at this point something is wrong because 
> 
> echo "W0luZm8gT2JzcG0gIzEwNzY3XSBFc3NhaSDvv70sIO+/vSwg77+9" |base64 -d
> 
> [Info Obspm #10767] Essai �, �, �
> 
> and missing a "\n" at the end
> 
> It should be something like : 
> 
> echo "[Info Obspm #10767] Essai é, è, ã" |base64
> 
> W0luZm8gT2JzcG0gIzEwNzY3XSBFc3NhaSDDqSwgw6gsIMOjCg==
> 
> More stranger, if now I close the ticket from the web UI the mail RT send
> to me is correct. 
> 

Any help ? 

I'm totally stuck with this problem. The point is not only because I lost
some UTF-8 character, but because with some UTF-8 in the subject some scrip
don't work, the mail isn't send by RT to the requestor (for example). 

Today I install from empty disk (on vmware) a fresh FreeBSD 9.2-RC4, I
don't use anything from the old config, I init a empty database
(rt-setup-database --action=init). And I still get the problem. 

So the problem don't come from error in the configuration. 

I remark, with fresh install the « autoreply » scrip (who have in the
script «Subject : etc..» is working perfectly, but since the « subject » is
not inside the scrip it's stop working, the encoding is wrong. 

Any help would very very welcome. 

For example : where the subject is encoded inside RT and with which perl 
package ? 

Regards.

JAS

-- 
Albert SHIH
DIO bâtiment 15
Observatoire de Paris
5 Place Jules Janssen
92195 Meudon Cedex
France
Téléphone : +33 1 45 07 76 26/+33 6 86 69 95 71
xmpp: j...@obspm.fr
Heure local/Local time:
lun 23 sep 2013 22:25:09 CEST

-- 
RT Training in New York, October 8th and 9th: http://bestpractical.com/training

Re: [rt-users] rt-dump-metadata selecting nonextistent column

2013-09-23 Thread Len Jaffe
It looks like it dumped enough data for me to bootstrap my new instance.
I'm pretty pleased.

Len.


On Mon, Sep 23, 2013 at 9:41 AM, Len Jaffe wrote:

> I swear I searched before I posted.
>
> Given that I'm getting a XML file back from rt-d-m, what's your opinion of
> it's trustworthyness?
>
> Is there an ETA on an update or a patch?
>
> Thank you,
> Len.
>
>
> On Fri, Sep 20, 2013 at 8:24 PM, Kevin Falcone 
> wrote:
>
>> On Fri, Sep 20, 2013 at 08:12:21PM -0400, Len Jaffe wrote:
>> >Per the excellent advice I received at Ohio LinuxFest, I tried to
>> run rt-dump-metadata, but
>> >received the following error message:
>> >[Sat Sep 21 00:04:11 2013] [warning]: DBD::Oracle::db prepare
>> failed: ORA-00904: "PRIVATEKEY":
>> >invalid identifier (DBD ERROR: error possibly near <*> indicator at
>> char 7 in 'SELECT
>> ><*>privatekey FROM Users WHERE id = :p1') [for Statement "SELECT
>> privatekey FROM Users WHERE
>> >id = ?"] at
>> >
>>  
>> /webdata/perl5/perlbrew/perls/perl-5.18.0/lib/site_perl/5.18.0/DBIx/SearchBuilder/Handle.pm
>> >line 549.
>> >I checked, and my Users table does not have a privatekey column.
>> >This installation started with 4.0.15, and I've since installed
>> 4.016 and 4.0.17 over the top,
>> >but I don't recall being instructed to upgrade the database with
>> either point release.
>> >Did I miss a memo?
>>
>> http://issues.bestpractical.com/Ticket/Display.html?id=22465
>>
>> -kevin
>>
>>
>> --
>> RT Training in New York, October 8th and 9th:
>> http://bestpractical.com/training
>>
>
>
>
> --
> lenja...@jaffesystems.com   614-404-4214@lenjaffe
> Software Engineer, Founder Volunteerable ,
> Host of Columbus Code Jam 
>  www.lenjaffe.com http://www.theycomewithcheese.com
> Perl Advent Planet  - Advent
> Calendars: Perlish and otherwise.
>
>


-- 
lenja...@jaffesystems.com   614-404-4214@lenjaffe
Software Engineer, Founder Volunteerable ,
Host of Columbus Code Jam 
www.lenjaffe.com http://www.theycomewithcheese.com
Perl Advent Planet  - Advent
Calendars: Perlish and otherwise.

-- 
RT Training in New York, October 8th and 9th: http://bestpractical.com/training

Re: [rt-users] Big problem with encoding subject

2013-09-23 Thread Albert Shih
 Le 23/09/2013 à 22:30:21+0200, Albert Shih a écrit
> > 
> 
> Any help ? 
> 
> I'm totally stuck with this problem. The point is not only because I lost
> some UTF-8 character, but because with some UTF-8 in the subject some scrip
> don't work, the mail isn't send by RT to the requestor (for example). 
> 
> Today I install from empty disk (on vmware) a fresh FreeBSD 9.2-RC4, I
> don't use anything from the old config, I init a empty database
> (rt-setup-database --action=init). And I still get the problem. 
> 
> So the problem don't come from error in the configuration. 
> 
> I remark, with fresh install the « autoreply » scrip (who have in the
> script «Subject : etc..» is working perfectly, but since the « subject » is
> not inside the scrip it's stop working, the encoding is wrong. 
> 
> Any help would very very welcome. 
> 
> For example : where the subject is encoded inside RT and with which perl 
> package ? 
> 

I try to find where the subject is encoded and find this thing little
strange.

I put some RT:Logger inside

Action/SendEmail.pm

in 

sub SetHeaderAsEncoding {
my $self = shift;
my ( $field, $enc ) = ( shift, shift );
 
my $head = $self->TemplateObj->MIMEObj->head;

if ( lc($field) eq 'from' and RT->Config->Get('SMTPFrom') ) {   
$head->replace( $field, RT->Config->Get('SMTPFrom') ); 
return;
}

my $value = $head->get( $field );
$RT::Logger->debug( "In Action/Sendmail.pm '$field' and '$value' before ") ;

$value = $self->MIMEEncodeString( $value, $enc );
$head->replace( $field, $value );

$RT::Logger->debug( "In Action/Sendmail.pm '$value' just after ") ;

}

and the thing is in the log I find


Sep 23 23:05:49 support-9 RT: In Action/Sendmail.pm 'Subject' and '[Support #5] 
AutoReply: Essai, \xc3\xa9, \xc3\xa0, \xc3\xa3 ' before
Sep 23 23:05:49 support-9 RT: In Action/Sendmail.pm 
'=?UTF-8?B?W1N1cHBvcnQgIzVdIEF1dG9SZXBseTogRXNzYWksIMOpLCDDoCwgw6M=?=' just 
after
Sep 23 23:05:49 support-9 RT: Converting 'utf-8' to 'utf-8' for text/plain - 
=?UTF-8?B?W1N1cHBvcnQgIzVdIEF1dG9SZXBseTogRXNzYWksIMOpLCDDoCwgw6M=?=
Sep 23 23:05:49 support-9 RT: In Action/Sendmail.pm 'Subject' and '[Support #5] 
Essai, \xef\xbf\xbd, \xef\xbf\xbd, \xef\xbf\xbd ' before
Sep 23 23:05:49 support-9 RT: In Action/Sendmail.pm 
'=?UTF-8?B?W1N1cHBvcnQgIzVdIEVzc2FpLCDvv70sIO+/vSwg77+9?=' just after
Sep 23 23:05:49 support-9 RT: Converting 'utf-8' to 'utf-8' for text/plain - 
=?UTF-8?B?W1N1cHBvcnQgIzVdIEVzc2FpLCDvv70sIO+/vSwg77+9?=

the first couple of encoding is correct, but why (normal ? ) RT try to
encode a second time, anyway the second time is wrong. 

So or the problem come from RT with two encoding, or he come from some perl
package.

Regards.

JAS

-- 
Albert SHIH
DIO bâtiment 15
Observatoire de Paris
5 Place Jules Janssen
92195 Meudon Cedex
France
Téléphone : +33 1 45 07 76 26/+33 6 86 69 95 71
xmpp: j...@obspm.fr
Heure local/Local time:
lun 23 sep 2013 23:02:21 CEST

-- 
RT Training in New York, October 8th and 9th: http://bestpractical.com/training


Re: [rt-users] Big problem with encoding subject

2013-09-23 Thread Albert Shih
 Le 23/09/2013 à 23:09:26+0200, Albert Shih a écrit
> }
> 
> and the thing is in the log I find
> 
> 
> Sep 23 23:05:49 support-9 RT: In Action/Sendmail.pm 'Subject' and '[Support 
> #5] AutoReply: Essai, \xc3\xa9, \xc3\xa0, \xc3\xa3 ' before
> Sep 23 23:05:49 support-9 RT: In Action/Sendmail.pm 
> '=?UTF-8?B?W1N1cHBvcnQgIzVdIEF1dG9SZXBseTogRXNzYWksIMOpLCDDoCwgw6M=?=' just 
> after
> Sep 23 23:05:49 support-9 RT: Converting 'utf-8' to 'utf-8' for text/plain - 
> =?UTF-8?B?W1N1cHBvcnQgIzVdIEF1dG9SZXBseTogRXNzYWksIMOpLCDDoCwgw6M=?=
> Sep 23 23:05:49 support-9 RT: In Action/Sendmail.pm 'Subject' and '[Support 
> #5] Essai, \xef\xbf\xbd, \xef\xbf\xbd, \xef\xbf\xbd ' before
> Sep 23 23:05:49 support-9 RT: In Action/Sendmail.pm 
> '=?UTF-8?B?W1N1cHBvcnQgIzVdIEVzc2FpLCDvv70sIO+/vSwg77+9?=' just after
> Sep 23 23:05:49 support-9 RT: Converting 'utf-8' to 'utf-8' for text/plain - 
> =?UTF-8?B?W1N1cHBvcnQgIzVdIEVzc2FpLCDvv70sIO+/vSwg77+9?=
> 
> the first couple of encoding is correct, but why (normal ? ) RT try to
> encode a second time, anyway the second time is wrong. 
> 
> So or the problem come from RT with two encoding, or he come from some perl
> package.
> 

YESSSI find the problem.

The problem come with the new version of

p5-Encode-2.55

with the old version p5-Encode-2.49 it's working again. 

I don't known where is the real problem, but between p5-Encode-2.55 and RT
they are some incompability. 

Regards.

JAS
-- 
Albert SHIH
DIO bâtiment 15
Observatoire de Paris
5 Place Jules Janssen
92195 Meudon Cedex
France
Téléphone : +33 1 45 07 76 26/+33 6 86 69 95 71
xmpp: j...@obspm.fr
Heure local/Local time:
lun 23 sep 2013 23:23:26 CEST

-- 
RT Training in New York, October 8th and 9th: http://bestpractical.com/training