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

Kenneth Crocker KFCrocker at lbl.gov
Wed Sep 10 14:00:14 EDT 2008


To whomever (can't find name in address),


	There might be a way IF the person that created the ticket is always 
the requestor. IF so, you could walk thru the TICKETS table and take 
every CREATOR and check to see if there is a MemberID for that CREATOR 
in the CACHEDGROUPMEMBERS Table for the ticket created. IF not, then you 
could re-establish the link via CLI OR you could do it manually using 
WebUI by printing out a list of those Tickets/Creators and using that 
list to go to each affected ticket and remove/add the correct requestor. 
I would not recommend re-creating the records with SQL because there may 
be ACL issues, etc that RT would normally take care of, hence using CLI. 
That's all I can think of at the moment. Hope this helps.


Kenn
LBNL

On 9/10/2008 9:03 AM, RT wrote:
> (For some reason, my message was cut off in the previous post.)
> 
> 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, 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.
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
> 
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
> 
> 
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
> Buy a copy at http://rtbook.bestpractical.com
> 




More information about the rt-users mailing list