[rt-users] auto-generated random pronounceable password

2016-01-26 Thread wajdi
Here the code of the template "Autoreply"

 

Subject: AutoReply: {$Ticket->Subject}

 

 

 Greetings,

 

 This message has been automatically generated in response to the

 creation of a helpdesk call:

 

 "{$Ticket->Subject()}",

 

 a summary of which appears below.

 

 There is no need to reply to this message right now. Your ticket has been

  assigned an ID of [{$rtname} #{$Ticket->id()}]. Please include this string

 in the subject line of all future correspondence about this issue.

 

 {

 *RT::User::GenerateRandomNextChar = \::User::_GenerateRandomNextChar;

 

 

 if (($Transaction->CreatorObj->id != $RT::Nobody->id) &&

 (!$Transaction->CreatorObj->Privileged) &&

 ($Transaction->CreatorObj->__Value('Password') eq '*NO-PASSWORD*')

 ) {

 

 

 

 my $user = RT::User->new($RT::SystemUser);

 $user->Load($Transaction->CreatorObj->Id);

 my ($stat, $pass) = $user->SetRandomPassword();

 

 

 

 if (!$stat) {

 $OUT .=

 

 "An internal error has occurred. RT was not able to set a password for you.

 Please contact your local RT administrator for assistance.";

 

 

 }

 

 

 $OUT .= "

 You can check the current status and history of your requests at:

 

 

 ".$RT::WebURL."

 

 

 When prompted, enter the following username and password:

 

 

 Username: ".$user->Name."

 Password: ".$pass."

 

 ";

 }

 }

 

 

 Thank you.

 {$Ticket->QueueObj->CorrespondAddress()}

 

 

 -

 {$Transaction->Content()}

 

 

 

When I copied and pasted this exactly as-is to my default "Autoreply"
template, it put the content in the Subject line. Why ? I don't understand 

Please help me it's very important to use the SelfService wed interface.



Re: [rt-users] sort tickets in queue by email (Dumitru Catalin

2016-01-26 Thread Dumitru Catalin
Thank you but i solved the problem, the call to rt-mailgate was not correct.

În lun., 25 ian. 2016 la 20:13, Ram  a scris:

> Show the calls to rt-mailgate from your configuration file(s).
>
>
>
> On Sat, Jan 23, 2016 at 11:51 PM, Dumitru Catalin 
> wrote:
>
>> Yes, i use rt-mailgate and postfix, and i set the corresponding alias in
>> /etc/aliases
>>
>> În sâm., 23 ian. 2016 la 21:08, Ram  a scris:
>>
>>> From: Dumitru Catalin 
 To: "rt-users@lists.bestpractical.com"
 
 Subject: [rt-users] sort tickets in queue by email
 Message-ID:
 <
 camqs9gh3re5incnsqps9j9cu8h-ns-6kw4m_+5c-rtrvzwh...@mail.gmail.com>
 Content-Type: text/plain; charset="utf-8"

 Hello,


 I set replay address and comment address for a queue. All tickets sent
 to
 this address I want to be inserted in that queue, but the system try to
 create the ticket in General queue.

 I need some advice, how can I sort the ticket in queue by address
 specified
 for that queue.


>>> If you are using rt-mailgate make sure for those email addresses to
>>> specify the right queue name with "--queue queuename"
>>>
>>
>


Re: [rt-users] auto-generated random pronounceable password

2016-01-26 Thread Matt Zagrabelny
On Tue, Jan 26, 2016 at 4:18 AM, wajdi  wrote:
> Here the code of the template “Autoreply”
>
>
>
> Subject: AutoReply: {$Ticket->Subject}
>
>
>
>
>
>  Greetings,
>
>
>
>  This message has been automatically generated in response to the
>
>  creation of a helpdesk call:
>
>
>
>  "{$Ticket->Subject()}",
>
>
>
>  a summary of which appears below.
>
>
>
>  There is no need to reply to this message right now. Your ticket has been
>
>   assigned an ID of [{$rtname} #{$Ticket->id()}]. Please include this string
>
>  in the subject line of all future correspondence about this issue.
>
>
>
>  {
>
>  *RT::User::GenerateRandomNextChar = \::User::_GenerateRandomNextChar;
>
>
>
>
>
>  if (($Transaction->CreatorObj->id != $RT::Nobody->id) &&
>
>  (!$Transaction->CreatorObj->Privileged) &&
>
>  ($Transaction->CreatorObj->__Value('Password') eq '*NO-PASSWORD*')
>
>  ) {
>
>
>
>
>
>
>
>  my $user = RT::User->new($RT::SystemUser);
>
>  $user->Load($Transaction->CreatorObj->Id);
>
>  my ($stat, $pass) = $user->SetRandomPassword();
>
>
>
>
>
>
>
>  if (!$stat) {
>
>  $OUT .=
>
>
>
>  "An internal error has occurred. RT was not able to set a password for you.
>
>  Please contact your local RT administrator for assistance.";
>
>
>
>
>
>  }
>
>
>
>
>
>  $OUT .= "
>
>  You can check the current status and history of your requests at:
>
>
>
>
>
>  ".$RT::WebURL."
>
>
>
>
>
>  When prompted, enter the following username and password:
>
>
>
>
>
>  Username: ".$user->Name."
>
>  Password: ".$pass."
>
>
>
>  ";
>
>  }
>
>  }
>
>
>
>
>
>  Thank you.
>
>  {$Ticket->QueueObj->CorrespondAddress()}
>
>
>
>
>
>  -
>
>  {$Transaction->Content()}
>
>
>
>
>
>
>
> When I copied and pasted this exactly as-is to my default "Autoreply"
> template, it put the content in the Subject line. Why ? I don’t understand

Does it have anything to do with the leading space of the first line of content?

-m


[rt-users] Display time worked in search results in hours only

2016-01-26 Thread Keith Creasy
Hi. I'm going to try this but so far I've gotten little or no response to 
anything I've asked.


It appears that if you put the "Time Left" field in a search result it tries to 
convert to days, which in our case is just confusing as we are tracking actual 
work hours and not calendar time. Is there a way to change this so that it 
always uses minutes or, even better, hours? It would be nice if Estimated Time 
and Time Worked were also in hours as that is the default we have set when 
editing the values using the web interface.


Thanks for any help or at least good information.

Keith




Re: [rt-users] Display time worked in search results in hours only

2016-01-26 Thread Matt Zagrabelny
Hi Keith,

On Tue, Jan 26, 2016 at 11:29 AM, Keith Creasy  wrote:
> Hi. I’m going to try this but so far I’ve gotten little or no response to
> anything I’ve asked.

What version of RT are you running?

> It appears that if you put the “Time Left” field in a search result it tries
> to convert to days, which in our case is just confusing as we are tracking
> actual work hours and not calendar time.

Are you talking about a query predicate or the formatting of the
displayed results?

I'm running 4.2 and did a quick test and the displayed "Time Worked"
was in minutes.

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

[rt-users] Time left... RE: Display time worked in search results in hours only

2016-01-26 Thread Keith Creasy
OK, I see that I made a mistake in the subject line.

I mean "Time Left" as in the body and not "Time Worked" as in the subject.


My version is 4.2.7


-Original Message-
From: Matt Zagrabelny [mailto:mzagr...@d.umn.edu] 
Sent: Tuesday, January 26, 2016 12:47 PM
To: Keith Creasy
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Display time worked in search results in hours only

Hi Keith,

On Tue, Jan 26, 2016 at 11:29 AM, Keith Creasy  wrote:
> Hi. I’m going to try this but so far I’ve gotten little or no response 
> to anything I’ve asked.

What version of RT are you running?

> It appears that if you put the “Time Left” field in a search result it 
> tries to convert to days, which in our case is just confusing as we 
> are tracking actual work hours and not calendar time.

Are you talking about a query predicate or the formatting of the displayed 
results?

I'm running 4.2 and did a quick test and the displayed "Time Worked"
was in minutes.

-m

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

Re: [rt-users] Time left... RE: Display time worked in search results in hours only

2016-01-26 Thread Matt Zagrabelny
On Tue, Jan 26, 2016 at 12:17 PM, Keith Creasy  wrote:
> OK, I see that I made a mistake in the subject line.
>
> I mean "Time Left" as in the body and not "Time Worked" as in the subject.

It is strange. I put the three fields into the display of a search.
Only "Time Left" is displayed in hours, the other two fields (Time
Worked and Time Estimated) show up in minutes. Looking at the column
map:

TimeWorked => {
attribute => 'TimeWorked',
title => 'Time Worked', # loc
value => sub { return $_[0]->TimeWorkedAsString }
},
TimeLeft => {
attribute => 'TimeLeft',
title => 'Time Left', # loc
value => sub { return $_[0]->TimeLeftAsString }
},
TimeEstimated => {
attribute => 'TimeEstimated',
title => 'Time Estimated', # loc
value => sub { return $_[0]->TimeEstimatedAsString }
},

And here's the code for displaying the time:

sub _DurationAsString {
my $self = shift;
my $value = shift;
return "" unless $value;
if ($value < 60) {
return $self->loc("[quant,_1,minute,minutes]", $value);
} else {
my $h = sprintf("%.2f", $value / 60 );
return $self->loc("[quant,_1,hour,hours]
([quant,_2,minute,minutes])", $h, $value);
}
}

Here are the ticket values:

Estimated: 16.7 hours (1,000 minutes)
Worked: 10 hours (600 minutes)
Left: 8.3 hours (500 minutes)

And here is what is displayed in the search:

1000
600
8 hours

Something seems to be amiss with _DurationAsString.

-m

>
> My version is 4.2.7
>
>
> -Original Message-
> From: Matt Zagrabelny [mailto:mzagr...@d.umn.edu]
> Sent: Tuesday, January 26, 2016 12:47 PM
> To: Keith Creasy
> Cc: rt-users@lists.bestpractical.com
> Subject: Re: [rt-users] Display time worked in search results in hours only
>
> Hi Keith,
>
> On Tue, Jan 26, 2016 at 11:29 AM, Keith Creasy  wrote:
>> Hi. I’m going to try this but so far I’ve gotten little or no response
>> to anything I’ve asked.
>
> What version of RT are you running?
>
>> It appears that if you put the “Time Left” field in a search result it
>> tries to convert to days, which in our case is just confusing as we
>> are tracking actual work hours and not calendar time.
>
> Are you talking about a query predicate or the formatting of the displayed 
> results?
>
> I'm running 4.2 and did a quick test and the displayed "Time Worked"
> was in minutes.
>
> -m
>
> -
> RT 4.4 and RTIR Training Sessions 
> (http://bestpractical.com/services/training.html)
> * Hamburg Germany  March 14 & 15, 2016

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

Re: [rt-users] Time left... RE: Display time worked in search results in hours only

2016-01-26 Thread Keith Creasy
That is strange. They are converting somewhere.

I wish all these columns would respect the user settings, minutes or hours. If 
you give time left a value of 100 hours the search displays 4 days which is not 
all all what we want. Either minutes or hours would work though we prefer hours.

-Original Message-
From: Matt Zagrabelny [mailto:mzagr...@d.umn.edu] 
Sent: Tuesday, January 26, 2016 2:39 PM
To: Keith Creasy
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Time left... RE: Display time worked in search results 
in hours only

On Tue, Jan 26, 2016 at 12:17 PM, Keith Creasy  wrote:
> OK, I see that I made a mistake in the subject line.
>
> I mean "Time Left" as in the body and not "Time Worked" as in the subject.

It is strange. I put the three fields into the display of a search.
Only "Time Left" is displayed in hours, the other two fields (Time Worked and 
Time Estimated) show up in minutes. Looking at the column
map:

TimeWorked => {
attribute => 'TimeWorked',
title => 'Time Worked', # loc
value => sub { return $_[0]->TimeWorkedAsString }
},
TimeLeft => {
attribute => 'TimeLeft',
title => 'Time Left', # loc
value => sub { return $_[0]->TimeLeftAsString }
},
TimeEstimated => {
attribute => 'TimeEstimated',
title => 'Time Estimated', # loc
value => sub { return $_[0]->TimeEstimatedAsString }
},

And here's the code for displaying the time:

sub _DurationAsString {
my $self = shift;
my $value = shift;
return "" unless $value;
if ($value < 60) {
return $self->loc("[quant,_1,minute,minutes]", $value);
} else {
my $h = sprintf("%.2f", $value / 60 );
return $self->loc("[quant,_1,hour,hours] ([quant,_2,minute,minutes])", 
$h, $value);
}
}

Here are the ticket values:

Estimated: 16.7 hours (1,000 minutes)
Worked: 10 hours (600 minutes)
Left: 8.3 hours (500 minutes)

And here is what is displayed in the search:

1000
600
8 hours

Something seems to be amiss with _DurationAsString.

-m

>
> My version is 4.2.7
>
>
> -Original Message-
> From: Matt Zagrabelny [mailto:mzagr...@d.umn.edu]
> Sent: Tuesday, January 26, 2016 12:47 PM
> To: Keith Creasy
> Cc: rt-users@lists.bestpractical.com
> Subject: Re: [rt-users] Display time worked in search results in hours 
> only
>
> Hi Keith,
>
> On Tue, Jan 26, 2016 at 11:29 AM, Keith Creasy  wrote:
>> Hi. I’m going to try this but so far I’ve gotten little or no 
>> response to anything I’ve asked.
>
> What version of RT are you running?
>
>> It appears that if you put the “Time Left” field in a search result 
>> it tries to convert to days, which in our case is just confusing as 
>> we are tracking actual work hours and not calendar time.
>
> Are you talking about a query predicate or the formatting of the displayed 
> results?
>
> I'm running 4.2 and did a quick test and the displayed "Time Worked"
> was in minutes.
>
> -m
>
> -
> RT 4.4 and RTIR Training Sessions 
> (http://bestpractical.com/services/training.html)
> * Hamburg Germany  March 14 & 15, 2016

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

[rt-users] RT created new Requestor instead of the Requestor that I created by REST

2016-01-26 Thread Marcelo Calado | TBS TAX Services

Hi There,
I've created new RT users by REST API using this code! Sometimes, I try to
open a new ticket for user and the RT created the new requestor instead of
use the requestor that I created by REST API. 

When its happen, the new user/requestor was created with name and email ,
but the another fields is blank.

Have you seem this before? Any idea??? I've created by REST around 2.000 new
users! 


$servername="https://myserver.com/REST/1.0/user/new?user=myuser&`pass=passwo
rd"
$content = @'
id: user/new
Name: TestofCreated
EmailAddress: testofcrea...@gmail.com
RealName: Test of Created
Organization: Calado SMB
Address1: 44,East Dr 
City: Brederodes
State: AA
Zip: 01032
Country: BR
MobilePhone: 857-999-
'@
add-type @"
using System.Net;
using System.Security.Cryptography.X509Certificates;
public class TrustAllCertsPolicy : ICertificatePolicy {
public bool CheckValidationResult(
ServicePoint srvPoint, X509Certificate certificate,
WebRequest request, int certificateProblem) {
return true;
}
}
"@
[System.Net.ServicePointManager]::CertificatePolicy = New-Object
TrustAllCertsPolicy

$RT = Invoke-WebRequest -Uri $servername -Body @{content=$content} -Method
Post
$RT.contentrt

Thank you!

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