[rt-users] Fwd: RT CLI login

2016-05-23 Thread Dave Florek
Hi,

So, I created the .rtrc file as requested but I'm still receiving the
following:

rt: Server error: Can't connect to localhost:443 (certificate verify
failed) (500)

How do I allow the RT CLI program to accept https connection certificates
and/or what would be the easiest way to drop https to login via RTCLI?

Thanks,

On Mon, May 9, 2016 at 2:26 PM, Dave Florek  wrote:

>
> -- Forwarded message --
> From: Dave Florek 
> Date: Wed, May 4, 2016 at 1:00 PM
> Subject: Re: [rt-users] RT CLI login
> To: Dustin Graves 
> Cc: rt-users@lists.bestpractical.com
>
>
> Good afternoon,
>
> Thanks for the response. I'm not seeing the .rtrc file in my home
> directory. I added the username, password and URL via environment variables
> and I'm now receiving the following new error message:
>
> Server error: Can't connect to :443 (certificate
> verify failed)
>
>   (500)
>
>
> On Fri, Apr 29, 2016 at 2:02 PM, Dustin Graves 
> wrote:
>
>> Hi Dave,
>>
>> There are two ways to authenticate for the RT CLI.
>>
>> The first is environment variables RTUSER and RTPASSWD
>>
>> The second is an RT Config file .rtrc in your user’s home directory:
>>
>> server http://your.rt4.installation
>> user your.rtusername
>> passwd your rt password
>>
>>
>> I would verify that you can login to RT with your credentials before
>> using the CLI if you have doubts as to their validity. You can use any user
>> with the CLI, but you will be limited by their permissions. Generally it is
>> recommended to make a user specifically for use with the CLI so you can
>> grant only the permissions that you need.
>>
>> You can take a look at the wiki here for more information:
>> http://requesttracker.wikia.com/wiki/CLI
>>
>> Thank you,
>> Dustin
>>
>> On Apr 29, 2016, at 1:20 PM, Dave Florek  wrote:
>>
>> Hi,
>>
>> I'm trying to use RT CLI to issue several commands however it asks for a
>> password and none of the ones I initially generated are working. Does the
>> rt cli program use the root password to work? I get an error (302) found
>> each time I attempt a login.
>>
>> Sincerely,
>> -
>> RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
>> * Washington DC - May 23 & 24, 2016
>>
>>
>>
>
>
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016


Re: [rt-users] accessing role object from template

2016-05-23 Thread Shawn Moore
On 2016年5月21日 at 3:21:17, Woody - Wild Thing Safaris 
(wo...@wildthingsafaris.com) wrote:
> Hi all,

Hi Woody,

> 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.

One workaround would be to use the RT::CustomRole-1 syntax (where 1 is the 
role’s ID) in the ScripAction argument.

I’ve made a ticket for adjusting how the argument parsing works, since you’re 
right, that is a bit limiting: 
https://issues.bestpractical.com/Ticket/Display.html?id=31997

> 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 }

Two options:

Load the role by name:

my $role = RT::CustomRole->new($CurrentUser);
$role->Load(“TransferOperators”);
$Ticket->RoleGroup($role->GroupType);

or specify the internal ID directly:

$Ticket->RoleGroup(“RT::CustomRole-1”);

This will return an RT::Group object. If you only need email address(es), you 
can use $Ticket->RoleAddresses(“RT::CustomRole-1”) directly.

> w.

By the way, we’d love to hear more about how you’re using custom roles :)

Thanks!
Shawn
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


[rt-users] RT Wikitext CF and newline character processing

2016-05-23 Thread Peter Viskup
Hello all,
just dig into the Wikitext CF processing. Configured the RT and
CKEditor using the wikia how-to [1] with some additional changes to
CKEditor configuration.

Just discovered one issue with the displaying the Wikitext CF via Web interface.

CKEditor add  on every newline by default (didn't find the
possibility to suppress that by configuration option) and the RT does
replacement of every newline character '\n' in CF value by ''
string (found in /opt/rt4/lib/RT/Interface/Web.pm in
ProcessColumnMapValue subroutine).

There are two ways to get it solved:
1) let CKEditor not to send  tag to RT
2) let RT not to replace \n by 

Ad 1)
Some advanced output filtering rules should be written.

Ad 2)
Looks like it is possible to disable the replacement by setting
'Escape' argument to 0, but not sure how to do that for Wikitext CF
only (/opt/rt4/share/html/Elements/ShowCustomFieldWikitext seems to be
the proper place for that).

Other workaround could be to call ScrubHTML subroutine defined in
Web.pm with disablement of the 'br' tag for Wikitext CF.

Any other thoughts or did somebody solve this issue already (other
than the styling change)?

More information:
"testxy\ntestza" is the text in RT's DB
"testxytestza" is the RT's HTML output

[1] http://requesttracker.wikia.com/wiki/Rich_Text_Custom_Fields

-- 
Peter Viskup
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016