Re: [rt-users] Default Value for User Custom Fields

2017-03-07 Thread Woody - Wild Thing Safaris

I added "Users" to line 2016 in CustomField.pm

return 0 unless $self->LookupType =~ 
/RT::(?:Ticket|Transaction|User)$/;


and it seems to behave as expected. But RT::Users must have been left 
out for a reason?


w.


On 03/03/17 10:46, Woody - Wild Thing Safaris wrote:

sorry, 4.4.0


On 02/03/17 23:44, Matt Zagrabelny wrote:

What version of RT are you using?

-m

On Thu, Mar 2, 2017 at 1:46 PM, Woody - Wild Thing Safaris
<wo...@wildthingsafaris.com> wrote:

Hi RT Folks,

Am i missing something? I see no option to select a "default value" for
"select one value" type custom fields if they are of lookuptype 
RT::User?


i tested and if it's RT::Ticket - default appears, but RT::User - 
that input

field has disappeared?

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 https://bestpractical.com/training
* Paris - April 24-26, 2017






--

---

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 https://bestpractical.com/training
* Paris - April 24-26, 2017


[rt-users] Reload Config on the fly

2017-03-06 Thread Woody - Wild Thing Safaris

Hello,

I'm using 4.4.0, and i've edited Admin/CustomField to allow choosing the 
CustomFieldGrouping. I'm guessing that at some point the grouping will 
be stored in the CustomField table, but for now, it's a config option.


If i change the grouping of a CF, or add a new CF i can rewrite the file 
with the CustomFieldGroupings config option in (it's in it's own file in 
RT_SiteConfig.d).


Is there a way of reloading the config on the fly by just running 
RT->LoadConfig and that new config be used for all future requests?


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 https://bestpractical.com/training
* Paris - April 24-26, 2017


Re: [rt-users] Default Value for User Custom Fields

2017-03-02 Thread Woody - Wild Thing Safaris

sorry, 4.4.0


On 02/03/17 23:44, Matt Zagrabelny wrote:

What version of RT are you using?

-m

On Thu, Mar 2, 2017 at 1:46 PM, Woody - Wild Thing Safaris
<wo...@wildthingsafaris.com> wrote:

Hi RT Folks,

Am i missing something? I see no option to select a "default value" for
"select one value" type custom fields if they are of lookuptype RT::User?

i tested and if it's RT::Ticket - default appears, but RT::User - that input
field has disappeared?

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 https://bestpractical.com/training
* Paris - April 24-26, 2017




--

---

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 https://bestpractical.com/training
* Paris - April 24-26, 2017


[rt-users] Default Value for User Custom Fields

2017-03-02 Thread Woody - Wild Thing Safaris

Hi RT Folks,

Am i missing something? I see no option to select a "default value" for 
"select one value" type custom fields if they are of lookuptype RT::User?


i tested and if it's RT::Ticket - default appears, but RT::User - that 
input field has disappeared?


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 https://bestpractical.com/training
* Paris - April 24-26, 2017


Re: [rt-users] Where are saved searches stored in the db

2017-01-10 Thread Woody - Wild Thing Safaris

Thanks Emmanuel,

I see the "Content" is encoded, which is why it didn't come up with my 
grep.


How do i decode/encode it?

w.


On 10/01/17 15:19, Emmanuel Lacour wrote:

Le 10/01/2017 à 12:53, Woody - Wild Thing Safaris a écrit :

Hi all,

I was expecting to find a database table called "SavedSearches" but
there isn't one. I have a saved search that contains the string
'__CurrentUser_' but if i dump the DB and grep for that, i don't find it.

Anyone know where saved searches are?

In table "Attributes".



--

---

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-users] Where are saved searches stored in the db

2017-01-10 Thread Woody - Wild Thing Safaris

Hi all,

I was expecting to find a database table called "SavedSearches" but 
there isn't one. I have a saved search that contains the string 
'__CurrentUser_' but if i dump the DB and grep for that, i don't find it.


Anyone know where saved searches are?

thanks

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-users] external templates

2016-12-19 Thread Woody - Wild Thing Safaris

Hi All,

I've searched long and hard, but to my surprise not found anything that 
relates to external templates - maybe it's so trivially obvious that the 
question is a non question, but i have to ask it.


i have externalised customfields, conditions, actions etc. but 
templates, especially those containing perl code are still in a textarea 
input box.


what would anyone recommend as a solution to this.

I'm almost expecting a one-liner like:

{ import Templates/MyTemplate }

if import were such a concept in perl

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-users] CommandByEmail Set CustomField on Create

2016-12-10 Thread Woody - Wild Thing Safaris

Hi All,

I am trying to create a ticket by email with various fields set.

I have set headers

X-RT-Command: CustomField{PNR}: 12345678

and the lodges show

Running CommandByMail as a...@b.cm 
(/var/www/xxx/local/plugins/RT-Extension-CommandByMail/lib/RT/Extension/CommandByMail.pm:309)
[2482] [Sat Dec 10 17:05:33 2016] [debug]: Found pseudoheader: 
CustomField{PNR} => 12345678


but it does not set the field, and no error shown.

I am sure it's a rights issue, but i've set "Everyone" SeeCustomField 
and ModifyCustomField at CF level and Queue level, and even global 
level, but it does not get set


any hints?

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
* Los Angeles - January 9-11 2017


Re: [rt-users] Permissions on Customfield for CommandByEmail

2016-12-09 Thread Woody - Wild Thing Safaris
pls ignore. those CF's are not the ones needing updating. something else 
is up



On 09/12/16 20:49, Woody - Wild Thing Safaris wrote:

HI All,

I'm trying to set a custom field on create using the headers

X-RT-Command: CF.{PNR}: 12345678

X-RT-Command: CF.{Surname}: Bloggs

logs show:

[7552] [Fri Dec  9 17:35:30 2016] [debug]: Got command 
customfield{pnr} => 12345678 
(/var/www/xxx/local/plugins/RT-Extension-CommandByMail/lib/RT/Extension/CommandByMail.pm:383)
[7552] [Fri Dec  9 17:35:30 2016] [debug]: Got command 
customfield{surname} => Bloggs 
(/var/www/xxx/local/plugins/RT-Extension-CommandByMail/lib/RT/Extension/CommandByMail.pm:383)
[7552] [Fri Dec  9 17:35:31 2016] [debug]: Permission denied. User 
#469290 has no SeeCustomField right on CF #37 
(/var/www/sxxx/sbin/../lib/RT/CustomField.pm:1053)
[7552] [Fri Dec  9 17:35:31 2016] [debug]: Permission denied. User 
#469290 has no SeeCustomField right on CF #83 
(/var/www/xxx/sbin/../lib/RT/CustomField.pm:1053)


i actually want to "set initial value" for the custom field

i have granted "Everyone" the SeeCustomField and ModifyCustomField 
right for both fields.


I have also granted "SeeCustomField" and "ModifyCustomField" to 
Everyone for the Queue.


Is there a higher ranking right that i need for that right to exist? 
or is there a "set initial value" right somewhere?


thanks, as always, in advance

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
* Los Angeles - January 9-11 2017


[rt-users] Permissions on Customfield for CommandByEmail

2016-12-09 Thread Woody - Wild Thing Safaris

HI All,

I'm trying to set a custom field on create using the headers

X-RT-Command: CF.{PNR}: 12345678

X-RT-Command: CF.{Surname}: Bloggs

logs show:

[7552] [Fri Dec  9 17:35:30 2016] [debug]: Got command customfield{pnr} 
=> 12345678 
(/var/www/xxx/local/plugins/RT-Extension-CommandByMail/lib/RT/Extension/CommandByMail.pm:383)
[7552] [Fri Dec  9 17:35:30 2016] [debug]: Got command 
customfield{surname} => Bloggs 
(/var/www/xxx/local/plugins/RT-Extension-CommandByMail/lib/RT/Extension/CommandByMail.pm:383)
[7552] [Fri Dec  9 17:35:31 2016] [debug]: Permission denied. User 
#469290 has no SeeCustomField right on CF #37 
(/var/www/sxxx/sbin/../lib/RT/CustomField.pm:1053)
[7552] [Fri Dec  9 17:35:31 2016] [debug]: Permission denied. User 
#469290 has no SeeCustomField right on CF #83 
(/var/www/xxx/sbin/../lib/RT/CustomField.pm:1053)


i actually want to "set initial value" for the custom field

i have granted "Everyone" the SeeCustomField and ModifyCustomField right 
for both fields.


I have also granted "SeeCustomField" and "ModifyCustomField" to Everyone 
for the Queue.


Is there a higher ranking right that i need for that right to exist? or 
is there a "set initial value" right somewhere?


thanks, as always, in advance

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
* Los Angeles - January 9-11 2017


[rt-users] ForwardFromUser doesn't remove subject tag, sets reply-to to queue address

2016-11-17 Thread Woody - Wild Thing Safaris

Hello,

I am under the impression from the docco that RT_Config 
ForwardFromUser=1 should remove the subject tag, but it isn't removed if 
i forward a requestor's correspondence (or maybe all email UI 
correspondence) - it uses the full subject of the requestor's 
correspondence that naturally includes the tag. It looks like the docco 
should say "does not add a subject tag", since correspondence made from 
the web UI does not have the tag.


Forwarding correspondence sets the "reply-to" header, so replies still 
go to the RT queue. not to the user.


The danger is that someone forward a mail out of RT, but then all the 
replies go back into RT and hence to the requestor, which is probably 
undesirable, as the message is forwarded out of RT.


Adding the following to both global forward templates solves this

Subject: { $Ticket->Subject }
Reply-To: { $ForwardTransaction->CreatorObj->EmailAddress }

did i miss something, or misunderstand something?

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
* Los Angeles - January 9-11 2017


[rt-users] unexpected behaviour with RT->System->SubjectTag

2016-09-15 Thread Woody - Wild Thing Safaris

Hello,

Not a question, but an observation.

I have noticed that in Email.pm the RT->System->SubjectTag returns all 
subject tags of all queues, even if they are disabled. I would have 
expected it to only show enabled queues by default.


The line $queues->Limit( FIELD => 'SubjectTag', OPERATOR => 'IS NOT', 
VALUE => 'NULL' );

does not seem to prevent an empty tag being returned. I had to put

next unless $tag;

in Email.pm in the foreach loop to prevent this

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] custom field change is two transactions

2016-09-10 Thread Woody - Wild Thing Safaris

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] SimpleSearch returning all users

2016-09-10 Thread Woody - Wild Thing Safaris

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


[rt-users] get list of dashboards

2016-09-02 Thread Woody - Wild Thing Safaris

Hi all,

I'm trying to redirect the login page to the first dashboard in the 
user's home menu.


I've put the callback in autohandler/SuccessfulLogin and if i set 
$dashid manually it redirects correctly.


I've tried two ways of getting the dashboard list copied from the 
codebase in Elements/ShowDashboards or ElemantsListOfDashboards and 
while the callback runs ok, clearly $dashboards does not contain any 
dashboards!


cheers

<%INIT>
use RT::Dashboards;
#my $sys = RT::System->new( $session{'CurrentUser'} );
#my $dashboards = RT::Dashboards->new( $RT::SystemUser );
#$dashboards->LimitToPrivacy('RT::System-' . $sys->id);

my $dashboards=RT::Dashboards->new($session{'CurrentUser'});
my $dashboard=$dashboards->Next;
my $dashid=$dashboard->Id;
#my $dashid=12;
$$RedirectTo="/Dashboards/$dashid";

<%ARGS>
$RedirectTo  => undef


--

---

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] applying a CustomField to a queue in perl

2016-08-24 Thread Woody - Wild Thing Safaris

I'm at a loss!

I've created my custom field, i've given various groups rights to it, 
but i can't apply it to a queue, either individually, or global.


I think i have the right method:

$CFObj->AddToObject($QueueObj)

but nada.

How can i "apply" the CF to a queue, and how to apply globally to all 
queues?


thanks!

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


Re: [rt-users] manipulate correspond content in history

2016-08-20 Thread Woody - Wild Thing Safaris

Hi Matt,

thanks. Totally out of my depth. At least I know to give up on that one!

w.


On 19/08/16 15:49, Matt Zagrabelny wrote:

Hi Woody,

On Fri, Aug 19, 2016 at 7:26 AM, Woody - Wild Thing Safaris
<wo...@wildthingsafaris.com> wrote:

HI all,

My correspond scrip adds a table of CF values to the correspond email from
the template, and sends to the client. I would like those same changes
appended to the transaction content that appears in the history, so it
matches what was sent to the client and we know easily what was sent.

to test i have made a scrip, on correspond, custom action, template blank

action is

my $content = $self->TransactionObj->ContentObj->Content;
$content .= "SOME OTHER STUFF";
$self->TransactionObj->ContentObj->SetContent($content);

no errors, but the content is not changed

The Txn already happened and its content is immutable - sort of. That
is, transactions (txns) are the atomic unit of data in RT. Those are
the things that make sure the paper trail exists for all the other
objects (users, tickets, queues, etc.)

That said, there is enough rope to do what you want. I don't know
exactly the procedure because I haven't implemented your use-case.

You'll want to expose the Transaction's parent's _Set method. In a
local module that gets loaded have some code like:

# {{{
# paper-trail auditor backdoor :)
# Needed to change the txn's content
package RT::Transaction;

use strict;
no warnings qw(redefine);

sub _Set {
 my $self = shift;
 $self->SUPER::_Set(@_);
}
# }}}

There may be more steps beyond this, but I think you'll need this at a minimum.

-m




--

---

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] manipulate correspond content in history

2016-08-19 Thread Woody - Wild Thing Safaris

HI all,

My correspond scrip adds a table of CF values to the correspond email 
from the template, and sends to the client. I would like those same 
changes appended to the transaction content that appears in the history, 
so it matches what was sent to the client and we know easily what was sent.


to test i have made a scrip, on correspond, custom action, template blank

action is

my $content = $self->TransactionObj->ContentObj->Content;
$content .= "SOME OTHER STUFF";
$self->TransactionObj->ContentObj->SetContent($content);

no errors, but the content is not changed

thanks

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
* Los Angeles - September 12-14, 2016


Re: [rt-users] ModifyCustomField without SeeCustomField

2016-08-19 Thread Woody - Wild Thing Safaris

Hi all,

I did not succeed in working out how to get around it by using 
callbacks, but instead added some code to remove the values if the user 
is a member of some group.


I did this hack, which might be useful to someone someday

note i only edited the Freeform custom field file as that's all i needed 
and i preserved the oldvalue in the oldvalue= argument


in local/html/Elements/ShowCustomField line 53

% while ( my $CustomField = $CustomFields->Next ) {
% my $Values = $Object->CustomFieldValues( $CustomField->Id );
% my $count = $Values->Count;
% next if $HideEmpty and not $count;

%# skip if member of group "NoSeeCF"
% my $group = new RT::Group($RT::SystemUser);
% $group->LoadUserDefinedGroup("NoSeeCF");
% next if ($group->HasMember($session{'CurrentUser'}->PrincipalObj) );

  
<% $CustomField->Name %>:


in local/html/Elements/EditCustomFieldFreeForm line 52

% if ( defined $Cols ) {
size="<% $Cols %>" \
% }

%# remove value if member of NoSeeCF
% my $group = new RT::Group($RT::SystemUser);
% $group->LoadUserDefinedGroup("NoSeeCF");
% if ($group->HasMember($session{'CurrentUser'}->PrincipalObj) ) {
class="CF-<%$CustomField->id%>-Edit" oldvalue="<% defined($Default) ? 
$Default : ''%>"  value="" />

% } else {
class="CF-<%$CustomField->id%>-Edit" value="<% defined($Default) ? 
$Default : ''%>" />

% }

Thanks Matt

w.


On 14/08/16 21:25, Matt Zagrabelny wrote:

On Sun, Aug 14, 2016 at 1:07 AM, Woody - Wild Thing Safaris
<wo...@wildthingsafaris.com> wrote:

Hi all,

Is it possible to allow a user to edit a custom field, without being able to
see it's value? My testing looks like ModifyCustomField is not enough for
the field to show up in the update page, and SeeCustomField my also be
checked?

You can always hack around that "limitation" with the callbacks.

/Elements/EditCustomFields/{After,Before}CustomFields

-m




--

---

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
* Los Angeles - September 12-14, 2016


[rt-users] ModifyCustomField without SeeCustomField

2016-08-14 Thread Woody - Wild Thing Safaris

Hi all,

Is it possible to allow a user to edit a custom field, without being 
able to see it's value? My testing looks like ModifyCustomField is not 
enough for the field to show up in the update page, and SeeCustomField 
my also be checked?


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 https://bestpractical.com/training
* Los Angeles - September, 2016


Re: [rt-users] mobile interface only shows searches

2016-08-14 Thread Woody - Wild Thing Safaris

Hi Matt,

But that makes the mobile UI unusable if it doesn't show dashboards and 
RT at a glance, surely? or is a dashboard considered too much info for a 
phone screen?


w.


On 12/08/16 15:57, Matt Zagrabelny wrote:


On Fri, Aug 12, 2016 at 3:04 AM, Woody - Wild Thing Safaris 
<wo...@wildthingsafaris.com <mailto:wo...@wildthingsafaris.com>> wrote:


Hi all,

When i access my RT 4.4.0 from my phone, i get the a mobile
layout, but all it shows is a list of all my saved searches -
there's no home menu,

dashboards, or admin menu (if root). I have to switch back to the
normal view to be able to do anything. Have i got a setting wrong
somewhere?


I don't think so.

The mobile UI is rather stripped down.

-m


--

---

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 https://bestpractical.com/training
* Los Angeles - September, 2016


[rt-users] mobile interface only shows searches

2016-08-12 Thread Woody - Wild Thing Safaris

Hi all,

When i access my RT 4.4.0 from my phone, i get the a mobile layout, but 
all it shows is a list of all my saved searches - there's no home menu,


dashboards, or admin menu (if root). I have to switch back to the normal 
view to be able to do anything. Have i got a setting wrong somewhere?



--

---

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 https://bestpractical.com/training
* Los Angeles - September, 2016


[rt-users] powetmaster undeliverd loop prevention

2016-06-21 Thread Woody - Wild Thing Safaris

Hello,

I recently had an issue where one of the requestor emails was bouncing, 
and a reply was sent from postmaster back to RT. The reply also 
contained the subject tag, so caused a correspondence on the ticket, 
mailing the bouncing requestor again and creating another postmaster mail.


I see there is bulk detection, and

Set($RedistributeAutoGeneratedMessages, "privileged");

But the loop was caused by mails from postmas...@domain.com  which 
corresponded to requestor unknownu...@domain.com who was unprivileged.


I'm unsure if i have things set up right - ideally any mails from 
postmaster would never get sent to anyone.


secondly

if i disable a user, mails that are rejected cause a mail to OwnerEmail 
(faied to crete ticket) - i don't want a mail to OwnerEmail as they're 
basically spam users that are disabled, but i do want OwnerEmail to 
appear on the login page for support enquiries.


I see i can turn off loop detection mails with

Set($LoopsToRTOwner, 1);

but don't see anything to stop the "fialed to create ticket" emails

thanks

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 https://bestpractical.com/training
* Los Angeles - September, 2016


[rt-users] accessing role object from template

2016-05-21 Thread Woody - Wild Thing Safaris

Hi all,

I've created a custom role "Transfer Operators" and i wanted to email 
all those people from a scrip/template, but i have found that the 
argument in ScripActions cannot take a word boundary - renaming the role 
to TransferOperators and the argument in ScripActions sends a mail.


It would seem that either Role Names need to be restricted to single 
words, or Notify.pm needs an update to cope with spaces in Role Names


My question is however, how can i access Role member info from a template

something like:

{ $Ticket->RoleObj("TransferOperators")->RealName }

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 https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


[rt-users] Possible Ownergroup + session issue

2016-04-20 Thread Woody - Wild Thing Safaris

HI Devs,

This unfortunately is a bit of a poor bug report as i couldn't find any 
info in any logs to send, so apologies from the start!


I changed a search from having

( Owner = 'fred' OR Owner = 'anna' )

to

( OwnerGroup = 'Bookings' OR OwnerGroup = 'Payments' )

this caused the dashboard to hang, and server fault, but with nothing in 
either apache logs or rt_log


once the broken dashboard had been visited, all other pages failed with 
serverfault until i delete cookies, and log in again, then all is ok 
until i visit either the broken search, or the dashboard.


On removing the two "OwnerGroup" lines, all is well again, though i had 
also cleared the session db table during my attempts to find the issue.


sorry again for not having much more to go on. I'm happy to try some 
more testing if you think it's worth looking into.


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 https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


Re: [rt-users] Dashboard as RT at a glance

2016-01-29 Thread Woody - Wild Thing Safaris

Hi Matt,

Yes, I think RT at a glance is like a dashboard, but having dashboards 
as part of other dashboards is an option.


If i hover over my "home" i get the list of all the dashboards i've put 
in that menu, so it is fairly easy to access them from there, i would 
just like my uses to log in and have their dashboard right there and not 
a unused RT at a glance page


w.

On 28/01/16 20:05, Matt Zagrabelny wrote:

Hi,

I might be off base, but I'm not sure you can have a dashboard in your 
RT at a glance page. The RT at a glance page is pretty much a 
dashboard in its own right.


What happens when you hover over "Home" in the upper left corner?

-m

On Thu, Jan 28, 2016 at 1:47 AM, Woody - Wild Thing Safaris 
<wo...@wildthingsafaris.com <mailto:wo...@wildthingsafaris.com>> wrote:


Hello,

When managing the content of RT at a glance, I have in my list all
the usual modules and all my saved searches for all the groups i'm
a member of, but no dashboards show up. I just want to set RT at a
Glance to a single dashboard. 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 
(http://bestpractical.com/services/training.html)
* Hamburg Germany — March 14 & 15, 2016

[rt-users] Dashboard as RT at a glance

2016-01-27 Thread Woody - Wild Thing Safaris

Hello,

When managing the content of RT at a glance, I have in my list all the 
usual modules and all my saved searches for all the groups i'm a member 
of, but no dashboards show up. I just want to set RT at a Glance to a 
single dashboard.


RT at a glance - no dashboards visible


Dashboard content - other dashboards available


Is there a permission i should have somewhere to allow the dashboards to 
show up in the content list? When I look at managing content for 
dashboards, I get a list of other dashboards to include along with the 
saved searches, just not for RT at a glance.


thanks

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 
(http://bestpractical.com/services/training.html)
* Hamburg Germany — March 14 & 15, 2016

Re: [rt-users] View dashboard of another user who's searches depend on __CurrentUser__

2016-01-27 Thread Woody - Wild Thing Safaris

Hi,

Another option would be  "LastUpdatedByGroup" in a similar fashion to 
OwnerGroup - though it looks like OwnerGroup is for Roles, and 
LastUpdatedBy isn't a Role i don't think.


w.

On 25/01/16 20:29, Woody - Wild Thing Safaris wrote:

HI Sally,

Thanks for your input.

My overall goal is to make it easy for another team member to take 
over another's work while they are away. Since each person is using 
the same dashboard all based on __CurrentUser__, only someone logged 
in as user X can see user X's tickets.


Your idea of using OwnerGroup has given me an idea of a possible 
solution  - I create an identical dashboard but based on OwnerGroup 
and not __CurrentUser__ where OwnerGroup = "holiday" and if someone is 
away, I add them to the group holiday, in which case their tickets 
will be visible in that dashboard.


Where it's going to fail though is with the LastUpdated != 
"__CurrentUser__"
I can't replace that __CurrentUser__ with OwnerGroup. It would need to 
be '__privileged__ ' or LastUpdated = '__Requestor__' or something, or 
i list all the users of the queue in a long LastUpdated != "fred" AND 
Lastupdated !="jane" etc.


thanks for the inspiration and if you have any ideas about the 
LastUpdated - that would be great!


w.

On 21/01/16 16:43, Sally Ainsley wrote:

Hi Woody

Not sure what your overall goal is however I have put our staff into 
GROUPS based on the teams they are in.


We then have searches that are for _CurrentUser_ as well as other 
searches that are based on OWNERGROUP = x.


We then have saved searches visible to each GROUP so that they can 
see tickets assigned to their team - this means that if a member of 
staff if off others in that team can pick up the work.  Works well 
when team managers are away also.


Not sure if this helps

Sally

Sally Ainsley

-Original Message-
From: rt-users [mailto:rt-users-boun...@lists.bestpractical.com] On 
Behalf Of Woody - Wild Thing Safaris

Sent: 21 January 2016 12:48
To:rt-users@lists.bestpractical.com
Subject: [rt-users] View dashboard of another user who's searches 
depend on __CurrentUser__


Hi all,

I have a dashboard, in which there are searches that depend on 
__CurrentUser__, so each user that accesses the dashboard can only 
see tickets owned by them.


If someone is away, i would like someone else to be able to see the 
dashboard of the absent person. I don't want to give them the absent 
user's login, nor do i want to create searches for each user that are 
hardwired to their username.


Something likewww.myrt.com/dashboards/12345/Dashname/Username would 
do the job whereby __CurrentUser__ is replaced by "Username" and not 
the person who's actually logged in.


I can see in lib/RT/Tickets.pm in sub _parser the line

  # replace __CurrentUser__ with id
  $value = $self->CurrentUser->id if $value eq 
'__CurrentUser__';


and in lib/RT/Search/Simple.pm

sub HandleOwner {
  if (!$_[2] and $_[1] eq "me") {
  return owner => "Owner.id = '__CurrentUser__'";
  }
  elsif (!$_[2] and $_[1] =~ /\w+@\w+/) {
  return owner => "Owner.EmailAddress = '$_[1]'";
  } else {
  return owner => "Owner = '$_[1]'";
  }
}

So i think that a hack is needed somewhere there, and when the url is 
parsed the extra username field assigned to a variable that can be 
used in those subs. I can't find however where sub HandleOwner is 
called from since that's the only time it appears in the code!


Does this sound like a sensible way of going about it, or can anyone 
think of a better solution, or know of an existing one?


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 
(http://bestpractical.com/services/training.html)
* Hamburg Germany  March 14 & 15, 2016


Re: [rt-users] View dashboard of another user who's searches depend on __CurrentUser__

2016-01-25 Thread Woody - Wild Thing Safaris

HI Sally,

Thanks for your input.

My overall goal is to make it easy for another team member to take over 
another's work while they are away. Since each person is using the same 
dashboard all based on __CurrentUser__, only someone logged in as user X 
can see user X's tickets.


Your idea of using OwnerGroup has given me an idea of a possible 
solution  - I create an identical dashboard but based on OwnerGroup and 
not __CurrentUser__ where OwnerGroup = "holiday" and if someone is away, 
I add them to the group holiday, in which case their tickets will be 
visible in that dashboard.


Where it's going to fail though is with the LastUpdated != "__CurrentUser__"
I can't replace that __CurrentUser__ with OwnerGroup. It would need to 
be '__privileged__ ' or LastUpdated = '__Requestor__' or something, or i 
list all the users of the queue in a long LastUpdated != "fred" AND 
Lastupdated !="jane" etc.


thanks for the inspiration and if you have any ideas about the 
LastUpdated - that would be great!


w.

On 21/01/16 16:43, Sally Ainsley wrote:

Hi Woody

Not sure what your overall goal is however I have put our staff into GROUPS 
based on the teams they are in.

We then have searches that are for _CurrentUser_ as well as other searches that 
are based on OWNERGROUP = x.

We then have saved searches visible to each GROUP so that they can see tickets 
assigned to their team - this means that if a member of staff if off others in 
that team can pick up the work.  Works well when team managers are away also.

Not sure if this helps

Sally

Sally Ainsley

-Original Message-
From: rt-users [mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of 
Woody - Wild Thing Safaris
Sent: 21 January 2016 12:48
To:rt-users@lists.bestpractical.com
Subject: [rt-users] View dashboard of another user who's searches depend on 
__CurrentUser__

Hi all,

I have a dashboard, in which there are searches that depend on __CurrentUser__, 
so each user that accesses the dashboard can only see tickets owned by them.

If someone is away, i would like someone else to be able to see the dashboard 
of the absent person. I don't want to give them the absent user's login, nor do 
i want to create searches for each user that are hardwired to their username.

Something likewww.myrt.com/dashboards/12345/Dashname/Username  would do the job whereby 
__CurrentUser__ is replaced by "Username" and not the person who's actually 
logged in.

I can see in lib/RT/Tickets.pm in sub _parser the line

  # replace __CurrentUser__ with id
  $value = $self->CurrentUser->id if $value eq '__CurrentUser__';

and in lib/RT/Search/Simple.pm

sub HandleOwner {
  if (!$_[2] and $_[1] eq "me") {
  return owner => "Owner.id = '__CurrentUser__'";
  }
  elsif (!$_[2] and $_[1] =~ /\w+@\w+/) {
  return owner => "Owner.EmailAddress = '$_[1]'";
  } else {
  return owner => "Owner = '$_[1]'";
  }
}

So i think that a hack is needed somewhere there, and when the url is parsed 
the extra username field assigned to a variable that can be used in those subs. 
I can't find however where sub HandleOwner is called from since that's the only 
time it appears in the code!

Does this sound like a sensible way of going about it, or can anyone think of a 
better solution, or know of an existing one?

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-users] View dashboard of another user who's searches depend on __CurrentUser__

2016-01-21 Thread Woody - Wild Thing Safaris

Hi all,

I have a dashboard, in which there are searches that depend on 
__CurrentUser__, so each user that accesses the dashboard can only see 
tickets owned by them.


If someone is away, i would like someone else to be able to see the 
dashboard of the absent person. I don't want to give them the absent 
user's login, nor do i want to create searches for each user that are 
hardwired to their username.


Something like www.myrt.com/dashboards/12345/Dashname/Username would do 
the job whereby __CurrentUser__ is replaced by "Username" and not the 
person who's actually logged in.


I can see in lib/RT/Tickets.pm in sub _parser the line

# replace __CurrentUser__ with id
$value = $self->CurrentUser->id if $value eq '__CurrentUser__';

and in lib/RT/Search/Simple.pm

sub HandleOwner {
if (!$_[2] and $_[1] eq "me") {
return owner => "Owner.id = '__CurrentUser__'";
}
elsif (!$_[2] and $_[1] =~ /\w+@\w+/) {
return owner => "Owner.EmailAddress = '$_[1]'";
} else {
return owner => "Owner = '$_[1]'";
}
}

So i think that a hack is needed somewhere there, and when the url is 
parsed the extra username field assigned to a variable that can be used 
in those subs. I can't find however where sub HandleOwner is called from 
since that's the only time it appears in the code!


Does this sound like a sensible way of going about it, or can anyone 
think of a better solution, or know of an existing one?


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



Re: [rt-users] no To: header in AdminCC's mails

2015-12-08 Thread Woody - Wild Thing Safaris

Thank you very much

w.

On 08/12/15 11:55, Christian Loos wrote:

Am 08.12.2015 um 09:21 schrieb Woody - Wild Thing Safaris:

Thanks for your swift response Chris - thought it must be my config.
In a similar vein, should i set FriendlyFromLine too to maintain RFC
compliance?

w.

Setting $FriendlyFromLine isn't necessary because the outgoing mail will
always have a From header.

Setting $FriendlyFromLine just changes the format of the From header,
which you can customize by $FriendlyFromLineFormat.

Chris




--

---

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



Re: [rt-users] no To: header in AdminCC's mails

2015-12-08 Thread Woody - Wild Thing Safaris

Thanks for your swift response Chris - thought it must be my config.
In a similar vein, should i set FriendlyFromLine too to maintain RFC 
compliance?


w.

On 08/12/15 11:00, Christian Loos wrote:

Am 08.12.2015 um 08:01 schrieb Woody - Wild Thing Safaris:

Hi all,

I was sure this would have come up somewhere but i can't make a search
produce any results. This also tells me that it's most likely my error
if no-one else has the problem

Mails to "AdminCC" are sent as a BCC, but there is no To: or CC: fields,
so spam filtering marks all the mails as spam.

1.2 MISSING_HEADERSMissing To: header
1.9 REPLYTO_WITHOUT_TO_CC  REPLYTO_WITHOUT_TO_CC

I have made a workaround solution by putting a To: header in the admincc
template that sends the mail to a /dev/null mailbox, but that's hardly
ideal.

Below are the full headers of the mail

thanks in advance for any suggestions

Woody.

You shoudl set the $UseFriendlyToLine config option:
https://www.bestpractical.com/docs/rt/4.2/RT_Config.html#UseFriendlyToLine

Chris




--

---

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-users] no To: header in AdminCC's mails

2015-12-07 Thread Woody - Wild Thing Safaris


Hi all,

I was sure this would have come up somewhere but i can't make a search
produce any results. This also tells me that it's most likely my error
if no-one else has the problem

Mails to "AdminCC" are sent as a BCC, but there is no To: or CC: fields,
so spam filtering marks all the mails as spam.

1.2 MISSING_HEADERSMissing To: header
1.9 REPLYTO_WITHOUT_TO_CC  REPLYTO_WITHOUT_TO_CC

I have made a workaround solution by putting a To: header in the admincc 
template that sends the mail to a /dev/null mailbox, but that's hardly ideal.

Below are the full headers of the mail

thanks in advance for any suggestions

Woody.



Return-Path: 
Received: from deliver ([unix socket])
 by math.xxx.net (Cyrus v2.3.16-Fedora-RPM-2.3.16-13.el6_6) with LMTPA;
 Mon, 07 Dec 2015 08:30:55 +
X-Sieve: CMU Sieve 2.3
Received: from bodge.xxx.org ([xxx.xxx.xxx.xx])
by math.xxx.net with esmtp (Exim 4.72)
(envelope-from )
id 1a5rCA-0001wG-7Q; Mon, 07 Dec 2015 08:30:55 +
Received: from www-data by bodge.x.org with local (Exim 4.82)
(envelope-from )
id 1a5rC4-0001D1-VW; Mon, 07 Dec 2015 08:30:49 +
Subject: Re: Fw: WTG Jeep Cherokee 2006
From: works...@xxx.com
Reply-To: works...@xxx.com
In-Reply-To: 

References:    <56654142.3090...@xxx.com>
 
 
Message-ID: 
X-RT-Loop-Prevention: WT
X-RT-Ticket: WT #82786
X-Managed-BY: RT 4.2.9 (http://www.bestpractical.com/rt/)
X-RT-Originator: step...@xxx.org
Content-Type: multipart/mixed; boundary="--=_1449477048-4190-15"
Precedence: bulk
Date: Mon, 07 Dec 2015 11:30:48 +0300
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 2.5 (++)
X-Spam-Report: Spam detection software, running on the system "math.xxx.net", 
has
 identified this incoming email as possible spam.  The original message
 has been attached to this so you can view it (if it isn't spam) or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  Ticket URL: http://rt.xxx.com/Ticket/Display.html?id=82786

Hi Woody, No idea whether it has been skimmed before. The previous owner
   is not contactable, so I cannot check with him. He had it from new, and I'm
not aware of any earlier problems. [...]
 
 Content analysis details:   (2.5 points, 5.0 required)
 
  pts rule name  description

  -- --
 -0.7 RCVD_IN_DNSWL_LOW  RBL: Sender listed at http://www.dnswl.org/, low
 trust
 [xx.xx.xx.xx listed in list.dnswl.org]
 -0.0 SPF_PASS   SPF: sender matches SPF record
  1.2 MISSING_HEADERSMissing To: header
  0.0 TVD_FW_GRAPHIC_NAME_MID BODY: Medium sized image attachment name
  0.0 HTML_MESSAGE   BODY: HTML included in message
  1.9 REPLYTO_WITHOUT_TO_CC  REPLYTO_WITHOUT_TO_CC

This is a multi-part message in MIME format...

=_1449477048-4190-15
Content-Type: multipart/alternative; boundary="--=_1449477048-4190-14"

This is a multi-part message in MIME format...

=_1449477048-4190-14
RT-Attach-Message: yes
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8

Ticket URL: http://rt.xxx.com/Ticket/Display.html?id=82786

Hi Woody,

Regards,







[rt-users] Order of custom field updates

2014-12-03 Thread Woody - Wild Thing Safaris


Hi folks,

I have a scrip that runs onCustomFieldChange, and it creates another
ticket using data from other custom fields.

eg

Payment amount  - value
Payment currency - select
Payment destination  - select
Payment type - select

A scrip triggers on change of Payment type, but when the new ticket is
created, amount and currency are defined, but destination is not set so
i get something like

Incoming Payment of x GBP - .

instead of

Incoming Payment of  GBP - Current account

I have checked the id number of the custom fields thinking maybe they
update in id order, but Payment Type is the lowest, and Payment
Destination is not the highest. Payment type is the last in the list
that's displayed, so I'm not sure how the order of field updates is decided.

Can anyone suggest a solution or provide any info on how the order of
field updates is defined and how i can change it (presumably by changing
field names or deleting and re-adding?)

thanks

--
---
Richard Wood (Woody)
Managing Director
Wild Thing Safaris Ltd.
PO BOX 34514 DSM
Office: +255 (0) 222 617 166
Office Mobile: +255 (0) 773 503 502
Direct: +255 657 799 468
Skype: woody1tz
http://wildthingsafaris.com





[rt-users] Order of custom field updates

2014-11-28 Thread Woody - Wild Thing Safaris

Hi folks,

I have a scrip that runs onCustomFieldChange, and it creates another 
ticket using data from other custom fields.


eg

Payment amount  - value
Payment currency - select
Payment destination  - select
Payment type - select

A scrip triggers on change of Payment type, but when the new ticket is 
created, amount and currency are defined, but destination is not set so 
i get something like


Incoming Payment of x GBP - .

instead of

Incoming Payment of  GBP - Current account

I have checked the id number of the custom fields thinking maybe they 
update in id order, but Payment Type is the lowest, and Payment 
Destination is not the highest. Payment type is the last in the list 
that's displayed, so I'm not sure how the order of field updates is decided.


Can anyone suggest a solution or provide any info on how the order of 
field updates is defined and how i can change it (presumably by changing 
field names or deleting and re-adding?)


thanks

--
---
Richard Wood (Woody)
Managing Director
Wild Thing Safaris Ltd.
PO BOX 34514 DSM
Office: +255 (0) 222 617 166
Office Mobile: +255 (0) 773 503 502
Direct: +255 657 799 468
Skype: woody1tz
http://wildthingsafaris.com



Re: [rt-users] Graphical representation of open tickets

2014-10-23 Thread Woody - Wild Thing Safaris
I asked the developer of RTx::Timeline, but he says he's not using RT 
anymore.


I would be very keen to get Timeline up to date as we found it excellent 
with RT3, though i fear my ability to contribute might not be that 
great. I was planning to take a look at it to see how out of my depth it 
was


w.

On 23/10/14 16:41, Emmanuel Lacour wrote:

On Thu, Oct 23, 2014 at 03:04:29PM +0200, markus.wildb...@eu.magna.com wrote:

Hi there!

Has anybody done a graphical representation (line graph) of open tickets
over time? Our management forced me to create such a representation.
I'm looking for a tool doing this graphing, having an x-axis as timeline
and a graph for Created, Resolved and Open Tickets per day (per
queue, per user?!)

Before I start to code these things I wanted to ask you, if there are
maybe some snippets of code which I could use.
Has anybody done such things before?


I know two extensions:

- RT::Extension::JSGantt: not really fit your needs but may be a base
   for coding
- RTx::Timeline looks close to your needs, but pretty
   outdated/unmaintained




--
---
Richard Wood (Woody)
Managing Director
Wild Thing Safaris Ltd.
PO BOX 34514 DSM
Office: +255 (0) 222 617 166
Office Mobile: +255 (0) 773 503 502
Direct: +255 657 799 468
Skype: woody1tz
http://wildthingsafaris.com

--
RT Training November 4  5 Los Angeles
http://bestpractical.com/training