[rt-users] custom field change is two transactions
Hello, I want to subtact $txn->NewValue from $txn->OldValue but they are not both set in the same transaction When i change a custom field value, it seems to be two transactions, one removing the old value and another adding the new value, but it seems the new value is added before the new value is removed here i change a value from 8 to 5 [19537] [Sat Sep 10 15:49:11 2016] [debug]: Committing scrip #21 on txn #756 of ticket #24 (/var/www/sm-rt/sbin/../lib/RT/Scrips.pm:293) [19537] [Sat Sep 10 15:49:11 2016] [error]: Newvalue=5 Oldvalue= ((eval 546):2) [19537] [Sat Sep 10 15:49:11 2016] [debug]: Committing scrip #21 on txn #757 of ticket #24 (/var/www/sm-rt/sbin/../lib/RT/Scrips.pm:293) [19537] [Sat Sep 10 15:49:11 2016] [error]: Newvalue= Oldvalue=8 ((eval 549):2) condition is on custom field change custom action code my $txn = $self->TransactionObj; $RT::Logger->error("Newvalue=".$txn->NewValue." Oldvalue=".$txn->OldValue); I see other custom field changes that are from Yes to No showing both new and old values in the same transaction. eg [19537] [Sat Sep 10 15:49:11 2016] [debug]: Committing scrip #21 on txn #754 of ticket #24 (/var/www/sm-rt/sbin/../lib/RT/Scrips.pm:293) [19537] [Sat Sep 10 15:49:11 2016] [error]: Newvalue=Yes Oldvalue=No ((eval 539):2) what's going on? I'm confused! w. -- --- Richard Wood (Woody) Managing Director Wild Thing Safaris Ltd. UK: 2B Habbo St, Greenwich, London Dar es Salaam: 5 Ethan St, Mbezi beach Arusha: 3 Ebeneezer Rd, Njiro PO BOX 34514 DSM Office: +255 (0) 222 617 166 Office Mobile: +255 (0) 773 503 502 Direct: +255 742 373 327 Skype: woody1tz http://wildthingsafaris.com - RT 4.4 and RTIR training sessions, and a new workshop day! https://bestpractical.com/training * Boston - October 24-26 * Los Angeles - Q1 2017
[rt-users] Receiving two emails per ticket update, and original messages in ticket?
Hi list, Now that emails are sorted (save that one queue I emailed the list about yesterday) we're starting to test RT for real. There are two problems I noticed straight away. First, I'm getting two replies for each email reply. That is, if I open a ticket in IT and three people get it, each time one of them responds via email, I get two emails with the same content and from the same sender. The only difference is that one is just the reply, while the other includes the ticket URL at the top. Is there an right I can revoke to stop this happening twice? I have a feeling that it's going to happen to all queue admins, but I can't confirm that yet. The other problem is in the web UI. If I look at the replies, I see the reply sent in via email, but then I see the entire original message below it. Needless to say, this clutters up the ticket. How can I stop this from happening? OSTicket uses a specific line of text below which emails are cut off, something like "--reply above this line--". Is there a similar mechanism in RT? - RT 4.4 and RTIR training sessions, and a new workshop day! https://bestpractical.com/training * Boston - October 24-26 * Los Angeles - Q1 2017
[rt-users] SimpleSearch returning all users
Hi all, I've created a scrip who's objective is to search users on create to find one with a matching domain and CF.Consultant set, but the SimpleSearch returns all users my $Users = RT::Users->new($RT::SystemUser); $Users->SimpleSearch( Term => $Domain, # Return => 'CF.Consultant' ); I have Set($UserSearchFields, { EmailAddress => 'LIKE', Name => 'STARTSWITH', RealName => 'LIKE', }); I hashed out CF.Consultant as it gives the error [642] [Sat Sep 10 05:35:24 2016] [critical]: Possible SQL injection attack: CF.Consultant != (/var/www/sm-rt/sbin/../lib/RT/SearchBuilder.pm:898) [642] [Sat Sep 10 05:35:24 2016] [critical]: Possible SQL injection attack: CF.Consultant IS NOT (/var/www/sm-rt/sbin/../lib/RT/SearchBuilder.pm:898) thanks in advance Woody. -- --- Richard Wood (Woody) Managing Director Wild Thing Safaris Ltd. UK: 2B Habbo St, Greenwich, London Dar es Salaam: 5 Ethan St, Mbezi beach Arusha: 3 Ebeneezer Rd, Njiro PO BOX 34514 DSM Office: +255 (0) 222 617 166 Office Mobile: +255 (0) 773 503 502 Direct: +255 742 373 327 Skype: woody1tz http://wildthingsafaris.com - RT 4.4 and RTIR training sessions, and a new workshop day! https://bestpractical.com/training * Boston - October 24-26 * Los Angeles - Q1 2017