Rebuild Groups Table

To list,

I’m looking thru a bunch of tickets (created back when we upgraded to 3.8.7)
and I noticed there were no requestors for those tickets. I went into each
of those tickets to add a Requestor and Viola’ I got an error saying the
group couldn’t be found. Sure enough, there are a WHOLE SERIES of tickets
that have no requestors and no groups (AdminCc, Cc, Requestors, Owners).
Soooo, I was wondering if anyone had any SQL or code to correct this
situation.

I’m thinking if I just add the Groups using SQL, then I could just do a bulk
update within RT to get Requestors in those tickets. By going at it that
way, I should have to worry about the ACL, etc.

Any thoughts?

Kenn
LBNL

I’m looking thru a bunch of tickets (created back when we upgraded to 3.8.7) and I noticed
there were no requestors for those tickets. I went into each of those tickets to add a
Requestor and Viola’ I got an error saying the group couldn’t be found. Sure enough, there are
a WHOLE SERIES of tickets that have no requestors and no groups (AdminCc, Cc, Requestors,
Owners). Soooo, I was wondering if anyone had any SQL or code to correct this situation.

I’m thinking if I just add the Groups using SQL, then I could just do a bulk update within RT
to get Requestors in those tickets. By going at it that way, I should have to worry about the
ACL, etc.

How exactly did you lose the groups?

I suggest seeing what rt-validator has to say about your dataset.

-kevin

Kevin,

What is rt-validator?

Kenn
LBNLOn Tue, Jun 21, 2011 at 12:14 PM, Kevin Falcone falcone@bestpractical.comwrote:

On Tue, Jun 21, 2011 at 12:10:02PM -0700, Kenneth Crocker wrote:

I’m looking thru a bunch of tickets (created back when we upgraded to
3.8.7) and I noticed
there were no requestors for those tickets. I went into each of those
tickets to add a
Requestor and Viola’ I got an error saying the group couldn’t be
found. Sure enough, there are
a WHOLE SERIES of tickets that have no requestors and no groups
(AdminCc, Cc, Requestors,
Owners). Soooo, I was wondering if anyone had any SQL or code to
correct this situation.

I’m thinking if I just add the Groups using SQL, then I could just do
a bulk update within RT
to get Requestors in those tickets. By going at it that way, I should
have to worry about the
ACL, etc.

How exactly did you lose the groups?

I suggest seeing what rt-validator has to say about your dataset.

-kevin


2011 Training: http://bestpractical.com/services/training.html

Kevin,

I also noticed, while perusing the DB, that there are a lot of gaps in
ticket numbers and the create dates are in the evening when no one is around
in the building, usually around midnight (TICKETS sorted in ID sequence).

Kenn
LBNLOn Tue, Jun 21, 2011 at 12:39 PM, Kenneth Crocker kfcrocker@lbl.gov wrote:

Kevin,

What is rt-validator?

Kenn
LBNL

On Tue, Jun 21, 2011 at 12:14 PM, Kevin Falcone <falcone@bestpractical.com wrote:

On Tue, Jun 21, 2011 at 12:10:02PM -0700, Kenneth Crocker wrote:

I’m looking thru a bunch of tickets (created back when we upgraded to
3.8.7) and I noticed
there were no requestors for those tickets. I went into each of those
tickets to add a
Requestor and Viola’ I got an error saying the group couldn’t be
found. Sure enough, there are
a WHOLE SERIES of tickets that have no requestors and no groups
(AdminCc, Cc, Requestors,
Owners). Soooo, I was wondering if anyone had any SQL or code to
correct this situation.

I’m thinking if I just add the Groups using SQL, then I could just do
a bulk update within RT
to get Requestors in those tickets. By going at it that way, I should
have to worry about the
ACL, etc.

How exactly did you lose the groups?

I suggest seeing what rt-validator has to say about your dataset.

-kevin


2011 Training: http://bestpractical.com/services/training.html

I also noticed, while perusing the DB, that there are a lot of gaps in ticket numbers and the
create dates are in the evening when no one is around in the building, usually around midnight
(TICKETS sorted in ID sequence).

 What is rt-validator?

Kenn

rt-validator ships with RT. Just run find /opt/rt3 -name rt-validator
and read the documentation.

You’ve not given any information that would allow me to comment on
ticket id gaps.

-kevin

Kevin,

Probably because I’m embarassed ;-). I’ve been really stumped as to what
happend and now I’ve finally determined that ALL these tickets (120) with
missing GROUP/PRINCIPALS Table records were created within 3 seconds and ALL
in the same Queue over a year ago. That lead me to conclude that I had a
User that went ahead and created a temporary scrip to mass create some
tickets and failed to insert a GROUPS & PRINCIPALS record for each ticket in
that code (BAD TOAD!!). I’ll be stopping by his office for a few words (of
wisdom).

This can be corrected, so no big deal at the moment, since all these tickets
belong to the same person.

By the way, I got rt-validator to run. Thanks. I’m going to set up a monthly
cron job to run it so I can monitor stuff like this.

Thanks for your help.

Kenn
LBNLOn Tue, Jun 21, 2011 at 1:34 PM, Kevin Falcone falcone@bestpractical.comwrote:

On Tue, Jun 21, 2011 at 12:46:00PM -0700, Kenneth Crocker wrote:

I also noticed, while perusing the DB, that there are a lot of gaps in
ticket numbers and the
create dates are in the evening when no one is around in the building,
usually around midnight
(TICKETS sorted in ID sequence).

 What is rt-validator?

Kenn

rt-validator ships with RT. Just run find /opt/rt3 -name rt-validator
and read the documentation.

You’ve not given any information that would allow me to comment on
ticket id gaps.

-kevin


2011 Training: http://bestpractical.com/services/training.html