Where to insert the AutogeneratedPassword template text?

Hello,

For us rookies (like me), where do I insert the “template text” found at

http://wiki.bestpractical.com/index.cgi?AutogeneratedPassword

?

I’m assuming that this gizmo will autogenerate and copy in the email:

  1. a Weblink to the ticket (which is probably generated by some other
    gizmo, but it just copied in the email)
  2. a new username for the requesting user
  3. a password for the new username.

Are my assumptions correct?

-Matt

I’m still trying to figure out how to change a template as per the email below.

I see the AutogeneratedPassword template text in etc/initialdata, and I
have yet to definitely determine where this template is used in the core
source (although lib/RT/Action/Autoreply.pm looks promising).

Bottom line: I don’t know the procedure for getting the
autoreply-email-text to change. I put the changes into etc/initialdata,
rebooted my webserver, and still not change in my autoreply email. :frowning:

Maybe I’m doing something wrong in my test?

If not, can someone point me to where/how I change these “templates”?

-Matt

At 7/12/2005 10:28 AM, Matt England wrote:

Bottom line: I don’t know the procedure for getting the
autoreply-email-text to change. I put the changes into etc/initialdata,
rebooted my webserver, and still not change in my autoreply email. :frowning:

We have a Support queue in which we’ve created an auto reply template.
The template itself contains the code required to auto generate a
password if the user doesn’t have one already, or to simply remind
him/her how to have it reset if the password has been forgotten.

The template is based almost entirely on the one in the wiki. Here’s
the relevant bit from our template:

{
*RT::User::GenerateRandomNextChar = &RT::User::_GenerateRandomNextChar;

if (($Transaction->CreatorObj->id != $RT::Nobody->id) &&

(!$Transaction->CreatorObj->Privileged) &&
($Transaction->CreatorObj->__Value('Password') eq '*NO-PASSWORD*')
) {

    my $user = RT::User->new($RT::SystemUser);
    $user->Load($Transaction->CreatorObj->Id);
    my ($stat, $pass) = $user->SetRandomPassword();

    if (!$stat) {
            $OUT .= "An internal error has occurred. Request Tracker

was not able to set a password for you. Please phone Systems Aligned
Technical Support for assistance.";

    }

$OUT .= "You can review the current status and history of your requests
at:

    ".$RT::WebURL."

Our technical support system has automatically assigned you a password.
When prompted, enter the following user name and password at the login
page:

    User name: ".$user->Name."
    Password : ".$pass."

We recommend you change your password after you sign into the support
website.
";
}
else
{

$OUT .= “If you do not remember your password for the Support website,
you can reset it by sending an email to [ some address ]
with the subject, Reset Password. Your password will be automatically
reset and the new one emailed to you.”;
}
}

We use a basic scrip that fires when an email is sent to the Support
queue. The auto reply (above) is the one that is sent out.

Does that help?

Regards,

Ranbir
Kanwar Ranbir Sandhu
Systems Aligned Inc.
www.systemsaligned.com

At 7/13/2005 09:52 PM, Kanwar Ranbir Sandhu wrote:

Does that help?

Thanks very much for the reply; unfortunately, I still do not know how to
proceed with updating my RT server to change the content of the
auto-generated emails.

I understand many of the things written below (except maybe the part about
Scrips). I get the general concept. I understand what it’s doing.

*** I DON’T KNOW HOW TO IMPLEMENT IT ***

Which file? What procedure? Where do I change the text and what must I do
to get my system to update once I do make the appropriate changes?

I have installed an entire, working, RT system by myself, so it’s not like
I don’t have some feel for this software.

For what it’s worth, I updated the ‘Autoreply’ portion of
/usr/local/rt3/etc/initialdata (my install is in /usr/local/rt3 and not
/opt/rt3) with the template found at
http://wiki.bestpractical.com/index.cgi?AutogeneratedPassword . I rebooted
my Apache server. No change in outbound email content (outbound email
still has the old, default content, no new links, even when I send from an
email account that’s not previously registered in the database/system).

What file must I change, what procedure must I follow, etc?

We have a Support queue in which we’ve created an auto reply template.

What exactly does this mean in terms of the nuts and bolts of a file
sytem, a web page, what? What interface? Which file? Which URL?

Still searching…

-Matt

At 7/13/2005 09:52 PM, Kanwar Ranbir Sandhu wrote:>On Wed, 2005-13-07 at 21:28 -0500, Matt England wrote:

Bottom line: I don’t know the procedure for getting the
autoreply-email-text to change. I put the changes into etc/initialdata,
rebooted my webserver, and still not change in my autoreply email. :frowning:

We have a Support queue in which we’ve created an auto reply template.
The template itself contains the code required to auto generate a
password if the user doesn’t have one already, or to simply remind
him/her how to have it reset if the password has been forgotten.

The template is based almost entirely on the one in the wiki. Here’s
the relevant bit from our template:

{
*RT::User::GenerateRandomNextChar = &RT::User::_GenerateRandomNextChar;

if (($Transaction->CreatorObj->id != $RT::Nobody->id) &&

(!$Transaction->CreatorObj->Privileged) &&
($Transaction->CreatorObj->__Value('Password') eq '*NO-PASSWORD*')
) {

    my $user = RT::User->new($RT::SystemUser);
    $user->Load($Transaction->CreatorObj->Id);
    my ($stat, $pass) = $user->SetRandomPassword();

    if (!$stat) {
            $OUT .= "An internal error has occurred. Request Tracker

was not able to set a password for you. Please phone Systems Aligned
Technical Support for assistance.";

    }

$OUT .= "You can review the current status and history of your requests
at:

    ".$RT::WebURL."

Our technical support system has automatically assigned you a password.
When prompted, enter the following user name and password at the login
page:

    User name: ".$user->Name."
    Password : ".$pass."

We recommend you change your password after you sign into the support
website.
";
}
else
{

$OUT .= “If you do not remember your password for the Support website,
you can reset it by sending an email to [ some address ]
with the subject, Reset Password. Your password will be automatically
reset and the new one emailed to you.”;
}
}

We use a basic scrip that fires when an email is sent to the Support
queue. The auto reply (above) is the one that is sent out.

Does that help?

Regards,

Ranbir

Kanwar Ranbir Sandhu
Systems Aligned Inc.
www.systemsaligned.com


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Be sure to check out the RT Wiki at http://wiki.bestpractical.com

Matt England wrote:

At 7/13/2005 09:52 PM, Kanwar Ranbir Sandhu wrote:

Does that help?

Thanks very much for the reply; unfortunately, I still do not know how
to proceed with updating my RT server to change the content of the
auto-generated emails.

I understand many of the things written below (except maybe the part
about Scrips). I get the general concept. I understand what it’s doing.

*** I DON’T KNOW HOW TO IMPLEMENT IT ***
Don’t worry, be happy.

Which file? What procedure? Where do I change the text and what must I
do to get my system to update once I do make the appropriate changes?
You don’t need touch any initial data. All you need you can do after
installation in the WebUI.
Login as root or other user with SuperUser right.

I have installed an entire, working, RT system by myself, so it’s not
like I don’t have some feel for this software.

For what it’s worth, I updated the ‘Autoreply’ portion of
/usr/local/rt3/etc/initialdata (my install is in /usr/local/rt3 and not
/opt/rt3) with the template found at
http://wiki.bestpractical.com/index.cgi?AutogeneratedPassword . I
rebooted my Apache server. No change in outbound email content
(outbound email still has the old, default content, no new links, even
when I send from an email account that’s not previously registered in
the database/system).

What file must I change, what procedure must I follow, etc?
Goto Configuration tab in the WebUI, then Global->Templates.
Select ‘autoreply’ template. You should see page where you can edit
template.

Edit template.
Save changes.
Try again to send email.

We have a Support queue in which we’ve created an auto reply template.
If queue specific autoreply template then edit it.

At 7/13/2005 09:52 PM, Kanwar Ranbir Sandhu wrote:

Does that help?

Thanks very much for the reply; unfortunately, I still do not know how to
proceed with updating my RT server to change the content of the
auto-generated emails.

I understand many of the things written below (except maybe the part about
Scrips). I get the general concept. I understand what it’s doing.

*** I DON’T KNOW HOW TO IMPLEMENT IT ***

Ah. You’ve unfortunately complicated the matter - it’s much easier than
you think.

You create, edit, delete (and so on) templates and scrips from the RT
web interface. Log in as the root user, and just click on the
Configuration link in the left pane. You’ll be able to make the changes
you want.

HTH,

Ranbir
Kanwar Ranbir Sandhu
Systems Aligned Inc.
www.systemsaligned.com

At 7/14/2005 07:12 AM, Ruslan U. Zakirov wrote:

Goto Configuration tab in the WebUI, then Global->Templates.
Select ‘autoreply’ template. You should see page where you can edit
template.

Excellent. Thank you, problem solved. :slight_smile:

I have updated the following wiki page with the procedure:

http://wiki.bestpractical.com/index.cgi?Template

*** I DON’T KNOW HOW TO IMPLEMENT IT ***
Don’t worry, be happy.

Just trying to makes sure the issue got some attention while asking the
question for the 3rd time. I’m quite happy. :slight_smile:

-Matt