[rt-users] Accessing asset data

2016-12-22 Thread StreatsAhead
Hi all,

I'm trying to make some custom functionality for an asset, I need to
automatically update the value of one custom field of an asset when another
custom field on the same asset is changed. I took a look at using scrips but
couldn't get them to fire when working with assets. I'm now thinking it
might be better to have a ticket workflow instead. The objective is:
We have a bunch of water meters, we need to update the readings in RT every
now and then compile a report at the end of each year.
A few calculations need to be made on the readings and stored against the
asset.
Could someone point me in the right direction for this project?

Thanks!
Matt



--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/Accessing-asset-data-tp63221.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


[rt-users] rt-crontool returns "No recipients found. Not sending."

2016-12-22 Thread Alex Hall
Hi all,
Further to my rt-crontool question about notifying ticket owners of
untouched tickets, I've made a bit of progress in that I'm getting a new
error. I tried adding
--transaction first
to the crontool call, and that seemed to do something. Now, I'm getting an
error similar to:

[17710] [Thu Dec 22 21:04:01 2016] [info]: <
rt-4.4.1-17710-1482440641-776.656-...@example.com> No recipients found. Not
sending. (/opt/rt4/bin/../lib/RT/Interface/Email.pm:806)

My actions are:

--action RT::Action::Notify
--action-arg RT::Action::NotifyOwnerOrAdminCc
(also tried)
--action-arg owner

I don't know where this address is coming from, or what it means, but
clearly some address is being found. Why would it say there are no
recipients found, then? The ticket requestor is the same as the owner,
because we have our RT set up to make that happen on ticket creation, if
that will be a problem. What might I be missing? I'm so close to having
this working! RT4.4.1, Debian 8. Thanks!

-- 
Alex Hall
Automatic Distributors, IT department
ah...@autodist.com


[rt-users] Search broken

2016-12-22 Thread Jesse Maseto
Hello,

I've been trying to figure out a way to create a new search that will
exclude a group in RT.

I've tried adding this to my searches.

RequestorGroup.id NOT LIKE 123456

RequestorGroup.id != 123456

I keep getting this error.

There was an error parsing your search query: *Invalid RequestorGroup Op:
NOT LIKE*.

and

There was an error parsing your search query: *Invalid RequestorGroup Op:
!=*.


Is this a bug?

Thanks for your help.
-JesseM



Jesse Maseto
Head of Support
ByWater Solutions
Support & Consulting for OSS
Office - Stratford,CT
T/F 888.900.8944
http://bywatersolutions.com
je...@bywatersolutions.com


Re: [rt-users] Postgresql default isolation level (was Re: mysql DB engine ndbdcluster)

2016-12-22 Thread Václav Ovsík
On Wed, Dec 21, 2016 at 06:38:08PM +0100, Václav Ovsík wrote:
>... 
>  
>  * default_transaction_isolation = 'serializable'
>- I tried the action many times, but Pg is silent - nothing appears
>  in its log file and everything seems normal.

Sorry, this is not true. I did more thorough testing today. I did experiments
on one test ticket and as the history of ticket grows, the probability of the
bug increases. Now it is almost certain the problem will occurs.
Isolation level 'serializable' behaves like 'repeatable read'. So the summary 
is:

===
'commited read': -> deadlock, application outputs error:

Comments added
Could not change owner: Could not update column Owner: Owner could not be 
set to 102.

Postgres log:

 2016-12-22 13:18:18 CET [26070-1] rt_rt@rt ERROR:  deadlock detected
 2016-12-22 13:18:18 CET [26070-2] rt_rt@rt DETAIL:  Process 26070 waits for 
ShareLock on transaction 32889; blocked by process 26097.
 Process 26097 waits for ShareLock on transaction 32890; blocked by 
process 26070.
 Process 26070: UPDATE Tickets SET Owner=$1 WHERE id=$2 
 Process 26097: INSERT INTO GroupMembers (LastUpdatedBy, Creator, 
Created, GroupId, MemberId, LastUpdated) VALUES ($1, $2, $3, $4, $5, $6)
 2016-12-22 13:18:18 CET [26070-3] rt_rt@rt HINT:  See server log for query 
details.
 2016-12-22 13:18:18 CET [26070-4] rt_rt@rt CONTEXT:  while updating tuple 
(4509,284) in relation "tickets"
 2016-12-22 13:18:18 CET [26070-5] rt_rt@rt STATEMENT:  UPDATE Tickets SET 
Owner=$1 WHERE id=$2 



===
'repeatable read'
'serializable': -> application output normal status:

Comments added
Owner changed from eva to zito

Postgres log:
 2016-12-22 13:26:36 CET [31696-1] rt_rt@rt ERROR:  could not serialize access 
due to concurrent update
 2016-12-22 13:26:36 CET [31696-2] rt_rt@rt STATEMENT:  SELECT * FROM Tickets 
WHERE id = $1 FOR UPDATE
 2016-12-22 13:26:36 CET [31696-3] rt_rt@rt ERROR:  current transaction is 
aborted, commands ignored until end of transaction block
 2016-12-22 13:26:36 CET [31696-4] rt_rt@rt STATEMENT:  INSERT INTO 
Transactions (Type, Creator, ObjectId, NewValue, Field, Data, ObjectType, 
NewReference, ReferenceType, Created, OldReference, OldValue) VALUES ($1, $2, 
$3, $4, $5, $6, $7, $8, $9, $10, $11, $12)
 2016-12-22 13:26:36 CET [31696-5] rt_rt@rt ERROR:  current transaction is 
aborted, commands ignored until end of transaction block
 2016-12-22 13:26:36 CET [31696-6] rt_rt@rt STATEMENT:  SELECT  * FROM 
Transactions WHERE id = $1
 2016-12-22 13:26:36 CET [31696-7] rt_rt@rt ERROR:  current transaction is 
aborted, commands ignored until end of transaction block
 2016-12-22 13:26:36 CET [31696-8] rt_rt@rt STATEMENT:  SELECT  * FROM Tickets 
WHERE id = $1
 2016-12-22 13:26:36 CET [31696-9] rt_rt@rt ERROR:  current transaction is 
aborted, commands ignored until end of transaction block
 2016-12-22 13:26:36 CET [31696-10] rt_rt@rt STATEMENT:  SELECT  * FROM 
Transactions WHERE id = $1
 2016-12-22 13:26:36 CET [31696-11] rt_rt@rt ERROR:  current transaction is 
aborted, commands ignored until end of transaction block
 2016-12-22 13:26:36 CET [31696-12] rt_rt@rt STATEMENT:  SELECT main.* FROM 
Scrips main JOIN ObjectScrips ObjectScrips_1  ON ( ObjectScrips_1.Scrip = 
main.id ) JOIN ScripConditions ScripConditions_2  ON ( ScripConditions_2.id = 
main.ScripCondition )  WHERE (ObjectScrips_1.ObjectId = '0') AND 
(ObjectScrips_1.Stage = 'TransactionCreate') AND 
(ScripConditions_2.ApplicableTransTypes LIKE '%Comment%' OR 
ScripConditions_2.ApplicableTransTypes LIKE '%Any%') AND (main.Disabled = '0')  
 GROUP BY main.id   ORDER BY MIN(ObjectScrips_1.SortOrder) ASC 
 2016-12-22 13:26:36 CET [31696-13] rt_rt@rt ERROR:  current transaction is 
aborted, commands ignored until end of transaction block
 2016-12-22 13:26:36 CET [31696-14] rt_rt@rt STATEMENT:  SELECT COUNT(DISTINCT 
main.id) FROM Scrips main JOIN ObjectScrips ObjectScrips_1  ON ( 
ObjectScrips_1.Scrip = main.id ) JOIN ScripConditions ScripConditions_2  ON ( 
ScripConditions_2.id = main.ScripCondition )  WHERE (ObjectScrips_1.ObjectId = 
'0') AND (ObjectScrips_1.Stage = 'TransactionCreate') AND 
(ScripConditions_2.ApplicableTransTypes LIKE '%Comment%' OR 
ScripConditions_2.ApplicableTransTypes LIKE '%Any%') AND (main.Disabled = '0') 
 2016-12-22 13:26:36 CET [31696-15] rt_rt@rt ERROR:  current transaction is 
aborted, commands ignored until end of transaction block
 2016-12-22 13:26:36 CET [31696-16] rt_rt@rt STATEMENT:  SELECT main.* FROM 
Scrips main JOIN ObjectScrips ObjectScrips_1  ON ( ObjectScrips_1.Scrip = 
main.id ) JOIN ScripConditions ScripConditions_2  ON ( ScripConditions_2.id = 
main.ScripCondition )  WHERE (ObjectScrips_1.ObjectId = '0') AND 
(ObjectScrips_1.Stage = 'TransactionCreate') AND