[rt-users] Display number of tickets to each queue in last 12 months

2014-10-08 Thread scott.dalzell
What is the best way to display the number of tickets each queue has received
over the past 12months?
i would like to add it to the homepage so we and easily monitor which queues
are reciving a lot of tickets

thank you

Scott



--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/Display-number-of-tickets-to-each-queue-in-last-12-months-tp58768.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.
-- 
RT Training November 4  5 Los Angeles
http://bestpractical.com/training


Re: [rt-users] Adding New Status option

2014-05-01 Thread scott.dalzell
I removed the approvals section from my SiteConfig and it has started
working.

thanks for the help

Scott



--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/Adding-New-Status-option-tp57285p57291.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.
-- 
RT Training - Dallas May 20-21
http://bestpractical.com/training


[rt-users] Adding New Status option

2014-04-30 Thread scott.dalzell
I am currently using RT4.0.12 and i am looking to add in a new status option
for tickets ('Testing').

In my RT_SiteConfig.pm i added the following (copied from RT_Config) and
then added in the Testing Status as shown below but the option fails to
show.

if i have set it up correctly i should only be able to select 'Testing' when
the ticket is currently 'Open'

###
#Adding ticket status
Set(%Lifecycles,
default = {
initial = [ 'new' ],
active  = [ 'open', 'stalled', 'Testing' ],
inactive= [ 'resolved', 'rejected', 'deleted' ],

defaults = {
on_create = 'new',
on_merge  = 'resolved',
approved  = 'open',
denied= 'rejected',
reminder_on_open = 'open',
reminder_on_resolve  = 'resolved',
},

transitions = {
''   = [qw(new open resolved)],

# from   = [ to list ],
new  = [qw(open stalled resolved rejected deleted)],
open = [qw(new stalled resolved rejected deleted Testing)],
stalled  = [qw(new open rejected resolved deleted)],
resolved = [qw(new open stalled rejected deleted)],
rejected = [qw(new open stalled resolved deleted)],
deleted  = [qw(new open stalled rejected resolved)],
Testing = [qw(new open stalled)],
},
rights = {
'* - deleted'  = 'DeleteTicket',
'* - *'= 'ModifyTicket',
},
actions = [
'new - open'  = {
label  = 'Open It', # loc
update = 'Respond',
},
'new - resolved'  = {
label  = 'Resolve', # loc
update = 'Comment',
},
'new - rejected'  = {
label  = 'Reject', # loc
update = 'Respond',
},
'new - deleted'   = {
label  = 'Delete', # loc
},

'open - stalled'  = {
label  = 'Stall', # loc
update = 'Comment',
},
'open - resolved' = {
label  = 'Resolve', # loc
update = 'Comment',
},
'open - rejected' = {
label  = 'Reject', # loc
update = 'Respond',
},

'stalled - open'  = {
label  = 'Open It', # loc
},
'resolved - open' = {
label  = 'Re-open', # loc
update = 'Comment',
},
'rejected - open' = {
label  = 'Re-open', # loc
update = 'Comment',
},
'deleted - open'  = {
label  = 'Undelete', # loc
},
'open - Testing'  = {
label  = 'Testing', # loc
},
],
},
# don't change lifecyle of the approvals, they are not capable to deal with
# custom statuses
approvals = {
initial = [ 'new' ],
active  = [ 'open', 'stalled'],
inactive= [ 'resolved', 'rejected', 'deleted' ],

defaults = {
on_create = 'new',
on_merge = 'resolved',
reminder_on_open = 'open',
reminder_on_resolve  = 'resolved',
},

transitions = {
''   = [qw(new open resolved)],

# from   = [ to list ],
new  = [qw(open stalled resolved rejected deleted)],
open = [qw(new stalled resolved rejected deleted)],
stalled  = [qw(new open rejected resolved deleted)],
resolved = [qw(new open stalled rejected deleted)],
rejected = [qw(new open stalled resolved deleted)],
deleted  = [qw(new open stalled rejected resolved)],
Testing = [qw(new stalled resolved rejected deleted)],
},
rights = {
'* - deleted'  = 'DeleteTicket',
'* - rejected' = 'ModifyTicket',
'* - *'= 'ModifyTicket',
},
actions = [
'new - open'  = {
label  = 'Open It', # loc
update = 'Respond',
},
'new - resolved'  = {
label  = 'Resolve', # loc
update = 'Comment',
},
'new - rejected'  = {
label  = 'Reject', # loc
update = 'Respond',
},
'new - deleted'   = {
label  = 'Delete', # loc
},

'open - stalled'  = {
label  = 'Stall', # loc
update = 'Comment',
},
'open - resolved' = {
label  = 'Resolve', # loc
update = 'Comment',
},
'open - rejected' = {
label  = 'Reject', # 

[rt-users] custom condition when requestor replies/comments to ticket

2014-03-21 Thread scott.dalzell
I am looking to create a custom condition that will be triggered if the
requestor of a ticket replies or comments on the ticket after it has been
created

this is to be used on Several of our queues so the group responsable for the
queue can be notified to respond. 

This is important as the the members of the groups drop in and out of the
office so getting a notification would help them all be aware of updates on
tickets they may have to pick up 



--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/custom-condition-when-requestor-replies-comments-to-ticket-tp57000.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.
-- 
RT Training - Dallas May 20-21
http://bestpractical.com/training


Re: [rt-users] Scrip

2014-03-07 Thread scott.dalzell
so you just want the scrip to run the first time a user replies to a ticket

i think it would be much easyer to have the scrip run each time a user
comments/replys to a ticket and have something allone the lines of this

*sudo code*
if(requestor == no one){
find last person to update ticket
delete requestor
add new requestor (last person to update ticket
}

this way tickets would always have a requestor once commented on


i use this snippet to switch a tickets requestor from our website to a user

$ticket-DeleteWatcher( Type=Requestor, Email = $EmailBad);
$ticket-AddWatcher(Type = Requestor, Email = $fragment); 

$fragment is created by searching the contents of the ticket to find the
users email address



--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/Scrip-tp56896p56900.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.
-- 
RT Training London, March 19-20 and Dallas May 20-21
http://bestpractical.com/training


[rt-users] Cannot save Article searchs for system use

2014-02-03 Thread scott.dalzell
i am currently using RT4.0.12 and i am trying to create a dashboard to
display all new Articles that have been created in the last 2 weeks

the first hurdle i have come across is that i can not save any Article
searches into anything other that 'My Searches' this means that even if i
create a suitable search, other users will not be able to view the results

is there anyway to allow me to save an Article search with the privacy set
to 'RT System's saved searches'?



--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/Cannot-save-Article-searchs-for-system-use-tp56479.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


[rt-users] Creating Custom Dashboard - 'New Articles'

2014-01-31 Thread scott.dalzell
Hi 

im looking to create a new dashboard for users that will display all the new
articles that have been created/updated in the last month or so.

i have created dashboards for tickets before but never Articles so im
struggling with the search terms required as the simple search seams geared
toward tickets in 4.0.12

does anyone have any pointers?

regards

scott



--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/Creating-Custom-Dashboard-New-Articles-tp56465.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


[rt-users] Installing Apache2.2.26 as a Win7 Service under Cygwin

2014-01-09 Thread scott.dalzell
I am currently having some issues with Apache that I’m trying to install/run 
as a service on Windows 7.
I want to set it up as a Windows Service so that if it ever fails over it
will restart it's self

i have installed Apache2.2.26 and configured the http.conf file (port ,
server name, modules etc) and it functions correctly when using the manual
start and stop commands

$ /usr/sbin/apache2.2.26/bin/apachectl -k stop -f
/usr/sbin/apache2.2.26/conf/httpd.conf
$ /usr/sbin/apache2.2.26/bin/apachectl -k start -f
/usr/sbin/apache2.2.26/conf/httpd.conf

I also get the 'It Works' screen when I navigate to 127.0.0.1:8080 so I’m
happy with this so far

All the issues come in when I start to install it as a service
I have installed it on my windows 7 test machine using the following command

$ cygrunsrv -I CygwinServer-Apache2.2.26d -p
/usr/sbin/apache2.2.26/bin/httpd.exe -a '-f
/usr/sbin/apache2.2.26/conf/httpd.conf' -t manual

if I then try and start the Service I get the following

$ cygrunsrv -S CygwinServer-Apache2.2.26d
cygrunsrv: Error starting a service: QueryServiceStatus:  Win32 error 1062:
The service has not been started.

Windows Event Viewer gave the following error

##Event Viewer Error message - START#
The description for Event ID 0 from source CygwinServer-Apache2.2.26d cannot
be found. Either the component that raises this event is not installed on
your local computer or the installation is corrupted. You can install or
repair the component on the local computer.

If the event originated on another computer, the display information had to
be saved with the event.

The following information was included with the event: 

CygwinServer-Apache2.2.26d: PID 10564: `CygwinServer-Apache2.2.26d' service
stopped, exit status: 0
##Event Viewer Error message - END#

This is all fairly unhelp full in my eyes until I go into Cygwin and try the
following

$ /usr/sbin/Apache2.2.26/bin/httpd.exe
(112)Address already in use: make_sock: could not bind to address [::]:8080
(112)Address already in use: make_sock: could not bind to address
0.0.0.0:8080
no listening sockets available, shutting down

It looks like the service has stopped but it has locked out the port. if I
try and stop Apache manually it still remains locked out until I restart the
machine

Does anyone have any idea why this port it freezing up when it is run as a
service?
any pointer would be very appreciated

thank you

Scott




--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/Installing-Apache2-2-26-as-a-Win7-Service-under-Cygwin-tp56220.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


Re: [rt-users] Searched for 3 hours - how do you view all tickets in a queue?

2014-01-09 Thread scott.dalzell
I dont know what access level your admin has given you as a user but there
are afew ways to view All the tickets in a queue

*Edit Queue search to show all*
1/ Select queue (e.g. General)
2/ select 'edit search' tab
3/ In the 'Sorting' tab increase the rows per page to unlimited
4/ click update format and search


*Using queue charts to view all tickets in queue*
1/ Select queue (e.g. General)
2/ click the 'Chart' tab
3/ Select the queue name (e.g. General) from the chart key

*As your Rt admin to create a dashboard*
if all else fails as your RT admin to create a dashboard with a table to
show all tickets by queue

hopefully one of these help you

Scott





--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/Searched-for-3-hours-how-do-you-view-all-tickets-in-a-queue-tp56196p56222.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


Re: [rt-users] Let customers see tickets in selfservice interface

2014-01-09 Thread scott.dalzell
i would create a group (Group_CompanyA) and then create a generic user for
that group that everyone in companyA could use.

i would then assign Group_CompanyA to the queue (CompanyA) under the 'group
rights' tab. giving the group at least 'view queue' create ticket, and reply
to ticket rights 

That should be enough so the generiic user of companyA can view and create
tickets for the CompanyA queue

Also if you have a different generic user for each queue it will mean the
home page will only show tickets relating to that companies Queue





--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/Let-customers-see-tickets-in-selfservice-interface-tp56218p56223.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


[rt-users] How can i search the contents of a transaction when creating a new ticket

2013-11-13 Thread scott.dalzell
Is there a way to search the contents of a transaction on ticket creator so i
can find an email address within the transaction and then use that email
address as the requestor of the new ticket

i have been able to setup a small scrip that will switch between 2 hard
coded requestors but i just dont know how to find the email address stored
within the transactions.

each new ticket on our RT system will be generated when the user fills out
an online form, our website then sends this to our RT system but it contains
the websites email address and not the users who filled in the form.


each transaction will contain something like the following
###

There has been a message sent via the technical support form

Contact Name: Scott
Company Name: Company
Contact Email Add: email@address
Contact Tel: 123 456789
Licence Number: 12.23.45.56
Version Number: 1.2.3.45
Software Product: product
Country: country
Problem: a description of the issue faced by the customer 


if anyone could point me in the right direction that would be great

thank you

Scott




--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/How-can-i-search-the-contents-of-a-transaction-when-creating-a-new-ticket-tp55795.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


Re: [rt-users] How can i search the contents of a transaction when creating a new ticket

2013-11-13 Thread scott.dalzell
solved my own problem.
first it searches for the requestors email address or reference number
matches a certain value
if it does it will then chop up the standard emails contents to get the
users email address
it will then remove the old requestor and add the new requestor 




###
#Variables
###
my $trans = $self-TransactionObj; 
my $ticket = $self-TicketObj;

my $trigger =No;
my $EmailBad = 'website-no-re...@lfm-software.com';

my $out=;
my $length=0;
my $fragment=;
my $fragmentSearch1=Contact Email Add: ;
my $fragmentSearch2=Contact Tel:;

###
#Set Trigger for switching scrip on
###

if ($trans-Creator()=='11434'){
$trigger=YES;
}
if($ticket-IsWatcher( Type=Requestor, Email = $EmailBad)){
$trigger=YES;
}
if ($trigger eq 'YES'){

###
#get contents and return email address
###
$out=$trans-Content(); 
$length = length($out); 
$fragment = substr $out, index($out, $fragmentSearch1);
$fragment = substr $fragment,
length($fragmentSearch1),(-1*(length($fragment)-index($fragment,
$fragmentSearch2)));

###
#removes one requestor and replaces it with an other
###

$ticket-DeleteWatcher( Type=Requestor, Email = $EmailBad);
$ticket-AddWatcher(Type = Requestor, Email = $fragment); 
return 1;
}


its might not be the most elegant way of doing it but it does the job




--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/How-can-i-search-the-contents-of-a-transaction-when-creating-a-new-ticket-tp55795p55797.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


[rt-users] Modify CF dropdown list from external DB based off of another CFs value

2013-08-14 Thread scott.dalzell
I have 2 ticket CFs (Version_No and Product)

i currently have a perl script to update the Version_No CF drop down list
from an external database with a manually set Where value set in the code.
(This all works fine for controlling the drop down list values to show only
the version numbers for the manually set product)

i would now like to modify the code to allow the drop down list to be
updated with values which contain the same catagory as the value set in the
Product CF, similar to using the Categories are based on Field when you
create your own list

To do this i have added the following line

my $dbwherevalue = $self-TicketObj-FirstCustomFieldValue('Product');

but i also get the following error

[error]: Can't locate object method TicketObj via package
RT::CustomFieldValues::Version_No at
/opt/rt4/sbin/../lib/RT/CustomFieldValues/Version_No.pm line 60

would someone be able to advice me what to do to resolve this error

below is my code

---CODE START---
##
##Prep
##

package RT::CustomFieldValues::Version_No;

use strict;
use warnings;
use DBI;
use DBD::Mysql;
use base qw(RT::CustomFieldValues::External);

##
##List Description
##

sub SourceDescription {
return 'Version Numbers';
}

##
##VARIABLES
##

sub ExternalValues {
my $self = shift;

# External Database details

my $dbhost = [HostName];
my $dbtype = [DatabaseType];
my $dbname = [DatabaseName]; 
my $dbtable=customfieldvalue;
my $dbcolumn=Name;

my $dbwherecolumn=Category;
#my $dbwherevalue='Testing1234';
 my $dbwherevalue =
$self-TicketObj-FirstCustomFieldValue('Product');

my $dbuser = [UserName]; 
my $dbpass = [Password];

my $i = 0;
my @res;
my $Hostname;

##
##Connect to Database
##
#Database on remote server
my $dbh = DBI-connect(DBI:$dbtype:$dbname;host=$dbhost, $dbuser,
$dbpass,
{ RaiseError = 1 }
   );

##
##Run Search of DB for values you wish in CF List
##

my $req = SELECT distinct $dbcolumn FROM $dbtable where
$dbwherecolumn=$dbwherevalue;
my $hreq = $dbh-prepare($req);
$hreq-execute();;
$hreq-bind_columns(\$Hostname);
while ($hreq-fetch()){
push @res, {
name= $Hostname,
description = $Hostname,
sortorder   = $i++,
};
}
return \@res;
}

RT::Base-_ImportOverlays();

1;

---CODE END-

thank you in advanced

Scott



--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/Modify-CF-dropdown-list-from-external-DB-based-off-of-another-CFs-value-tp55012.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


[rt-users] Unowned Tickets Table on Homepage not updating correctly

2013-08-12 Thread scott.dalzell
Hi 
i am running an RT system setup so that our support team monitors 5 queues
and our multiple resellers also have a queue each to run there support
services

One of the support users has reported an issue with the 10 newest unowned
tickets table on the homepage not displaying the full list of tickets that
they have permissions to see

We know that there are 4 unowned tickets in the General queue and the user
has full access too and multiple tickets in queues that the user doesnt have
access too. 

On the homepage the 10 newest unowned tickets table stats there are only 2
unowned tickets in the general queue (i.e 2 tickets are missed),however if i
open up the table it will display all 4 unowned ticket they are allowed to
see.

i have created my own unowned tickets search and it suffers from the same
bug, However, it has also been noted that this bug only effects the table on
the homepage. Tables runs fine in a dashboard.

has anyone else experiancd this and if so were they able to resolve it

thank you in advanced



--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/Unowned-Tickets-Table-on-Homepage-not-updating-correctly-tp54986.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


Re: [rt-users] Unowned Tickets Table on Homepage not updating correctly

2013-08-12 Thread scott.dalzell
Thank you for the quick response

The Rows per box was set to 10 so i have increased it to 100 and it revieled
the 2 missing tickets.

I take it RT counts tickets that the user doesnt have permission to view in
this Rows per box count as well ye

thank you again





--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/Unowned-Tickets-Table-on-Homepage-not-updating-correctly-tp54986p54988.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


Re: [rt-users] Unowned Tickets Table on Homepage not updating correctly

2013-08-12 Thread scott.dalzell
This setting nailed the issue on the head. 
ill post here again if i notice any issues from setting
Set($UseSQLForACLChecks,1) in the RT_SiteConfig file but all appears well

thank you everyone for your help

Scott



--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/Unowned-Tickets-Table-on-Homepage-not-updating-correctly-tp54986p54991.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


Re: [rt-users] Error when sending or reciving mail (fork::abort: address space needed by xxx)

2013-07-25 Thread scott.dalzell
Rebasing and tunning has done the trick and it is all running fine now

i used the following link to help me rebase
http://cygwin.wikia.com/wiki/Rebaseall

thanks guys for all your support

Scott



--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/Error-when-sending-or-reciving-mail-fork-abort-address-space-needed-by-xxx-tp54702p54732.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


Re: [rt-users] Error when sending or reciving mail (fork::abort: address space needed by xxx)

2013-07-24 Thread scott.dalzell
Thanks Thomas I think this has put me on the right track. 

i found and tweeked the mysqltuner.pl to run on mysql database (needed the
host ip address to login into mysql)

This suggested that i increase afew max table/cache values to optimize my
database. i then Optimized all my databases and increase the Virtual memory
on the machine

This has resulted in me being able to send emails from RT again (yeah!), but
the (fork::abort: address space needed by xxx) errors are still sometimes
appearing in the error.log but as of yet have not caused any more disruption

knowing that this will be a ticking time bomb if i leave it in this state,
Do you have any advice on how to tune Apache? 

Is there an equivalent 'Apachetuner.pl' that you know of as the
mysqltuner.pl was very handly for a beginner like me



--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/Error-when-sending-or-reciving-mail-fork-abort-address-space-needed-by-xxx-tp54702p54715.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


[rt-users] Error when sending or reciving mail (fork::abort: address space needed by xxx)

2013-07-23 Thread scott.dalzell
Hi Guy

i am running RT4.0.12 using a mysql 5.6.10 under cygwin 2.774 and i am
having a major issue

When i try and and reply to a ticket or create a ticket via email i get the
following in the error.log

---log file---

[Tue Jul 23 16:51:49 2013] [error] (11)Resource temporarily unavailable:
fork: Unable to fork new process
[Tue Jul 23 15:51:50 2013] [warning]: Use of uninitialized value $_[2] in
join or string at (eval 378) line 2. ((eval 378):2)
[Tue Jul 23 15:51:50 2013] [warning]: Use of uninitialized value $_[2] in
join or string at (eval 378) line 2. ((eval 378):2)
[Tue Jul 23 15:51:50 2013] [warning]: Use of uninitialized value $_[2] in
join or string at (eval 378) line 2. ((eval 378):2)
[Tue Jul 23 15:51:50 2013] [warning]: Use of uninitialized value $_[2] in
join or string at (eval 378) line 2. ((eval 378):2)
[Tue Jul 23 15:51:50 2013] [warning]: Use of uninitialized value $_[2] in
join or string at (eval 378) line 2. ((eval 378):2)
[Tue Jul 23 15:51:50 2013] [warning]: Use of uninitialized value $_[2] in
join or string at (eval 378) line 2. ((eval 378):2)
[Tue Jul 23 15:51:50 2013] [warning]: Use of uninitialized value $_[2] in
join or string at (eval 378) line 2. ((eval 378):2)
[Tue Jul 23 15:51:50 2013] [warning]: Use of uninitialized value $_[2] in
join or string at (eval 378) line 2. ((eval 378):2)
[Tue Jul 23 15:51:50 2013] [warning]: Use of uninitialized value $_[2] in
join or string at (eval 378) line 2. ((eval 378):2)
[Tue Jul 23 15:51:50 2013] [warning]: Use of uninitialized value $_[2] in
join or string at (eval 378) line 2. ((eval 378):2)
[Tue Jul 23 15:51:50 2013] [warning]: Use of uninitialized value $_[2] in
join or string at (eval 378) line 2. ((eval 378):2)
[Tue Jul 23 15:51:50 2013] [warning]: Use of uninitialized value $_[2] in
join or string at (eval 378) line 2. ((eval 378):2)
[Tue Jul 23 15:51:50 2013] [warning]: Use of uninitialized value $_[2] in
join or string at (eval 378) line 2. ((eval 378):2)
[Tue Jul 23 15:51:50 2013] [warning]: Use of uninitialized value $_[2] in
join or string at (eval 378) line 2. ((eval 378):2)
[Tue Jul 23 15:51:50 2013] [warning]: Use of uninitialized value $_[2] in
join or string at (eval 378) line 2. ((eval 378):2)
[Tue Jul 23 15:51:50 2013] [warning]: Use of uninitialized value $_[2] in
join or string at (eval 378) line 2. ((eval 378):2)
[Tue Jul 23 15:51:51 2013] [warning]: Use of uninitialized value $_[2] in
join or string at (eval 378) line 2. ((eval 378):2)
[Tue Jul 23 15:51:51 2013] [warning]: Use of uninitialized value $_[2] in
join or string at (eval 378) line 2. ((eval 378):2)
[Tue Jul 23 16:51:51 2013] [warn] FastCGI: (dynamic) server
/opt/rt4/sbin/rt-server.fcgi started (pid 408)
[Tue Jul 23 15:52:05 2013] [info]:
rt-4.0.12-408-1374594725-665.16552-2...@lfm-software.com #16552/15723 -
Scrip 28 Notify Admin user - Reply
(/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:285)
[Tue Jul 23 15:52:05 2013] [info]:
rt-4.0.12-408-1374594725-665.16552-2...@lfm-software.com No recipients
found. Not sending. (/opt/rt4/sbin/../lib/RT/Interface/Email.pm:385)
[Tue Jul 23 15:52:05 2013] [info]:
rt-4.0.12-408-1374594725-1969.16552-5...@lfm-software.com #16552/15723 -
Scrip 52 Notify user - Reply
(/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:285)
[Tue Jul 23 15:52:05 2013] [info]:
rt-4.0.12-408-1374594725-1969.16552-5...@lfm-software.com No recipients
found. Not sending. (/opt/rt4/sbin/../lib/RT/Interface/Email.pm:385)
[Tue Jul 23 15:52:05 2013] [info]:
rt-4.0.12-408-1374594725-1733.16552-...@lfm-software.com #16552/15723 -
Scrip 5 On Correspond Notify AdminCcs
(/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:285)
[Tue Jul 23 15:52:05 2013] [info]:
rt-4.0.12-408-1374594725-1733.16552-...@lfm-software.com No recipients
found. Not sending. (/opt/rt4/sbin/../lib/RT/Interface/Email.pm:385)
[Tue Jul 23 15:52:05 2013] [info]:
rt-4.0.12-408-1374594725-1239.16552-...@lfm-software.com #16552/15723 -
Scrip 7 On Correspond Notify Other Recipients
(/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:285)
[Tue Jul 23 15:52:05 2013] [info]:
rt-4.0.12-408-1374594725-1239.16552-...@lfm-software.com No recipients
found. Not sending. (/opt/rt4/sbin/../lib/RT/Interface/Email.pm:385)
[Tue Jul 23 15:52:05 2013] [info]:
rt-4.0.12-408-1374594725-1758.16552-...@lfm-software.com #16552/15723 -
Scrip 6 On Correspond Notify Requestors and Ccs
(/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:285)
  2 [main] perl 1952 child_info_fork::abort: address space needed by
'cygcrypto-1.0.0.dll' (0x41) is already occupied
[Tue Jul 23 15:52:05 2013] [critical]:
rt-4.0.12-408-1374594725-1758.16552-...@lfm-software.com: Could not send
mail with command `/opt/rt4/etc/msmtp_wrapper -oi -t -ODeliveryMode=b
-OErrorMode=m -f lfm.t...@aveva.com`: open2: fork failed: Resource
temporarily unavailable at /opt/rt4/sbin/../lib/RT/Interface/Email.pm line
474.

Stack:
  [/usr/lib/perl5/site_perl/5.14/Carp.pm:100]
  [/usr/lib/perl5/5.14/IPC/Open3.pm:154]
  [/usr/lib/perl5/5.14/IPC/Open3.pm:242]
  

Re: [rt-users] How to update CF via scripted mySQL commands

2013-07-22 Thread scott.dalzell
Thanks for pointing that out. i think ill try to do the API route as i cant
afford to corrupt the database.

Can the RT API be used to modify a database that is not being used by RT

Just that my final goal is to modify a field in our Bugzilla database (also
MYsql) when an RT CF is given a bug number





--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/How-to-update-CF-via-scripted-mySQL-commands-tp54656p54676.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


Re: [rt-users] How to update CF via scripted mySQL commands

2013-07-19 Thread scott.dalzell
i have got abit further with this issue and i have got a perl script that
does what i need it to do and edit the mysl database, however when i add
this code into RT as a scrip i get the following error in the error.log.

[Fri Jul 19 12:38:40 2013] [error]: Scrip 491 Prepare failed: Global symbol
@row requires explicit package name at (eval 646) line 74.
Global symbol $sqlQuery requires explicit package name at (eval 646) line
74.
Global symbol @row requires explicit package name at (eval 646) line 75.
Global symbol $dbh requires explicit package name at (eval 646) line 87.
Global symbol $query_master2 requires explicit package name at (eval 646)
line 92.
Global symbol $sqlQuery requires explicit package name at (eval 646) line
98. (/opt/rt4/sbin/../lib/RT/Action/UserDefined.pm:65)
[Fri Jul 19 12:38:40 2013] [warning]: Use of uninitialized value $Default in
join or string at /opt/rt4/share/html/Elements/EditCustomFieldWikitext line
52. (/opt/rt4/share/html/Elements/EditCustomFieldWikitext:52)

i prosume this means i am missing some USE xyz's at the start of the
code(see below) to allow RT to understand all the variables like perl can
via the command line


---CODE-START ---

#!/usr/bin/perl -w
use DBI;
 
print Content-type: text/html\n\n;

#
###Set variables
#

my $db =[database name];
my $table =objectcustomfieldvalues;
my $ticket = 16552;
my $cf_RT = 12; #Bugzilla No in RT (Bug_No)
my $cf_Bug = 13; #RT no in Bugzilla(Ticket_No)
my $user = [username];
my $pass = [password];
my $host=[hostname];



###Setting all lines of code used to query mysql database

###Copy CF_RT (Bugzilla_NO) and update them in a temp table###

my $query_master1 =CREATE TEMPORARY TABLE temp_tbl SELECT * FROM
objectcustomfieldvalues WHERE objectid=$ticket and customfield = $cf_RT and
disabled=0;

my $query_master2 =UPDATE temp_tbl SET Customfield = $cf_Bug;

my $query_master3 =ALTER TABLE temp_tbl CHANGE ObjectId Content
CHAR(100),CHANGE Content ObjectId CHAR(100);

###Add updated values to new table
my $query_master4 =insert into objectcustomfieldvalues
(CustomField,ObjectType,ObjectId,SortOrder,Content,LargeContent,ContentType,ContentEncoding,Creator,Created,LastUpdatedBy,LastUpdated,Disabled)
Select
CustomField,ObjectType,ObjectId,SortOrder,Content,LargeContent,ContentType,ContentEncoding,Creator,Created,LastUpdatedBy,LastUpdated,Disabled
from temp_tbl;

my $query_master5 =DROP tABLE temp_tbl;


#
###Set Functions
#

sub querymysql 
{
#prapare then runs passed mysql commands via perl code
$sqlQuery  = $dbh-prepare($_[0])
or die Can't prepare $_[0]: $dbh-errstr\n;
$sqlQuery-execute
or die can't execute the query: $sqlQuery-errstr;
}

sub showtable 
{
#displays tables of previous query
while (@row= $sqlQuery-fetchrow_array()) {
my $tables = $row[0];
print $tables\n;
print \n\n;
}
}



#Code


###Connect to mysql database
$dbh = DBI-connect(DBI:mysql:$db:$host, $user, $pass);


###Update CF (RT_no) on bugzilla bug 
querymysql($query_master1);
querymysql($query_master2);
querymysql($query_master3);
querymysql($query_master4);
querymysql($query_master5);

$sqlQuery-finish;

exit(0);

---CODE-END---

thank you in advance

Scott



--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/How-to-update-CF-via-scripted-mySQL-commands-tp54656p54666.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


[rt-users] How to update CF via scripted mySQL commands

2013-07-18 Thread scott.dalzell
Hey guys

What i am trying to do is link 1 ticket CF (Bug_No) to another Ticket CF
(Ticket_No) by writing a script that will update the CF (Ticket_No) via the
mysql database when the CF (Bug_No) is updated

The reason i need it done in this manor is becasue this is a trial before
doing the same thing but between our RT and bugzilla systems where i will
have to update the CF(Ticket_No) in bugzilla via its mysql database on a
different server.

i already know how to do the custom donditions and manual update the mysql
databases for the action but how do i turn something like the following into
a script for mysql

where
objectid=16552 - test ticket used in example
customfield=12 - CF(Bug_No)
customfield=13 - CF(Ticket_No)

---
manual mysql commands
---
CREATE TEMPORARY TABLE temp_tbl SELECT * FROM objectcustomfieldvalues WHERE
objectid=16552 and customfield = '12';
UPDATE objectcustomfieldvalues set disabled=1 where objectid=16552 and
customfield=13;
UPDATE temp_tbl SET Customfield = 13;
select * from temp_tbl;
insert into objectcustomfieldvalues
(CustomField,ObjectType,ObjectId,SortOrder,Content,LargeContent,ContentType,ContentEncoding,Creator,Created,LastUpdatedBy,LastUpdated,Disabled)
Select
CustomField,ObjectType,ObjectId,SortOrder,Content,LargeContent,ContentType,ContentEncoding,Creator,Created,LastUpdatedBy,LastUpdated,Disabled
from temp_tbl;
DROP tABLE temp_tbl;
---

thank you in advanced

Scott



--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/How-to-update-CF-via-scripted-mySQL-commands-tp54656.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


Re: [rt-users] RT4 - Email Errors generated even when sent 'successfully'

2013-07-17 Thread scott.dalzell

i have now resolved my issue

i have been running some tests on the msmtp_Wrapper file and found that the
error disapeared if i reduced the file down to one email address (see below)

#
*msmtp_Wrapper - stripped down to 1 email address*
#!/bin/bash
USER=us...@company.com
export USER
/usr/sbin/msmtp.exe --from=us...@company.com -t -C
/opt/rt4/etc/msmtp_wrapper.conf
#

Looking into the file abit further i found i was missing a line at the end
of the file (see below)

#
*msmtp_Wrapper - Fixed*
#!/bin/bash
USER=us...@company.com
export USER
/usr/sbin/msmtp.exe --from=us...@company.com -t -C
/opt/rt4/etc/msmtp_wrapper.conf

USER=us...@company.com
export USER
/usr/sbin/msmtp.exe --from=us...@company.com -t -C
/opt/rt4/etc/msmtp_wrapper.conf

/usr/bin/logger -t RTmailer -p syslog.info -- CALL /usr/bin/msmtp -nt
$@ RETURNED $?
#

Once the below line was added to the file i no longer got the error messages
in RT4 or within the error.log

   /usr/bin/logger -t RTmailer -p syslog.info -- CALL /usr/bin/msmtp -nt
$@ RETURNED $? 

Thanks for all the help Kevin



--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/RT4-Email-Errors-generated-even-when-sent-successfully-tp54612p54652.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


Re: [rt-users] Linking a Transaction CF value to a Ticket CF value

2013-07-10 Thread scott.dalzell
Due to time constrains i have had to take a simpler approach to this issue
and go back to working with ticket obj instead of catching the details
dueing the transaction which i understand better at this point in time

i have created a new ticket CF ('Alert_Support_Notes') to store the users
comments when changing the 'Alert_SUpport' CF to 'Alert'.

i have then added to scrips linked to the 'Alert_Support' CF

1/ when the 'Alert_Support' CF is set to 'alert' it wil check the new
'Alert_Support_Notes' CF for a comment, if there is no comment it will enter
in warning message and will email the last person to update the ticket
instructing them to add a comment

2/ when the 'Alert_Support' CF is set to 'alert' it will email our support
team to alert them that there is a ticket that requires there attention

3/ When the 'Alert_Support' CF is cleared it will also clear the
'Alert_SUpport_Notes' CF

than you for all your help Kevin

Scott




--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/Linking-a-Transaction-CF-value-to-a-Ticket-CF-value-tp54546p54610.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


[rt-users] RT4 - Email Errors generated even when sent 'successfully'

2013-07-10 Thread scott.dalzell
I was wondering if anyone could help me with this issue.

I have setup RT4.0.12, using a Mysql 5.6.11.0 database under Cygwin

The issue is my RT system is having a good old moan whenever an email is
sent. it is adding errors onto the RT ticket and the error log, however, all
the emails are reaching there targets. The users can reply to any emails
from RT and the replys will be added to the ticket. and the same error
messages will be added to the log and the ticket

Can i make these errors stop appearing on the RT tickets (e.g. hide them) or
could someone help me track down the root casue of these errors

All errors and relevent files have been attached with email/passwords etc
remoted

thank you in advanced

*RT Error*
Wed Jul 10 16:33:11 2013The RT System itself - System error
Sending the previous mail has failed. Please contact your admin, they can
find more details in the logs


*Error log*

[Wed Jul 10 15:33:11 2013] [error]:
rt-4.0.12-13580-1373470372-461.16282-...@lfm-software.com:
`/opt/rt4/etc/msmtp_wrapper -oi -t -ODeliveryMode=b -OErrorMode=m -f
lfm.t...@aveva.com` exited with code 64
(/opt/rt4/sbin/../lib/RT/Interface/Email.pm:486)
[Wed Jul 10 15:33:11 2013] [critical]:
rt-4.0.12-13580-1373470372-461.16282-...@lfm-software.com: Could not send
mail with command `/opt/rt4/etc/msmtp_wrapper -oi -t -ODeliveryMode=b
-OErrorMode=m -f lfm.t...@aveva.com`:
rt-4.0.12-13580-1373470372-461.16282-...@lfm-software.com:
`/opt/rt4/etc/msmtp_wrapper -oi -t -ODeliveryMode=b -OErrorMode=m -f
lfm.t...@aveva.com` exited with code 64 at
/opt/rt4/sbin/../lib/RT/Interface/Email.pm line 487.

Stack:
  [/opt/rt4/sbin/../lib/RT/Interface/Email.pm:487]
  [/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:292]
  [/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:114]
  [/opt/rt4/sbin/../lib/RT/ScripAction.pm:232]
  [/opt/rt4/sbin/../lib/RT/Scrip.pm:475]
  [/opt/rt4/sbin/../lib/RT/Scrips.pm:188]
  [/opt/rt4/sbin/../lib/RT/Transaction.pm:201]
  [/opt/rt4/sbin/../lib/RT/Record.pm:1504]
  [/opt/rt4/sbin/../lib/RT/Ticket.pm:2297]
  [/opt/rt4/sbin/../lib/RT/Ticket.pm:2193]
  [/opt/rt4/sbin/../lib/RT/Interface/Web.pm:2019]
  [/opt/rt4/share/html/Ticket/Display.html:164]
  [/opt/rt4/share/html/Ticket/Update.html:300]
  [/opt/rt4/share/html/Ticket/autohandler:66]
  [/opt/rt4/sbin/../lib/RT/Interface/Web.pm:634]
  [/opt/rt4/sbin/../lib/RT/Interface/Web.pm:335]
  [/opt/rt4/share/html/autohandler:53]
(/opt/rt4/sbin/../lib/RT/Interface/Email.pm:491


msmtp_wrapper.txt
http://requesttracker.8502.n7.nabble.com/file/n54612/msmtp_wrapper.txt  
msmtp_wrapperconf.txt
http://requesttracker.8502.n7.nabble.com/file/n54612/msmtp_wrapperconf.txt  
Site_Config.txt
http://requesttracker.8502.n7.nabble.com/file/n54612/Site_Config.txt  



--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/RT4-Email-Errors-generated-even-when-sent-successfully-tp54612.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


Re: [rt-users] Linking a Transaction CF value to a Ticket CF value

2013-07-08 Thread scott.dalzell

Ah ok i see where the syntax error is coming from and your right its because
of a missing bracket.

I have now ran the trigger by replying to a ticket and setting the
'Alert_Support_T CF to 'Alert' and it produced the following error

*Error Log*
Stack:
  [/opt/rt4/sbin/../lib/RT/Interface/Email.pm:487]
  [/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:292]
  [/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:114]
  [/opt/rt4/sbin/../lib/RT/ScripAction.pm:232]
  [/opt/rt4/sbin/../lib/RT/Scrip.pm:475]
  [/opt/rt4/sbin/../lib/RT/Scrips.pm:188]
  [/opt/rt4/sbin/../lib/RT/Transaction.pm:201]
  [/opt/rt4/sbin/../lib/RT/Record.pm:1504]
  [/opt/rt4/sbin/../lib/RT/Ticket.pm:2297]
  [/opt/rt4/sbin/../lib/RT/Ticket.pm:2193]
  [/opt/rt4/sbin/../lib/RT/Interface/Web.pm:2019]
  [/opt/rt4/share/html/Ticket/Display.html:164]
  [/opt/rt4/share/html/Ticket/Update.html:300]
  [/opt/rt4/share/html/Ticket/autohandler:66]
  [/opt/rt4/sbin/../lib/RT/Interface/Web.pm:634]
  [/opt/rt4/sbin/../lib/RT/Interface/Web.pm:335]
  [/opt/rt4/share/html/autohandler:53]
(/opt/rt4/sbin/../lib/RT/Interface/Email.pm:491)
[Mon Jul  8 09:01:35 2013] [warning]: Couldn't load object RT::Transaction
#0 (/opt/rt4/sbin/../lib/RT/Interface/Web.pm:2684

*Script Cndition*

#Set my Variables
 my $txn = $self-TransactionObj;
 my $type = $txn-Type;
 my $cf = RT::CustomField-new( $self-CurrentUser );


#Test load CF Alert_Support_T
my ($id, $msg) = $cf-Load(Alert_Support_T); 
unless ($id) { 
RT-Logger-error(Unable to load Alert_Support_T: $msg); 
return 0; 
}
 
if ( $type eq 'Create' ) {
 # CF can be set on create
 return 0 unless
$txn-Creatorobj-FirstCustomFieldValue('Alert_Support_T') eq 'LFM Support
Required';

} 
elsif ( $type eq 'CustomField' ) {
 # CF can be changed later
 my $cf = RT::CustomField-new( $self-CurrentUser );
 $cf-Load( $txn-Field );
   
 return 0 unless $cf-Name eq 'Alert_Support_T';
 return 0 unless $txn-NewValue eq 'LFM Support Required';
 } else {
 return 0;
 }
 return 1;




--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/Linking-a-Transaction-CF-value-to-a-Ticket-CF-value-tp54546p54593.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


Re: [rt-users] Adding Customfields to QuickCreate Portlet

2013-07-05 Thread scott.dalzell
That would me great if you could

thank you



--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/Adding-Customfields-to-QuickCreate-Portlet-tp54565p54578.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


Re: [rt-users] How do you check the value of a Transaction CustomField

2013-07-04 Thread scott.dalzell
ah ok so that method wont work

what method can be used for Transaction CFs?



--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/How-do-you-check-the-value-of-a-Transaction-CustomField-tp54509p54558.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


Re: [rt-users] Linking a Transaction CF value to a Ticket CF value

2013-07-04 Thread scott.dalzell
The  if ( $type eq 'Create' ) {  elsif ( $type eq 'CustomField' ) {
section dont work correctly as there not returning the corect values out
regardless if Alert_Support_T is set to 'Alert' or 'null'

The 'Create' section always returns 1 and continualy sends emails and the
'custonfield' section always returns 0

Could you explain to me how to add the logger (below) as i get a sintax
error when i try to add it refering to 'Alert_Support_T' 

You should always check Load 
my ($id, $msg) = $cf-Load(Alert_Support_T); 
unless ($id) { 
RT-Logger-error(Unable to load Foo: $msg; 
return 0; 
} 





--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/Linking-a-Transaction-CF-value-to-a-Ticket-CF-value-tp54546p54559.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


[rt-users] Adding Customfields to QuickCreate Portlet

2013-07-04 Thread scott.dalzell
Hi

I am now trying to add a global ticket CF to the homepage QuickCreate
Portlet

i have have followed the wiki (below) and my custom field will not appear
when i view the QuickTicket Poerlet
(http://requesttracker.wikia.com/wiki/QuickTicket#Add_custom_fields_to_portlet) 

below are why current Quickticket and QuckTicketCustomField files as set out
in the above wiki

thank you in advance

*Quickticket*

%##
%#Table Setup
%##

div class=quick-ticket
| /Widgets/TitleBox, title = loc('TEST - Quick ticket creation (Better
edition!) - Dont Touch!!') 
form
method=quot;postquot;
action=quot;lt;%RT-Config-Get('WebPath')%/index.html
% $m-callback(CallbackName = 'InFormElement');

input type=hidden class=hidden name=QuickTicket value=1 /

%##
%#Table Layout and Formatting
%##


COLGROUP align=right
COLGROUP align=right
COLGROUP align=left
COLGROUP align=centre


%##
%#Table Data - Basics
%##

Basics: Subject:
input type=text size=65 name=Subject /


Requestors:
input type=text size=65 name=Subject /


Queue:
 /Elements/SelectNewTicketQueue, Name = 'Queue' 

Owner:
select colspan=1 type=select name=Owner  
option value=quot;lt;%$session{'CurrentUser'}-id%
selected=selected|/lMe/amp;/option
option value=quot;lt;%RT-Nobody-id%%loc('Nobody')%/option
/select




Content:
textarea name=Content cols=50 rows=3/textarea




%##
%#Table Data - CustomFields
%##

Custom Fields:

Product:

select type=select name=Product,Default = -
option -/option 
option LFM Server/option
option LFM Gateway/option 
option LFM NetView/option  



Version:

select type=select name=Product,Default = -
option -/option 
option 4.1.00.17/option
option 4.1.10.01/option 
option 4.2.00.00/option  




*   Alert_Support:



*




%##
%#Table End - Create Ticket
%##

 /Elements/Submit, Label = loc('Create') 
/form
/amp;
/div



*QuickTicketCustomFields*
 /Ticket/Elements/EditCustomFields, %ARGS, QueueObj = $QueueObj, InTable
= 1  
 /Ticket/Elements/EditTransactionCustomFields, %ARGS, QueueObj =
$QueueObj, InTable = 1 


%init
my $Queue = $ARGS{Queue};
my $QueueObj = RT::Queue-new($session{'CurrentUser'});
$QueueObj-Load($Queue) || Abort(loc(Queue could not be loaded.));
/%init










--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/Adding-Customfields-to-QuickCreate-Portlet-tp54565.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


Re: [rt-users] Adding Customfields to QuickCreate Portlet

2013-07-04 Thread scott.dalzell
Sorry the reply ate my code but here is the problem part

   Alert_Support:
   
 
 
 



--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/Adding-Customfields-to-QuickCreate-Portlet-tp54565p54567.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


Re: [rt-users] How do you check the value of a Transaction CustomField

2013-07-03 Thread scott.dalzell
Thank you for your quick response

Ok so i am now trying to create a custom condition for my script to detect
if the Transaction Custom Field (Alert_Support_T) has been set to Alert
the CF

however it is not triggering when i set the CF in the transaction to alert

any ideals where im going wrong

-
Custom Condition
-
my $trans = $self-TransactionObj; 
my $ticket = $self-TicketObj; 

if ($trans-Type eq 'CustomField') 
{my $cf = new RT::CustomField($RT::SystemUser); 
$cf-LoadByName(Queue = $trans-QueueObj-id,Name = Alert_Support_T); 
return 0 unless $cf-id; 

if ($trans-Field == $cf-id  
$trans-NewValue eq Alert) 
{ 
return 1; 
} 
} 
return 0;
-
 



--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/How-do-you-check-the-value-of-a-Transaction-CustomField-tp54509p54540.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


Re: [rt-users] How do you check the value of a Transaction CustomField

2013-07-03 Thread scott.dalzell
Just a note the above works for the Ticket Custom Field if i change the 

$cf-LoadByName(Queue = $trans-QueueObj-id,Name = Alert_Support_T); 
to
cf-LoadByName(Queue = $ticket-QueueObj-id,Name = Alert_Support); 




--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/How-do-you-check-the-value-of-a-Transaction-CustomField-tp54509p54541.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


[rt-users] Linking a Transaction CF value to a Ticket CF value

2013-07-03 Thread scott.dalzell
I currently have 2 customfields assosated with my tickets. Both will be used
to highlight a ticket to our support team when set to 'Alert'.

Currently the CF on the ticket is used to updates the required tables and
notify support etc but having a CF on the Transaction would make it easyer
for the user to Alert support and give a description of the issue as many
times the user has forgoten to do this 

Ticket CF - 'Alert_Support'
Trans CF - 'Alert_Support_T'

what i want to do is to create a script that will detect when the
Alert_Support_T CF is updated to 'Alert' and then update the
Alert_Support CF to 'Alert' to allow all the aproprate tables to update to
highlight the ticket to the support team

I have been trying for serveral days to get this working but as im new to RT
i feel like im missing something straight foward

I currently have the following script

Descrition - ZZZ - Test Alert_Support_T trigger
Condition - User Defined
Action  - User Defined
Template - Global Template - Blank
Stage  - TransactionCreate

###Custom Conditions###

#Set my Variables
 my $trans = $self-TransactionObj;
 my $type = $trans-Type;

#Check CustomField on Create ticket
 if ( $type eq 'Create' ) {
 return 0 unless $trans-FirstCustomFieldValue('Alert_Support_T') eq
'Alert';
 } 

#check Customfield on ticket update
elsif ( $type eq 'CustomField' ) {
 # CF can be changed later
 my $cf = RT::CustomField-new( $self-CurrentUser );
 $cf-Load( $trans-Field );
 return 0 unless $cf-Name eq 'Alert_Support_T';
 return 0 unless $trans-NewValue eq 'Alert';
 } else {
 return 0;
 }
 return 1;


###Custom Action###

#Set my Variables
 my $ticket = $self-TicketObj;

#CODE - update CF
$ticket-AddCustomFieldValue( Field = 'Alert_Support', Value = 'Alert' );

return 1;

###Custom Action###

return 1;


i am under the impresion that the script is failing to trigger so i figure
there is an issue with the custom conditions but i cant figure out where

if you could give me any help on this issue it would be a great help

thank you



--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/Linking-a-Transaction-CF-value-to-a-Ticket-CF-value-tp54546.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


[rt-users] How do you check the value of a Transaction CustomField

2013-07-02 Thread scott.dalzell
Hi

How do you check the value of a Transaction CustomField? 

im looking to create a script that will check a CF on the ticket transaction
and if it equals Alert it will set a Ticket CF to the same value.

This is to allow our in the field support teams to more easily highlight
tickets to our main support team and to give a descrition of the issue. 






--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/How-do-you-check-the-value-of-a-Transaction-CustomField-tp54509.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


[rt-users] 1 email address to control tickets on 2 different RT Servers

2013-05-30 Thread scott.dalzell
We currently have 2 RT servers on site, one running RT3 (ticket numbers
1-11,000) and another running RT4 (ticket numbers 15000+).

We are planning to phase out the RT3 machine but in the mean time I want
both RT machines to be accessed via the same email address as to hide this
phase out from our users when the RT4 machine goes live

Ideally I would like RT to divert all emails relating to ticket numbers
between 1-14999 to our RT3 machine and anything above that to our RT4
machine. I would also like any new tickets to be created on the RT4 machine
also

Does anyone know of a way to get  RT to behave in this way when using
fetchmail?

Any help would be greatly appreciated




--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/1-email-address-to-control-tickets-on-2-different-RT-Servers-tp54116.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


-- 
RT Training in Seattle, June 19-20: http://bestpractical.com/training