[rt-users] REST-API crashes on history of long ticket with long format

2017-01-17 Thread Sinapius, Vinzenz
Hi everyone,

I have a ticket with a long history and many merges, but it shows fine under 
/rt/Ticket/History.html?id=$ID. RT also gives me its history without problems 
when I use the REST-API with the short format /rt/REST/1.0/ticket/$ID/history ->

RT/4.2.12 200 Ok

# 642/642 (/total)

[...]

But when I use the long format /rt/REST/1.0/ticket/$ID/history?format=l the CPU 
usage on my RT process spikes and becomes unresponsive. Which leads to 
supervisord restarting the process after a while.

Were on RT 4.2.12 and our stack is nginx -> nginx -> supervisord -> 
rt-server.fcgi -> postgresql

It looks like a bug in RT to me, or could it be some misconfiguration on my 
part?

Cheers,
Vinzenz
Vinzenz Sinapius
Information Technology | Informationstechnik

tracetronic GmbH
Stuttgarter Str. 3
01189 DRESDEN
GERMANY

Phone: +49 351 205768-167
Fax: +49 351 205768-999
E-mail: vinzenz.sinap...@tracetronic.de

Head Office | Hauptsitz: Stuttgarter Str. 3, 01189 DRESDEN, GERMANY
Managing Directors | Geschäftsführer: Dr.-Ing. Rocco Deutschmann, Dr.-Ing. 
Peter Strähle
Registration Court | Registergericht: Amtsgericht Dresden, HRB 23 086




Re: [rt-users] Greetings to recent adopters of RT and invitation for group study

2016-11-22 Thread Sinapius, Vinzenz
I recommend https://discordapp.com 

Vinzenz Sinapius 
Information Technology | Informationstechnik

tracetronic GmbH
Stuttgarter Str. 3
01189 DRESDEN
GERMANY 

Phone: +49 351 205768-167
Fax: +49 351 205768-999
E-mail: vinzenz.sinap...@tracetronic.de

Head Office | Hauptsitz: Stuttgarter Str. 3, 01189 DRESDEN, GERMANY 
Managing Directors | Geschäftsführer: Dr.-Ing. Rocco Deutschmann, Dr.-Ing. 
Peter Strähle 
Registration Court | Registergericht: Amtsgericht Dresden, HRB 23 086  

-Ursprüngliche Nachricht-
Von: rt-users [mailto:rt-users-boun...@lists.bestpractical.com] Im Auftrag von 
Alex Hall
Gesendet: Dienstag, 22. November 2016 14:38
An: Reza 
Cc: rt-users@lists.bestpractical.com
Betreff: Re: [rt-users] Greetings to recent adopters of RT and invitation for 
group study

I'm still pretty new to RT, so would like to join such a session. Thanks.

Sent from my iPhone

> On Nov 22, 2016, at 08:25, Reza  wrote:
> 
> Greetings new and recent adopters to RT!
> 
> I recently joined the community and though I have RT running in a production 
> environment, I have it running in the most basic of installations.
> 
> The best way I learn is through interaction of other newbies and advanced 
> users.
> 
> Unfortunately I do not have the time and resources to join an RT training 
> conference as much as I would love to in a heart beat.
> 
> Wondering how many here would be interested to learn / chat / video 
> conference online - as an international collective, for further knowledge 
> acquisition through group efforts.
> 
> If you are interested, please reply to this post and I will try to work on 
> getting a conference line free of charge, or perhaps have a group chat / talk 
> on Skype or other chat mediums.
> 
> Thanks in advance!
> Reza.
> 
> -
> RT 4.4 and RTIR training sessions, and a new workshop day! 
> https://bestpractical.com/training
> * Los Angeles - January 9-11 2017
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Los Angeles - January 9-11 2017
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Los Angeles - January 9-11 2017


Re: [rt-users] Owner not showing in search results?

2016-11-18 Thread Sinapius, Vinzenz
Hi Alex,

What is the Format-String of your search? (It’s under the advanced tab, when 
you edit the search)

The scrip looks fine.

Cheers,
Vinzenz
Vinzenz Sinapius
Information Technology | Informationstechnik

tracetronic GmbH
Stuttgarter Str. 3
01189 DRESDEN
GERMANY

Phone: +49 351 205768-167
Fax: +49 351 205768-999
E-mail: vinzenz.sinap...@tracetronic.de

Head Office | Hauptsitz: Stuttgarter Str. 3, 01189 DRESDEN, GERMANY
Managing Directors | Geschäftsführer: Dr.-Ing. Rocco Deutschmann, Dr.-Ing. 
Peter Strähle
Registration Court | Registergericht: Amtsgericht Dresden, HRB 23 086


Von: rt-users [mailto:rt-users-boun...@lists.bestpractical.com] Im Auftrag von 
Alex Hall
Gesendet: Freitag, 18. November 2016 14:29
An: rt-users 
Betreff: [rt-users] Owner not showing in search results?

Hi all,
We have an odd problem. I've put a script in place that sets the requestor of a 
ticket to be its owner, and that works perfectly when viewing a ticket--the 
owner is shown as the requestor. The problem is that search results show most 
tickets as being owned by nobody, but if you click a ticket, you see the owner 
has actually been set as expected. It's just search results that don't want to 
show the owner.

I found this script on the Wiki, and don't know enough about RT's internals to 
say if it does everything it should. Does anyone see any possible problems with 
it that would cause the issue with search results?


# get actor ID
my $Actor = $self->TransactionObj->Creator;
#if actor is RT_SystemUser then get out of here
return 1 if $Actor == $RT::SystemUser->id;
#prevents a ticket being assigned to an unprivileged user, comment out if you 
want this
return 1 unless $self->TransactionObj->CreatorObj->Privileged;
#get out unless ticket owner is nobody
return 1 unless $self->TicketObj->Owner == $RT::Nobody->id;
#try to change owner
$RT::Logger->info("Auto assign ticket #". $self->TicketObj->id ." to user #". 
$Actor );
my ($status, $msg) = $self->TicketObj->_Set(Field => 'Owner', Value => $Actor, 
RecordTransaction => 0);
unless( $status ) {
$RT::Logger->error( "Impossible to assign the ticket to $Actor: $msg" );
return undef;
}

return 1;

--
Alex Hall
Automatic Distributors, IT department
ah...@autodist.com
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Los Angeles - January 9-11 2017

Re: [rt-users] Making one-time CC permanent CC on ticket creation?

2016-11-10 Thread Sinapius, Vinzenz
Hi Alex,

You could use a scrip, something like: 
https://rt-wiki.bestpractical.com/wiki/AddWatchersOnCorrespond

Cheers,
Vinzenz
Vinzenz Sinapius
Information Technology | Informationstechnik

tracetronic GmbH
Stuttgarter Str. 3
01189 DRESDEN
GERMANY

Phone: +49 351 205768-167
Fax: +49 351 205768-999
E-mail: vinzenz.sinap...@tracetronic.de

Head Office | Hauptsitz: Stuttgarter Str. 3, 01189 DRESDEN, GERMANY
Managing Directors | Geschäftsführer: Dr.-Ing. Rocco Deutschmann, Dr.-Ing. 
Peter Strähle
Registration Court | Registergericht: Amtsgericht Dresden, HRB 23 086


Von: rt-users [mailto:rt-users-boun...@lists.bestpractical.com] Im Auftrag von 
Alex Hall
Gesendet: Donnerstag, 10. November 2016 23:29
An: rt-users 
Betreff: [rt-users] Making one-time CC permanent CC on ticket creation?

Hello list,
I really want to make one-time CC/admin CC people into permanent CCs. I've been 
all through share/html/Tickets/Create.html, since that's where the form for new 
tickets points, and I can't find where it actually makes the tickets. I thought 
all I'd have to do is adjust a few arguments and rewirte the text hints, but 
that isn't proving to be the case at all. Is there an easier way of doing what 
I want? Did I miss the obvious in Create.html? Thanks for any suggestions.

--
Alex Hall
Automatic Distributors, IT department
ah...@autodist.com
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Los Angeles - January 9-11 2017

Re: [rt-users] Change status to open when user respond to a ticket.

2016-09-26 Thread Sinapius, Vinzenz
Hi,

I solved this by creating a custom scrip. Take a look at 
https://rt-wiki.bestpractical.com/wiki/CustomConditionSnippets and 
https://rt-wiki.bestpractical.com/wiki/CustomActionSnippets

Cheers,
Vinzenz
Vinzenz Sinapius
Information Technology | Informationstechnik

tracetronic GmbH
Stuttgarter Str. 3
01189 DRESDEN
GERMANY

Phone: +49 351 205768-167
Fax: +49 351 205768-999
E-mail: vinzenz.sinap...@tracetronic.de

Head Office | Hauptsitz: Stuttgarter Str. 3, 01189 DRESDEN, GERMANY
Managing Directors | Geschäftsführer: Dr.-Ing. Rocco Deutschmann, Dr.-Ing. 
Peter Strähle
Registration Court | Registergericht: Amtsgericht Dresden, HRB 23 086


Von: rt-users [mailto:rt-users-boun...@lists.bestpractical.com] Im Auftrag von 
Piet Honkoop
Gesendet: Montag, 26. September 2016 15:32
An: Felix Defrance ; rt-users@lists.bestpractical.com
Betreff: Re: [rt-users] Change status to open when user respond to a ticket.


Hi,

I'm curious how to solve this one too :)

even a bit more specific: if the requestor mails, reset status (so not 
'anybody')

Best regards,

Piet

On 26-9-2016 14:46, Felix Defrance wrote:

Hi,

I need to change ticket status to open when anybody respond to a ticket by 
email or web UI and when the ticket is in a specific status.

This is a custom lifecycle, without stalled status, and which the stalled 
status is a custom named status.

So anybody known, how i could do the same "lifecycle" as stalled, but for 
another status ?

Thx,

--

Félix Defrance

PGP: 0x0F04DC57

--
Dit bericht is gescanned op virussen en andere gevaarlijke
inhoud door MailScanner en lijkt schoon te zijn.



-

RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training

* Boston - October 24-26

* Los Angeles - Q1 2017


--
Dit bericht is gescanned op virussen en andere gevaarlijke
inhoud door MailScanner en lijkt schoon te zijn.
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

Re: [rt-users] Changing logo, and viewing *all* tickets?

2016-09-15 Thread Sinapius, Vinzenz
Hi Alex,


1.   Take a look at http://your-rt.org/Admin/Tools/Theme.html

2.   I think you have to build him a dashboard with a custom search which 
shows all open tickets for all queues. Take a look at 
/Search/Build.html?NewQuery=1 and /Dashboards/Modify.html?Create=1

Cheers,
Vinzenz

Vinzenz Sinapius
Information Technology | Informationstechnik

tracetronic GmbH
Stuttgarter Str. 3
01189 DRESDEN
GERMANY

Phone: +49 351 205768-167
Fax: +49 351 205768-999
E-mail: vinzenz.sinap...@tracetronic.de

Head Office | Hauptsitz: Stuttgarter Str. 3, 01189 DRESDEN, GERMANY
Managing Directors | Geschäftsführer: Dr.-Ing. Rocco Deutschmann, Dr.-Ing. 
Peter Strähle
Registration Court | Registergericht: Amtsgericht Dresden, HRB 23 086


Von: rt-users [mailto:rt-users-boun...@lists.bestpractical.com] Im Auftrag von 
Alex Hall
Gesendet: Donnerstag, 15. September 2016 14:36
An: rt-users@lists.bestpractical.com
Betreff: [rt-users] Changing logo, and viewing *all* tickets?

Hello all,
A couple questions from my boss that I don't know how to answer: can I change 
the logo and link that appears at the top of all RT pages? He wants it to be 
our logo and the link to go to our homepage.

The other question is about viewing tickets. As the head of the company, he 
wants, quite understandably, to have a way of viewing all open tickets 
regardless of queue. I've given the admins group all the permissions I could 
find, and added him to that, so he should have whatever rights are needed to do 
this. Yet, neither of us can find a way to bring up such a view. Tickets in 
which he is involved, sure, but not *every* active ticket in RT. Is there an 
easy way, or will have I have to make a special group that is admin CC on all 
tickets? I'd rather not, since that would give him a ton of unwanted emails.

Thanks for any information on either one. Of the two, viewing all tickets is 
much more important.

Sent from my iPhone
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

Re: [rt-users] SSO (Single Sign-On) for RT

2016-05-19 Thread Sinapius, Vinzenz
Re: SSO with Windows/Domain-Login

You can use ntlm auth on your webserver and configure RT to user the Webserver 
Authentication 
https://docs.bestpractical.com/rt/4.2.12/authentication.html#WebRemoteUserAuth 
Chrome + IE support NTLM out of the box. Firefox needs some config: 
http://superuser.com/questions/664656/how-to-configure-firefox-for-ntlm-sso-single-sign-on

Ntlm with apache: http://modntlm.sourceforge.net/



Vinzenz Sinapius
Information Technology | Informationstechnik

tracetronic GmbH
Stuttgarter Str. 3
01189 DRESDEN
GERMANY

Phone: +49 351 205768-167
Fax: +49 351 205768-999
E-mail: vinzenz.sinap...@tracetronic.de

Head Office | Hauptsitz: Stuttgarter Str. 3, 01189 DRESDEN, GERMANY
Managing Directors | Geschäftsführer: Dr.-Ing. Rocco Deutschmann, Dr.-Ing. 
Peter Strähle
Registration Court | Registergericht: Amtsgericht Dresden, HRB 23 086


Von: rt-users [mailto:rt-users-boun...@lists.bestpractical.com] Im Auftrag von 
t s
Gesendet: Mittwoch, 18. Mai 2016 19:08
An: Lush, Aaron ; rt-users@lists.bestpractical.com
Betreff: Re: [rt-users] SSO (Single Sign-On) for RT


How about any other way to simulate SSO?  Our users simply don't want to log 
in...



Such as, how long does an Active Directory login last before a user has to log 
in again?  Is there a setting in RT_SiteConfig to extend that, maybe to forever?



Or, is there a way to detect the Windows username and pass that through without 
requiring login and authentication?



Thanks,

ts


From: rt-users  on behalf of t s 

Sent: Tuesday, May 17, 2016 1:18 PM
To: Lush, Aaron
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] SSO (Single Sign-On) for RT


4.2



--- Original Message ---



From: "Lush, Aaron" 

Sent: May 17, 2016 1:15 PM

To: "t s" 

Cc: rt-users@lists.bestpractical.com

Subject: Re: [rt-users] SSO (Single Sign-On) for RT


Which version of RT are you running?

Sincerely,

Aaron Lush
Network Administrator
South Central Community School Corporation
(219) 767-2266 ext. 

On Tue, May 17, 2016 at 12:06 PM, t s 
> wrote:

Anyone have any direction on how to set up SSO for RT for Windows Active 
Directory?



I am currently in the middle of following this set of directions from a 
SafeSquid app 
(https://www.safesquid.com/content-filtering/integrating-linux-host-windows-ad-kerberos-sso-authentication)
 that seems like it would mostly apply to set up the service principals, user 
accounts, etc.  This seems like the best set of directions I could find, unless 
anyone knows of any that are better?  Most sites seem to assume Kerberos is 
already set up and working with the appropriate permissions.
[Das Bild wurde vom Absender 
entfernt.]

Integrating a Linux Host with a Windows AD for Kerberos 
...
www.safesquid.com
Validate that IP of all our systems are resolvable by our DNS provider. Add the 
Linux host safesquid1 as a New Host in the DNS server's configuration such that 
it's ...




And I am using:



Set($WebExternalAuth , 1);
Set($WebFallbackToInternalAuth , undef);
Set($WebExternalGecos , undef);
Set($WebExternalAuto , undef);

with the ExternalAuth extension.



Also using nginx with mod_auth_kerb.



Thanks,

ts

-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


Email Confidentiality Notice: This email message, including all attachments, is 
for the sole use of the intended recipient(s) and contains confidential 
information. If you are not the intended recipient, you may not use, disclose, 
print, copy or disseminate this information. Please reply and notify the 
sender, delete the message and any attachments and destroy all copies.
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


Re: [rt-users] RT::Authen:ExternalAuth garbles our beautiful German umlauts

2016-05-12 Thread Sinapius, Vinzenz
Hi,

Found a better solution with the help of my colleagues.   We just had to add , 
raw => qr/(?i:^jpegPhoto|;binary)/ ] to net_ldap_args.

References:
* http://www.nntp.perl.org/group/perl.ldap/2006/08/msg2262.html
* http://search.cpan.org/~marschap/perl-ldap/lib/Net/LDAP.pod

Cheers,
Vinzenz
Vinzenz Sinapius
Information Technology | Informationstechnik

tracetronic GmbH
Stuttgarter Str. 3
01189 DRESDEN
GERMANY

Phone: +49 351 205768-167
Fax: +49 351 205768-999
E-mail: vinzenz.sinap...@tracetronic.de<mailto:vinzenz.sinap...@tracetronic.de>

Head Office | Hauptsitz: Stuttgarter Str. 3, 01189 DRESDEN, GERMANY
Managing Directors | Geschäftsführer: Dr.-Ing. Rocco Deutschmann, Dr.-Ing. 
Peter Strähle
Registration Court | Registergericht: Amtsgericht Dresden, HRB 23 086


Von: rt-users [mailto:rt-users-boun...@lists.bestpractical.com] Im Auftrag von 
Sinapius, Vinzenz
Gesendet: Mittwoch, 11. Mai 2016 15:48
An: rt-users@lists.bestpractical.com
Betreff: [rt-users] RT::Authen:ExternalAuth garbles our beautiful German umlauts

Hi,

Since migrating from MariaDB, CentOs 6 to PostgreSQL, Ubuntu 14.04 LTS 
RT::Authen:ExternalAuth garbles our beautiful German umlauts:

[24732] [Wed May 11 13:34:00 2016] [debug]: Calling UserExists with $username 
(horst) and $service (My_LDAP) 
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:465)
[...]
[24732] [Wed May 11 13:34:00 2016] [debug]: Found LDAP DN: CN=Testmäister\, 
Hörst,OU=SBSUsers,OU=Users,OU=MyBusiness,DC=tracetronic,DC=local 
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/LDAP.pm:221)
[...]
[24732] [Wed May 11 13:34:00 2016] [info]: 
RT::Authen::ExternalAuth::CanonicalizeUserInfo returning EmailAddress: , Name: 
horst, RealName: Testmäister, Hörst 
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:868)
[24732] [Wed May 11 13:34:00 2016] [debug]: UPDATED user horst: User horst: 
RealName changed from 'Testmäister, Hörst' to 'Testmäister, Hörst' 
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:665)

I found that when running the value from LDAP through an additional 
$value_from_ldap = decode('utf-8', $value_from_ldap), the value gets 
ungarbled...(see attached patch). Which is an okay workaround for us, but maybe 
you know of a better workaround? Unfortunately my perl foo is not good enough 
to found the root cause of this issue.

Cheers,
Vinzenz
Vinzenz Sinapius
Information Technology | Informationstechnik

tracetronic GmbH
Stuttgarter Str. 3
01189 DRESDEN
GERMANY

Phone: +49 351 205768-167
Fax: +49 351 205768-999
E-mail: vinzenz.sinap...@tracetronic.de<mailto:vinzenz.sinap...@tracetronic.de>

Head Office | Hauptsitz: Stuttgarter Str. 3, 01189 DRESDEN, GERMANY
Managing Directors | Geschäftsführer: Dr.-Ing. Rocco Deutschmann, Dr.-Ing. 
Peter Strähle
Registration Court | Registergericht: Amtsgericht Dresden, HRB 23 086


-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


[rt-users] RT::Authen:ExternalAuth garbles our beautiful German umlauts

2016-05-11 Thread Sinapius, Vinzenz
Hi,

Since migrating from MariaDB, CentOs 6 to PostgreSQL, Ubuntu 14.04 LTS 
RT::Authen:ExternalAuth garbles our beautiful German umlauts:

[24732] [Wed May 11 13:34:00 2016] [debug]: Calling UserExists with $username 
(horst) and $service (My_LDAP) 
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:465)
[...]
[24732] [Wed May 11 13:34:00 2016] [debug]: Found LDAP DN: CN=Testmäister\, 
Hörst,OU=SBSUsers,OU=Users,OU=MyBusiness,DC=tracetronic,DC=local 
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/LDAP.pm:221)
[...]
[24732] [Wed May 11 13:34:00 2016] [info]: 
RT::Authen::ExternalAuth::CanonicalizeUserInfo returning EmailAddress: , Name: 
horst, RealName: Testmäister, Hörst 
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:868)
[24732] [Wed May 11 13:34:00 2016] [debug]: UPDATED user horst: User horst: 
RealName changed from 'Testmäister, Hörst' to 'Testmäister, Hörst' 
(/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:665)

I found that when running the value from LDAP through an additional 
$value_from_ldap = decode('utf-8', $value_from_ldap), the value gets 
ungarbled...(see attached patch). Which is an okay workaround for us, but maybe 
you know of a better workaround? Unfortunately my perl foo is not good enough 
to found the root cause of this issue.

Cheers,
Vinzenz
Vinzenz Sinapius
Information Technology | Informationstechnik

tracetronic GmbH
Stuttgarter Str. 3
01189 DRESDEN
GERMANY

Phone: +49 351 205768-167
Fax: +49 351 205768-999
E-mail: vinzenz.sinap...@tracetronic.de

Head Office | Hauptsitz: Stuttgarter Str. 3, 01189 DRESDEN, GERMANY
Managing Directors | Geschäftsführer: Dr.-Ing. Rocco Deutschmann, Dr.-Ing. 
Peter Strähle
Registration Court | Registergericht: Amtsgericht Dresden, HRB 23 086


diff --git 
a/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/LDAP.pm 
b/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/LDAP.pm
index 912e8e6..6770221 100644
--- a/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/LDAP.pm
+++ b/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/LDAP.pm
@@ -3,6 +3,7 @@ package RT::Authen::ExternalAuth::LDAP;
 use Net::LDAP qw(LDAP_SUCCESS LDAP_PARTIAL_RESULTS);
 use Net::LDAP::Util qw(ldap_error_name escape_filter_value);
 use Net::LDAP::Filter;
+use Encode;
 
 use strict;
 
@@ -401,8 +402,18 @@ sub CanonicalizeUserInfo {
 if ($RT::LdapAttrMap and $RT::LdapAttrMap->{$key} eq 'dn') {
 $params{$key} = $entry->dn();
 } else {
-$params{$key} =
-  ($entry->get_value($config->{'attr_map'}->{$key}))[0];
+my $val = 
($entry->get_value($config->{'attr_map'}->{$key}))[0];
+# Sometimes Net::LDAP returns garbled data which can be 
ungarbled
+# by runnning it through decode.
+# This is an ugly fix, but it works for us...
+if (defined($val)) {
+my $val_decoded = decode('utf-8', $val);
+if($val ne $val_decoded) {
+$RT::Logger->warning("Whoops: " . $val . " vs " . 
$val_decoded);
+$val = $val_decoded;
+}
+}
+$params{$key} = $val;
 }
 }
 $found = 1;
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


Re: [rt-users] Change CF with HTTP

2016-04-13 Thread Sinapius, Vinzenz
Hi Bernhard,

Yes something like that is possible (see attached image). We needed to modify 
share/html/Elements/CollectionsAsTable/Row (By overwriting it via the 
local-Folder) to include the title or key of the shown value in the rendered 
html. (See attached)

With this modification, we can find the customfield-values in the 
search-results with a jQuery-Selector: var prio_tds = 
jQuery('td[data-fieldkey="__Priority__"]');

And then we can do many funny things to these html elements ;) like replacing 
it with a button and attaching an ajax-call to this button.

Cheers,
Vinzenz
Vinzenz Sinapius
Information Technology | Informationstechnik

tracetronic GmbH
Stuttgarter Str. 3
01189 DRESDEN
GERMANY

Phone: +49 351 205768-167
Fax: +49 351 205768-999
E-mail: vinzenz.sinap...@tracetronic.de<mailto:vinzenz.sinap...@tracetronic.de>

Head Office | Hauptsitz: Stuttgarter Str. 3, 01189 DRESDEN, GERMANY
Managing Directors | Geschäftsführer: Dr.-Ing. Rocco Deutschmann, Dr.-Ing. 
Peter Strähle
Registration Court | Registergericht: Amtsgericht Dresden, HRB 23 086


Von: Eierschmalz, Bernhard [mailto:bernhard.eierschm...@scheppach.com]
Gesendet: Mittwoch, 13. April 2016 11:54
An: Sinapius, Vinzenz <vinzenz.sinap...@tracetronic.de>
Cc: rt-users@lists.bestpractical.com
Betreff: AW: Change CF with HTTP

Hi Vinzenz,

thanks so far - I'm not sure if this will work for me.
So let me explain my whole problem, maybe you have a better solution to reach 
help me.

I have a fax-server wich sends faxes as mail into RT. So the mails are always 
with the same content and attached there is a PDF-file with the fax-document.
I have one custom field for my queue called "category"
Our staff need to sort the fax-tickets into different categories, using this 
custom field. (so this team only sorts the tickets - once the ticket is sorted 
into the category, it will appear in another team to work on the ticket)
In the moment, the "sorting staff" have to open one ticket after another, open 
the attached pdf-file, change the CF-value and go to the next ticket.
So the colleagues asked me for an easier way.


My idea was the following:
I create one search for all the unsorted faxes. As format I define like the 
following:
,...
On the column "CategoryA" there should be a link to change custom field of this 
ticket to cagetory A, same for the other categories.
The "high-end-solution" would be also to have directly a link to the attached 
PDF-file from the search - but I don't belive this is possible.


do you think this way will be working? Or do you have another solution for my 
problem?


Best regards
Bernhard

Von: Sinapius, Vinzenz [mailto:vinzenz.sinap...@tracetronic.de]
Gesendet: Mittwoch, 13. April 2016 09:52
An: Eierschmalz, Bernhard
Betreff: AW: Change CF with HTTP

Hi Bernhard,

AFAIK you currently can't update tickets with 
querystrings<https://en.wikipedia.org/wiki/Query_string>. For the REST-API you 
need to put key-value-pairs in the body of a POST 
Request<https://en.wikipedia.org/wiki/POST_(HTTP)>.

You can do this with javascript, here is a function I use in our Instance to 
update the priority of a ticket. You can use this to build something similar 
and attach it to a button or something similar.

function set_ticket_prio(priority, ticket_id){
url = 
"https://ticketserver/rt/REST/1.0/ticket/__id__/edit".replace('__id__', 
ticket_id);
data = 'content=Priority: __prio__'.replace('__prio__', 
priority);
jQuery.ajax({type:"POST", url:url, data:data, success: 
refresh_table});
}

Cheers,
Vinzenz
Vinzenz Sinapius
Information Technology | Informationstechnik

tracetronic GmbH
Stuttgarter Str. 3
01189 DRESDEN
GERMANY

Phone: +49 351 205768-167
Fax: +49 351 205768-999
E-mail: vinzenz.sinap...@tracetronic.de<mailto:vinzenz.sinap...@tracetronic.de>

Head Office | Hauptsitz: Stuttgarter Str. 3, 01189 DRESDEN, GERMANY
Managing Directors | Geschäftsführer: Dr.-Ing. Rocco Deutschmann, Dr.-Ing. 
Peter Strähle
Registration Court | Registergericht: Amtsgericht Dresden, HRB 23 086


Von: Eierschmalz, Bernhard [mailto:bernhard.eierschm...@scheppach.com]
Gesendet: Mittwoch, 13. April 2016 08:16
An: Sinapius, Vinzenz 
<vinzenz.sinap...@tracetronic.de<mailto:vinzenz.sinap...@tracetronic.de>>
Cc: rt-users@lists.bestpractical.com<mailto:rt-users@lists.bestpractical.com>
Betreff: AW: Change CF with HTTP

Hi Vinzenz,

Thanks, but I'm not sure how to do this.

I think I have a URL like this:
http:///REST/1.0/ticket//edit<http://%3cticketserver%3e/REST/1.0/ticket/%3cticketno%3e/edit>.

but how do I change a CF?

I already tried
http:///REST/1.0/ticket//edit?CF.{}:<CFvalue<http://%3cticketserver%3e/REST/1.0/ticket/%3cticketno%3e/edit?CF.%7b%3cCFname%3e%7d:%3cCFvalue>>

and
http:///REST/1.0/ticket//edit?CF.{}=<CFvalue<http://%3cticketserver%3e/REST/1.0/ticket/%

Re: [rt-users] Infinite E-Mail-Loop MS Exchange vs RT

2016-03-31 Thread Sinapius, Vinzenz
Hi Everyone,

I think I found the cause of my problem. We merged the user with the invalid 
e-mail-address into a privileged user and the default option for 
$RedistributeAutoGeneratedMessages is that it redistributes machine generated 
mails only to privileged users.

Cheers,
Vinzenz

Vinzenz Sinapius 
Information Technology | Informationstechnik

tracetronic GmbH
Stuttgarter Str. 3
01189 DRESDEN
GERMANY 

Phone: +49 351 205768-167
Fax: +49 351 205768-999
E-mail: vinzenz.sinap...@tracetronic.de

Head Office | Hauptsitz: Stuttgarter Str. 3, 01189 DRESDEN, GERMANY 
Managing Directors | Geschäftsführer: Dr.-Ing. Rocco Deutschmann, Dr.-Ing. 
Peter Strähle 
Registration Court | Registergericht: Amtsgericht Dresden, HRB 23 086  

-Ursprüngliche Nachricht-
Von: rt-users [mailto:rt-users-boun...@lists.bestpractical.com] Im Auftrag von 
Sinapius, Vinzenz
Gesendet: Dienstag, 23. Februar 2016 16:53
An: rt-users@lists.bestpractical.com
Betreff: Re: [rt-users] Infinite E-Mail-Loop MS Exchange vs RT

Hi,

Nobody experienced this error before? I'm using  RT 4.2.12.

Cheers,
Vinzenz

Vinzenz Sinapius
Information Technology | Informationstechnik

tracetronic GmbH
Stuttgarter Str. 3
01189 DRESDEN
GERMANY 

Phone: +49 351 205768-167
Fax: +49 351 205768-999
E-mail: vinzenz.sinap...@tracetronic.de

Head Office | Hauptsitz: Stuttgarter Str. 3, 01189 DRESDEN, GERMANY Managing 
Directors | Geschäftsführer: Dr.-Ing. Rocco Deutschmann, Dr.-Ing. Peter Strähle 
Registration Court | Registergericht: Amtsgericht Dresden, HRB 23 086


-Ursprüngliche Nachricht-
Von: rt-users [mailto:rt-users-boun...@lists.bestpractical.com] Im Auftrag von 
Sinapius, Vinzenz
Gesendet: Donnerstag, 18. Februar 2016 16:45
An: rt-users@lists.bestpractical.com
Betreff: [rt-users] Infinite E-Mail-Loop MS Exchange vs RT

Hi Everyone,

Is this behaviour a bug in RT or misconfiguration?

* Create a RT-User f...@example.com, f...@example.com doesn't exist in our 
Exchange-Server,
* Create a Ticket with f...@example.com as Cc
* Reply to this ticket
* Exchange replies that f...@example.com doesn't exist
* RT distributes this mail to all Ccs, etc. of the ticket, excluding 
f...@example.com 

-= (At this point we notice the User with the invalid e-mail-address and try to 
resolve this error) =-

* Merge RT-User f...@example.com into the RT-User b...@example.com, ( 
b...@example.com exists in our Exchange-Server. )
* Reply to this ticket
* Exchange replies that f...@example.com doesn't exist
* RT distributes this mail to all Ccs, etc. of the ticket, including 
f...@example.com
* Exchange replies that f...@example.com doesn't exist
* Repeat ad infinitum 

We broke this loop by taking RT offline, deleting all errormails from the mailq 
and setting the EmailAddress-Attribute of f...@example.com to b...@example.com 
in the database.

Cheers,
Vinzenz

Vinzenz Sinapius
Information Technology | Informationstechnik

tracetronic GmbH
Stuttgarter Str. 3
01189 DRESDEN
GERMANY 

Phone: +49 351 205768-167
Fax: +49 351 205768-999
E-mail: vinzenz.sinap...@tracetronic.de

Head Office | Hauptsitz: Stuttgarter Str. 3, 01189 DRESDEN, GERMANY Managing 
Directors | Geschäftsführer: Dr.-Ing. Rocco Deutschmann, Dr.-Ing. Peter Strähle 
Registration Court | Registergericht: Amtsgericht Dresden, HRB 23 086

-
RT 4.4 and RTIR Training Sessions 
(http://bestpractical.com/services/training.html)
* Hamburg Germany - March 14 & 15, 2016
* Washington DC - May 23 & 24, 2016
-
RT 4.4 and RTIR Training Sessions 
(http://bestpractical.com/services/training.html)
* Hamburg Germany - March 14 & 15, 2016
* Washington DC - May 23 & 24, 2016
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


[rt-users] Infinite E-Mail-Loop MS Exchange vs RT

2016-02-18 Thread Sinapius, Vinzenz
Hi Everyone,

Is this behaviour a bug in RT or misconfiguration?

* Create a RT-User f...@example.com, f...@example.com doesn't exist in our 
Exchange-Server, 
* Create a Ticket with f...@example.com as Cc
* Reply to this ticket
* Exchange replies that f...@example.com doesn't exist
* RT distributes this mail to all Ccs, etc. of the ticket, excluding 
f...@example.com 

-= (At this point we notice the User with the invalid e-mail-address and try to 
resolve this error) =-

* Merge RT-User f...@example.com into the RT-User b...@example.com, ( 
b...@example.com exists in our Exchange-Server. )
* Reply to this ticket
* Exchange replies that f...@example.com doesn't exist
* RT distributes this mail to all Ccs, etc. of the ticket, including 
f...@example.com 
* Exchange replies that f...@example.com doesn't exist
* Repeat ad infinitum 

We broke this loop by taking RT offline, deleting all errormails from the mailq 
and setting the EmailAddress-Attribute of f...@example.com to b...@example.com 
in the database.

Cheers,
Vinzenz

Vinzenz Sinapius 
Information Technology | Informationstechnik

tracetronic GmbH
Stuttgarter Str. 3
01189 DRESDEN
GERMANY 

Phone: +49 351 205768-167
Fax: +49 351 205768-999
E-mail: vinzenz.sinap...@tracetronic.de

Head Office | Hauptsitz: Stuttgarter Str. 3, 01189 DRESDEN, GERMANY 
Managing Directors | Geschäftsführer: Dr.-Ing. Rocco Deutschmann, Dr.-Ing. 
Peter Strähle 
Registration Court | Registergericht: Amtsgericht Dresden, HRB 23 086  

-
RT 4.4 and RTIR Training Sessions 
(http://bestpractical.com/services/training.html)
* Hamburg Germany - March 14 & 15, 2016
* Washington DC - May 23 & 24, 2016


[rt-users] Encoding Issue after Migration

2015-03-29 Thread Sinapius, Vinzenz
Hi,

I used this guide: 
http://requesttracker.wikia.com/wiki/MigrateMysql2PostgresqlV4 to migrate from 
Centos/Mysql (MariaDB) to Ubuntu/PostgreSQL. But now all non-ascii-characters 
are garbled. For example:
Prüfen - Prüfen
Würden - würden

Are there ways to correct this in the source or destination server?

Thanks,
Vinzenz