Sample for RTFM::Extension::ArticleTemplates using inside a template ?

Hi,

we added our company signature (queue based) to
3 (Correspondence, Autoreply and Resolve) templates.

Is it possible to move the 3 times duplicated signature code to
a RTFM article and include this article in my templates, like

{ $Transaction->GetRTFMArticle(3) }

So, the maintenance will be easier…

I installed the RTFM::Extension::ArticleTemplates but cannot find
any sample how to use it …

kind regards
Danny

** Correspondence-templates:
RT-Attach-Message: yes
{$Transaction->Content()}
{

Do some checks if the template is used from the webui or triggered

by email. If WebUI, append the signature:

" . $Transaction->CreatorObj->RealName . "
Tel. " . $Transaction->CreatorObj->WorkPhone . “
Company Name, …
”;
}

Kind regards
Danny

Hi,

we added our company signature (queue based) to
3 (Correspondence, Autoreply and Resolve) templates.

Is it possible to move the 3 times duplicated signature code to
a RTFM article and include this article in my templates, like

{ $Transaction->GetRTFMArticle(3) }

So, the maintenance will be easier…

I installed the RTFM::Extension::ArticleTemplates but cannot find
any sample how to use it …

From the docs:

When this extension is installed RTFM parses content of articles as a
template using LText::Template module. Using this extension you can
make your articles dynamic. LText::Template module is used to parse
RT’s Templates as well and its syntax is pretty simple - you can
consult RT docs/wiki or module’s documentation.

So, it makes RTFM articles use the {} syntax like RT’s Templates.
You can read more about them in docs/templates.pod

It does not let you dynamically load an article from a Template, you
could do that without the extension just by writing code in normal RT
Templates.

-kevin

It does not let you dynamically load an article from a Template, you
could do that without the extension just by writing code in normal RT
Templates.

Sure. But I would not like to repeat myself in 3 templates (3 times the
same
signature/code in 3 templates) - for one queue.

I would like to move / refactor this code out of the templates to one
place,
a RTFM article. Then, just “source” the text from the signature-article
to
the template.

Something like this:

my $rtfm = RT::FM::Article->new($Ticket->CurrentUser);
my ($id,$msg) = $rtfm->Load(“Signature1”);
if (!id) { $RT::Logger->debug(“failed …”); } else { “HOWTO print a CF
xxx from the loaded article ?”; }

kind regards
Danny

It does not let you dynamically load an article from a Template, you
could do that without the extension just by writing code in normal RT
Templates.

Sure. But I would not like to repeat myself in 3 templates (3 times the
same
signature/code in 3 templates) - for one queue.

I would like to move / refactor this code out of the templates to one
place,
a RTFM article. Then, just “source” the text from the signature-article
to
the template.

Something like this:

my $rtfm = RT::FM::Article->new($Ticket->CurrentUser);
my ($id,$msg) = $rtfm->Load(“Signature1”);
if (!id) { $RT::Logger->debug(“failed …”); } else { “HOWTO print a CF
xxx from the loaded article ?”; }

Sure, that was my suggestion
You don’t need RTFM::Extension::ArticleTEmplate in order to load an
Article from a normal RT article

-kevin

my $rtfm = RT::FM::Article->new($Ticket->CurrentUser);
my ($id,$msg) = $rtfm->Load(“Signature1”);
if (!id) { $RT::Logger->debug(“failed …”); } else { "HOWTO print a
CF

xxx from the loaded article ?"; }

Sure, that was my suggestion
You don’t need RTFM::Extension::ArticleTEmplate in order to load an
Article from a normal RT article

Ups - got it. Sorry for my misunderstanding. How can I access my
defined CF inside the RTFM ? Like $rtfm->GetCustomerField(“text”) ?

  • Danny

my $rtfm = RT::FM::Article->new($Ticket->CurrentUser);
my ($id,$msg) = $rtfm->Load(“Signature1”);
if (!id) { $RT::Logger->debug(“failed …”); } else { "HOWTO print a
CF

xxx from the loaded article ?"; }

Sure, that was my suggestion
You don’t need RTFM::Extension::ArticleTEmplate in order to load an
Article from a normal RT article

Ups - got it. Sorry for my misunderstanding. How can I access my
defined CF inside the RTFM ? Like $rtfm->GetCustomerField(“text”) ?

Something like what you sketched out above, see the docs in
Article_Overlay.pm

Hi,

Is there an easier way to assign permissions to multiple queues.
We have over 10 queues…
This is tedious.

Thanks,
Gilbert.

Rights matrix extension may be.

Regards, Ruslan. From phone.26.02.2011 4:08 пользователь “Gilbert Rebeiro” gilbert@dido.ca написал:

Hi,

Is there an easier way to assign permissions to multiple queues.
We have over 10 queues…
This is tedious.

Thanks,
Gilbert.

It works well.
It could benefit from “ALL” buttons on both queues and rights ie select
all queues for a certain permission, or all permissions for a certain queue.

But it really helps.
The CPAN module complains about requiring 3.4.

My vote for this type of functionality to be part or RT.On 26/02/2011 12:27 PM, Ruslan Zakirov wrote:

Rights matrix extension may be.

Regards, Ruslan. From phone.

26.02.2011 4:08 пользователь “Gilbert Rebeiro” <gilbert@dido.ca
mailto:gilbert@dido.ca> написал:

Hi,

Is there an easier way to assign permissions to multiple queues.
We have over 10 queues…
This is tedious.

Thanks,
Gilbert.

From: Ruslan Zakirov ruslan.zakirov@gmail.com
Rights matrix extension may be.
Regards, Ruslan. From phone.

From: Gilbert Rebeiro gilbert@dido.ca
It works well.
It could benefit from “ALL” buttons on both queues and rights ie select all queues for a certain permission, or all permissions for a certain queue.

I use rights matrix as well, although even that is quite cumbersome on our setup (we have 156 queues, 167 user defined groups and probably about 500 privileged users).

I’m actually starting to write perl scripts for creating queues and groups and the rights to go with them, because it’s easy to get it wrong, and with as many queues and groups as we have, consistency is important.

It’s fairly easy to write such scripts, stealing bits of code from RT itself when I couldn’t work out how to do it for myself!

I’m also planning to create a script which sanity-checks queue configurations according to our internal policy, which basically goes something like this:

  1. Every queue has a group with the same name as the queue.
  2. That group is assigned to the AdminCC role for the queue.
  3. Rights are never granted to individual users.
  4. Users are given rights to queues by placing them in the appropriate groups.

I don’t tend to give anyone the right to modify scrips and templates, because as far as I can tell those scrips and bits of embedded code in templates basically run with the privilege level of $RT::SystemUser, and so can be used to access pretty much any data in the database, which is not something we generally want.

Regards,

Tim

The Wellcome Trust Sanger Institute is operated by Genome Research
Limited, a charity registered in England with number 1021457 and a
company registered in England with number 2742969, whose registered
office is 215 Euston Road, London, NW1 2BE.