[rt-users] Repair CachedGroupMembers? was: 3.8.1 -- Ticket Search doesn't find Requestor?

RT rt at ragweed.net
Wed Sep 10 12:28:07 EDT 2008


All -

I would like to get opinions on repairing my database using SQL. If
there is a more graceful way to accomplish this using the RT perl
modules (RT::CachedGroupMembers, etc) any help is appreciated.

>From the "RT Essentials" book (http://is.gd/2rG6), we find that in
CachedGroupMembers:

id = any incremental value
GroupId = requestor group id
MemberId = MemberId in question (requestor)
Via = usually equal to the CachedGroupMembers id
ImmediateParentId = requestor group id
Disabled = 0

I'm going to work from the values in Ticket #1 (see previous message).

insert into CachedGroupMembers values ('', '52', '34', '', '52', '0');

** And Voila! ** The requestor appears in the regular Search as
expected, and is searchable by requestor in Query Builder.

And here is what it looks like in the end:

mysql> select * from CachedGroupMembers where GroupId='52' and
MemberId='34' and ImmediateParentId='52';
+-------+---------+----------+------+-------------------+----------+
| id    | GroupId | MemberId | Via  | ImmediateParentId | Disabled |
+-------+---------+----------+------+-------------------+----------+
| 81550 |      52 |       34 |    0 |                52 |        0 |
+-------+---------+----------+------+-------------------+----------+

Should the Disabled status be pulled from Principals? (select Disabled
from Principals where id = '34')

Any opinions on making these modifications is appreciated.

> RT Users -
>
> After some digging, I believe I've discovered why some tickets do not
> appear when searched by Requestor. It appears that some records are
> missing from CachedGroupMembers.
>
> Can anyone recommend a way of querying for the requestor from
> GroupMembers and using that to populate CachedGroupMembers?
> GroupMembers contains the correct requestors -- but that doesn't seem
> to apply to the standard Search functions.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20080910/6af5dcca/attachment.htm>


More information about the rt-users mailing list