[rt-users] [phish?] Re: Updating Ticket Status via PostgreSQL

2015-12-01 Thread Matt Zagrabelny
Hi Aaron,

I believe you can do this all in RT.

On Tue, Dec 1, 2015 at 2:33 PM, Aaron W. Swenson
 wrote:
> I'm sure this has been answered by someone somewhere, but my Google-fu is
> not helping me.
>
> I have a few hundred tickets in a production system that I want to change
> the status with some criteria a bit more sophisticated than RT (4.2.12) is
> allowing me to do.
>
> The SQL I want to issue is:
>
> UPDATE tickets
>SET status = 'noresponse'
>  WHERE status = 'open' AND told < '2015-11-01'
>AND told > lastupdated;
>
> The last condition is the one I can't enter in RT.

In your RT web interface, go to: Search -> Tickets -> New Search.

The key here is knowing that "Last Contacted" is really "Told", or so I believe.

>From a grep in the source directory:

share/html/Elements/SelectDateType:<&|/l&>Last
Contacted

Once you get your search results, you can bulk update the status change.

> Effectively, update the status of all tickets that are still open to
> "noresponse", where the last update was us sending the requester an email.
>
> Is this safe?

Nope. Don't perform update/insert/delete queries directly on the
database. There are things like effective ticket id that your query
doesn't handle. Scrips and things wouldn't fire either.

Cheers,

-m


[rt-users] Updating Ticket Status via PostgreSQL

2015-12-01 Thread Aaron W. Swenson
I'm sure this has been answered by someone somewhere, but my Google-fu 
is not helping me.


I have a few hundred tickets in a production system that I want to 
change the status with some criteria a bit more sophisticated than RT 
(4.2.12) is allowing me to do.


The SQL I want to issue is:

UPDATE tickets
   SET status = 'noresponse'
 WHERE status = 'open' AND told < '2015-11-01'
   AND told > lastupdated;

The last condition is the one I can't enter in RT.

Effectively, update the status of all tickets that are still open to 
"noresponse", where the last update was us sending the requester an 
email.


Is this safe? Is there something else I should be updating as well?

Thank you in advance.

- Aaron


[rt-users] Help with a template

2015-12-01 Thread Joe Kirby
I have a need to create a child ticket and pass on the values for a shared 
custom field.

This works fine when passing a field which is limited to 1 value however I now 
have a multi-value custom field and I cannot find any examples of how to pass 
the secondary values if they exist.

Here is my current template that brings the first value

Any help is appreciated

Thanks

Joe

===Create-Ticket: DoIT-ITNM-OutReach
Subject: OutReach from: {$Tickets{'TOP'}->Subject}
Referred-To-By: {$Tickets{'TOP'}->Id}
Queue: 2234
InitialPriority: 99
FinalPriority: 99
Status: resolved
Requestor: {$Tickets{'TOP'}->RequestorAddresses}
AdminCc: {$Tickets{'TOP'}->Owner}
ITNM-Contact-Type: {$Tickets{'TOP'}->FirstCustomFieldValue('ITNM-Contact-Type')}
ITNM-Topic: {$Tickets{'TOP'}->FirstCustomFieldValue('ITNM-Topic')}
Content: The Online Learning team has performed an outreach and would like to 
track this for planning purposes. Please refer to the linked ticket for 
specific details.
ENDOFCONTENT


Joe Kirby ,  Assistant Vice President, Business Systems
Division of Information Technology (DoIT) 
Support Response -   http://www.umbc.edu/doit 
Administration 627
Office - 410-455-3020 
Email - ki...@umbc.edu



Re: [rt-users] Help with a template

2015-12-01 Thread Matt Zagrabelny
On Tue, Dec 1, 2015 at 4:21 PM, Joe Kirby  wrote:
> I have a need to create a child ticket and pass on the values for a shared
> custom field.
>
> This works fine when passing a field which is limited to 1 value however I
> now have a multi-value custom field and I cannot find any examples of how to
> pass the secondary values if they exist.

There are a couple of ways.

1) Use the built-in method.

CustomFieldValuesAsString

more about it can be found in:

lib/RT/Record.pm

2) Have full control over the output.

Here is an example that builds an HTML list:

{
 my $cf = $Ticket->LoadCustomFieldByIdentifier('Multimedia Hub
Equipment');
 my $equipment = $cf->ValuesForObject($Ticket)->ItemsArrayRef;

 $html_equipment = 'No equipment listed.';

 if (@$equipment > 0) {
 $html_equipment = '';
 for my $item (@$equipment) {
 my $content = $item->Content;
 RT::Interface::Web::EscapeHTML(\$content);
 $html_equipment .= ''.$content.'';
 }
 $html_equipment .= '';
 }

 $html_equipment;
 }

Cheers,

-m


Re: [rt-users] how to change a queue name

2015-12-01 Thread Martin Criminale
Kobus,


Turns out adding an entry to the aliases file was the trick.  Much appreciated.



From: Kobus Bensch 
Sent: Monday, November 30, 2015 2:04 PM
To: Martin Criminale; rt-users@lists.bestpractical.com
Subject: Re: [rt-users] how to change a queue name

You see, I have always had to make sure that there is an alias for the queue in 
the aliases file. As far as I know it is not automatic. Unless I just dont 
understand how your system is put together.

On 30/11/2015 21:55, Martin Criminale wrote:

Thanks Kobus.



With our installation if the email address prefix matches the queue name there 
hasn't been any need to edit the aliases file.



For example, if I forward 
someth...@ourdomain.com to our RT server and in 
there have a queue named "something" it just works.



We have only needed to edit the aliases file if we wanted email with some other 
prefix to land in an existing queue.



Does 'fixing' the name in the web interface of RT not fix something behind the 
scenes?  This is what I am suspecting but I'm not sure how to check.  If that 
is the case I guess we would need to edit the aliases file.



From: rt-users [mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of 
Kobus Bensch
Sent: Monday, November 30, 2015 1:34 PM
To: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] how to change a queue name



have you changed the aliases file?

On 30/11/2015 21:13, Martin Criminale wrote:

I inherited a RT installation (version 3.6.5) and in the process of setting up 
a new queue I initially mistyped the queue name and saved it.  I have now fixed 
the queue name so it matches the email address of messages intended for this 
queue but no email is arriving in the queue.



All the other settings for this new queue are identical to queues that work.



Can anyone let me know what to look for or how to troubleshoot this?



Thanks,



Martin Criminale

University of Washington Information School IT







--
Kobus Bensch
Senior Systems Administrator
Address:  22 & 24 | Frederick Sanger Road | Guildford | Surrey | GU2 7YD
DDI:  0207 871 3958
Tel:  0207 871 3890
Email:  kobus.ben...@trustpayglobal.com
[cid:part3.08080809.01040104@trustpayglobal.com]



Trustpay Global Limited is an authorised Electronic Money Institution regulated 
by the Financial Conduct Authority registration number 900043. Company No 
07427913 Registered in England and Wales with registered address 130 Wood 
Street, London, EC2V 6DL, United Kingdom.

For further details please visit our website at 
www.trustpayglobal.com.

The information in this email and any attachments are confidential and remain 
the property of Trustpay Global Ltd unless agreed by contract. It is intended 
solely for the person to whom or the entity to which it is addressed. If you 
are not the intended recipient you may not use, disclose, copy, distribute, 
print or rely on the content of this email or its attachments. If this email 
has been received by you in error please advise the sender and delete the email 
from your system. Trustpay Global Ltd does not accept any liability for any 
personal view expressed in this message.

--
Kobus Bensch
Senior Systems Administrator
Address:  22 & 24 | Frederick Sanger Road | Guildford | Surrey | GU2 7YD
DDI:  0207 871 3958
Tel:  0207 871 3890
Email:  kobus.ben...@trustpayglobal.com
[cid:part6.0608.01030809@trustpayglobal.com]


Trustpay Global Limited is an authorised Electronic Money Institution regulated 
by the Financial Conduct Authority registration number 900043. Company No 
07427913 Registered in England and Wales with registered address 130 Wood 
Street, London, EC2V 6DL, United Kingdom.

For further details please visit our website at 
www.trustpayglobal.com.

The information in this email and any attachments are confidential and remain 
the property of Trustpay Global Ltd unless agreed by contract. It is intended 
solely for the person to whom or the entity to which it is addressed. If you 
are not the intended recipient you may not use, disclose, copy, distribute, 
print or rely on the content of this email or its attachments. If this email 
has been received by you in error please advise the sender and delete the email 
from your system. Trustpay Global Ltd does not accept any liability for any 
personal view expressed in this message.


[rt-users] Failure creation of new users.

2015-12-01 Thread bharath reddy
Hello All,

I'm facing issue while a new user is sending a RT request, it says
following error :

"You might need to grant 'Everyone' the right 'CreateTicket' for the
queue general. (/rt/lib/RT/Interface/Email.pm:245)"

But I've this set already. Recently I made changes for RT:ExternalAuth can
you help me whether this changes have caused this issue ?

A quick help will be appreciated as we are missing critical requests.

Thanks,
Bharath.


Re: [rt-users] Failure creation of new users.

2015-12-01 Thread bharath reddy
Got the issue fixed, forgot to add the folloowing tag :

Set($AutoCreateNonExternalUsers, 1);

Thanks,
Bharath.

On Tue, Dec 1, 2015 at 12:06 PM, bharath reddy 
wrote:

> Hello All,
>
> I'm facing issue while a new user is sending a RT request, it says
> following error :
>
> "You might need to grant 'Everyone' the right 'CreateTicket' for the
> queue general. (/rt/lib/RT/Interface/Email.pm:245)"
>
> But I've this set already. Recently I made changes for RT:ExternalAuth can
> you help me whether this changes have caused this issue ?
>
> A quick help will be appreciated as we are missing critical requests.
>
> Thanks,
> Bharath.
>


[rt-users] RT's configuration does not allow for the creation of a new user for your email.

2015-12-01 Thread bharath reddy
Hello All,

I'm facing issue with new users couldn't able to be created. I've found a
similar mailing thread
before
but couldn't see a solution for that.

Attaching is the log message for the same.

Any help is highly appreciated.

Thanks,
Bharath.
[28476] [Mon Nov 30 21:23:13 2015] [debug]: Going to create user with address 
'abcd.kumara...@stonybrook.edu' 
(/rt/lib/RT/Interface/Email/Auth/MailFrom.pm:100)
[28476] [Mon Nov 30 21:23:13 2015] [debug]: 
RT::Authen::ExternalAuth::CanonicalizeUserInfo called by 
RT::Authen::ExternalAuth 
/rt/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm 885 
with: Comments: Autocreated on ticket submission, Disabled: , 
EmailAddress: abcd.kumara...@stonybrook.edu, Name: 
abcd.kumara...@stonybrook.edu, Password: , Privileged: , RealName: abcd 
Kumaravel 
(/rt/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:792)
[28476] [Mon Nov 30 21:23:13 2015] [debug]: Attempting to get user info using 
this external service: My_LDAP 
(/rt/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:800)
[28476] [Mon Nov 30 21:23:13 2015] [debug]: Attempting to use this 
canonicalization key: Name 
(/rt/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:809)
[28476] [Mon Nov 30 21:23:13 2015] [debug]: LDAP Search ===  Base: 
OU=SBCS,DC=cs,DC=stonybrook,DC=edu == Filter: 
(&(&(objectClass=user)(|(memberOf=CN=System Staff Users,OU=Security 
Groups,OU=SBCS,DC=cs,DC=stonybrook,DC=edu)
(memberOf=CN=Student Assistant Users,OU=Security 
Groups,OU=SBCS,DC=cs,DC=stonybrook,DC=edu)(memberOf=CN=Assistant 
Professors,OU=Security 
Groups,OU=SBCS,DC=cs,DC=stonybrook,DC=edu)(memberOf=CN=Full 
Professors,OU=Security Groups,OU=SBCS,DC=cs,DC=stonybrook,DC=edu)
(memberOf=CN=Associate Professors,OU=Security 
Groups,OU=SBCS,DC=cs,DC=stonybrook,DC=edu)(memberOf=CN=Instructors,OU=Security 
Groups,OU=SBCS,DC=cs,DC=stonybrook,DC=edu)))
(sAMAccountName=abcd.kumara...@stonybrook.edu)) == Attrs: 
cn,mail,sAMAccountName 
(/rt/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/LDAP.pm:357)
[28476] [Mon Nov 30 21:23:13 2015] [debug]: Attempting to use this 
canonicalization key: EmailAddress 
(/rt/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:809)
[28476] [Mon Nov 30 21:23:14 2015] [debug]: LDAP Search ===  Base: 
OU=SBCS,DC=cs,DC=stonybrook,DC=edu == Filter: 
(&(&(objectClass=user)(|(memberOf=CN=System Staff Users,OU=Security 
Groups,OU=SBCS,DC=cs,DC=stonybrook,DC=edu)(
memberOf=CN=Student Assistant Users,OU=Security 
Groups,OU=SBCS,DC=cs,DC=stonybrook,DC=edu)(memberOf=CN=Assistant 
Professors,OU=Security 
Groups,OU=SBCS,DC=cs,DC=stonybrook,DC=edu)(memberOf=CN=Full 
Professors,OU=Security Groups,OU=SBCS,DC=cs,DC=stonybrook,DC=edu)
(memberOf=CN=Associate Professors,OU=Security 
Groups,OU=SBCS,DC=cs,DC=stonybrook,DC=edu)(memberOf=CN=Instructors,OU=Security 
Groups,OU=SBCS,DC=cs,DC=stonybrook,DC=edu)))(mail=abcd.kumara...@stonybrook.edu))
 == Attrs: cn,mail,sAMAccountName 
(/rt/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/LDAP.pm:357)
[28476] [Mon Nov 30 21:23:14 2015] [info]: 
RT::Authen::ExternalAuth::CanonicalizeUserInfo returning Comments: Autocreated 
on ticket submission, Disabled: , EmailAddress: abcd.kumara...@stonybrook.edu, 
Name: abcd.kumara...@stonybrook.edu, Password: , Privileged: , RealName: abcd 
Kumaravel
 (/rt/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:868)
[28476] [Mon Nov 30 21:23:14 2015] [crit]: User could not be created: User 
creation failed in mailgateway: Could not set user info 
(/rt/lib/RT/Interface/Email.pm:245)
[28476] [Mon Nov 30 21:23:14 2015] [warning]: Couldn't load user 
'abcd.kumara...@stonybrook.edu'.giving up (/rt/lib/RT/Interface/Email.pm:897)
[28476] [Mon Nov 30 21:23:14 2015] [crit]: User could not be loaded: User  
'abcd.kumara...@stonybrook.edu' could not be loaded in the mail gateway 
(/rt/lib/RT/Interface/Email.pm:245)
[28476] [Mon Nov 30 21:23:14 2015] [error]: Could not load a valid user: RT 
could not load a valid user, and RT's configuration does not allow
for the creation of a new user for this email (abcd.kumara...@stonybrook.edu).
You might need to grant 'Everyone' the right 'CreateTicket' for the queue 
general. (/rt/lib/RT/Interface/Email.pm:245)
[28476] [Mon Nov 30 21:23:14 2015] [error]: Could not load a valid user: RT 
could not load a valid user, and RT's configuration does not allow for the 
creation of a new user for your email. (/rt/lib/RT/Interface/Email.pm:245)
[28476] [Mon Nov 30 21:23:14 2015] [error]: Could not record email: Could not 
load a valid user (/rt/share/html/REST/1.0/NoAuth/mail-gateway:75)
[27971] [Mon Nov 30 21:29:15 2015] [debug]: Attempting to use external auth 
service: My_LDAP 
(/rt/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth.pm:424)


[rt-users] Asset autocomplete not working

2015-12-01 Thread Lorenzo Mao
Hello,
  we've successful installed the latest version of rt and asset extension but 
autocomplete is not working on assets.
For example if we try to link one asset to one other on the "Depends on" field 
the autocomplete is fetching only the assets with ID between #1 and #15.

We have about 400 assets and all the assets with ID > 15 are not shown on the 
autocomplete list.

Do you have any idea of the possible cause of this issue?

Thanks
Lorenzo