Autoreply including article

in RT 4.06

i want to include an article in a autoreply template

can anyone suggest how to do this?
View this message in context: http://old.nabble.com/autoreply-including-article-tp34083030p34083030.html

in RT 4.06

i want to include an article in a autoreply template

can anyone suggest how to do this?

Load an article using API and put content into reply.


View this message in context: http://old.nabble.com/autoreply-including-article-tp34083030p34083030.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.

Best regards, Ruslan.

i could do that, but then the reply would not be updated if the article
changes

the support staff doesn’t have access to the template in case it needs
updating, but they can update articles. i want to avoid having to make
changes for them.

Ruslan Zakirov-2 wrote:

in RT 4.06

i want to include an article in a autoreply template

can anyone suggest how to do this?

Load an article using API and put content into reply.


View this message in context:
http://old.nabble.com/autoreply-including-article-tp34083030p34083030.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


Best regards, Ruslan.

View this message in context: http://old.nabble.com/autoreply-including-article-tp34083030p34083072.html

i could do that, but then the reply would not be updated if the article
changes

the support staff doesn’t have access to the template in case it needs
updating, but they can update articles. i want to avoid having to make
changes for them.

That’s why Ruslan suggesting using the API to import the Article.
This means it is fetched on each Autoreply.

-kevin

i see, i thought he meant to copy and paste the article into the template

what would that look like to use the API in a template?

i can’t find any documentation on this…On Wed, Jun 27, 2012 at 3:09 PM, Kevin Falcone falcone@bestpractical.comwrote:

On Wed, Jun 27, 2012 at 02:14:47PM -0700, jessepdx wrote:

i could do that, but then the reply would not be updated if the article
changes

the support staff doesn’t have access to the template in case it needs
updating, but they can update articles. i want to avoid having to make
changes for them.

That’s why Ruslan suggesting using the API to import the Article.
This means it is fetched on each Autoreply.

-kevin

Ruslan Zakirov-2 wrote:

On Thu, Jun 28, 2012 at 12:07 AM, jessepdx jessepdx@gmail.com wrote:

in RT 4.06

i want to include an article in a autoreply template

can anyone suggest how to do this?

Load an article using API and put content into reply.

i see, i thought he meant to copy and paste the article into the template
what would that look like to use the API in a template?
i can’t find any documentation on this…

Are you looking for documentation about Articles?
perldoc lib/RT/Article.pm perldoc lib/RT/Articles.pm
Are you looking for documentation about templates, look at the
templates.pod file shipped in your docs directory.

I doubt documentation exists for the exact thing you’re trying to do,
so you’ll need to be more specific about what you want to do.

-kevin

i will be as specific as possible

when a student generates a ticket for " Unexcused Early Release"

i have a scrip with this custom condition:

my $match = “Unexcused Early Release”;
my $t_subject = $self->TicketObj->Subject;
if ( $t_subject !~ /$match/i ) {
return 1;
}
else {
return 0;
}

which runs the Send Email action

and uses this template:

Hi $Ticket->FirstCustomFieldValue(‘Student_Name’)

Thank you for your student report.

Please be aware that this is considered an unexcused early release in
accordance with the student catalog. All time off requests must be made at
least 2 weeks in advance, and/or a student must supply a doctor’s note for
it to be considered excused.

Please remember any hours missed may result in over contract fees.

Each curriculum has required days and hours of attendance. Attendance
records are strictly maintained and determine compliance with satisfactory
progress for financial aid funding purposes. In order to receive financial
aid, you must maintain at least 80% overall attendance.

Kind Regards,
Student Services

i would like the body of the email to use the contents of the field
"Content" from Article #4 rather than the text above.

i see, i thought he meant to copy and paste the article into the
template

To: $Ticket->RequestorAddresses
Subject: Unexcused Early Release {$Ticket->Subject}

Hi $Ticket->FirstCustomFieldValue(‘Student_Name’)

Thank you for your student report.

Please be aware that this is considered an unexcused early release in accordance with the
student catalog. All time off requests must be made at least 2 weeks in advance, and/or a
student must supply a doctor*s note for it to be considered excused.

Please remember any hours missed may result in over contract fees.

Each curriculum has required days and hours of attendance. Attendance records are strictly
maintained and determine compliance with satisfactory progress for financial aid funding
purposes. In order to receive financial aid, you must maintain at least 80% overall
attendance.

Kind Regards,
Student Services

i would like the body of the email to use the contents of the field “Content” from Article #4
rather than the text above.

Then you’ll want to read about Articles, if you have a specific id in
mind, you can just Load it and call methods on it as documented in the
code I pointed to in my earlier reply.

Are you looking for documentation about Articles?
perldoc lib/RT/Article.pm
perldoc lib/RT/Articles.pm

-kevin