Re: [rt-users] Tickets with Owner= (no value)

2009-06-03 Thread Ken Crocker
Alberto,

When you say you removed a user via MySQL do you mean you merely 
dropped the record from the USERS Table?


Kenn
LBNL

On 6/3/2009 1:55 AM, Alberto Villanueva wrote:
 Good morning,

 Yesterday I removed a user (within MySQL) had several assigned
 tickets. Now these have Owner= (no value).

 I have tested next:

 1.- MySQL query, but I cannot select because Owner= (no value)
 2.- In RT: new Search / Batch update / (I cannot because RT says
 Only you can assign tickets that they haven't Owner or it's
 Nobody)

 Could I tell me how I assign the new owner?

 Best regards,

 ALBERTO VILLANUEVA DEL VAL 
 Consultant
 
 Altran Technologies
 ParqueEmpresarial Las Mercedes, Edificio 1 
 Campezo Street, 1- 28022 - Madrid, Spain
 Tel: + 34 91 744 46 00 - Ext: 2205
 Fax: + 34 91 415 24 57
 www.altran.es
   

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

 Community help: http://wiki.bestpractical.com
 Commercial support: sa...@bestpractical.com


 Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
 Buy a copy at http://rtbook.bestpractical.com

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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Tickets with Owner= (no value)

2009-06-03 Thread Ken Crocker

Alberto,

   If you removed the owners of a ticket by removing those user records 
from the USERS Table, then you will NEVER find those owners, nor will 
you be able to change the owner on those tickets that point to the 
removed UserId. The reason is that RT has several Tables that are 
updated when a Ticket gets an owner. RT cannot replace an owner on a 
ticket if it can't find the old one. RT tries to find the old one so it 
can remove him from group membership in the owner role for that 
ticket. This is just one reason why it is NEVER a good idea to remove a 
User from the DataBase manually.
   The problem now is that you have several tickets that have an ID in 
the owner field that points to a User record that does /not/ exist. VERY 
BAD! If you take a look at the history for any of those tickets, you 
will see that the history display stops with an error when it tries to 
find that (removed) UserId to show when they became an owner.
   I'm not sure if Ruslan or any of the other RT gurus have any 
recovery SQL that you can use. If they do not, I have some SQL code that 
will do the job, but it will be a process of steps for EACH User you 
removed from the DataBase. If no one from RT can help you with this, 
then let me know and I'll send you my SQL code/process and explain it to 
you so you can fix your DataBase.


Kenn
LBNL

On 6/3/2009 10:17 AM, Alberto Villanueva wrote:

Dear Ken,
 
Nowadays, I have several tickets without owner. I have search some 
queries, and I see tickets on RT with Owner no value. And I cannot 
assign a new owner. why can I do that?
 
Now I have run some simple queries :-) and I have the old ID (user), 
so I will be able to update these tickets :-)
 
My question is: do I have to update all tables (Principals, Groups, 
...) with the new user's ID? If the answer is YES, I'll try it 
tomorrow ;-). Else, explain me it, please.
 
thanks a lot! ;-)
 
 
Best regards,


ALBERTO VILLANUEVA DEL VAL
Consultant

Altran Technologies
ParqueEmpresarial Las Mercedes, Edificio 1
Campezo Street, 1- 28022 - Madrid, Spain
Tel: + 34 91 744 46 00 - Ext: 2205
Fax: + 34 91 415 24 57
www.altran.es
 



*De:* Ken Crocker [mailto:kfcroc...@lbl.gov]
*Enviado el:* miƩrcoles, 03 de junio de 2009 18:59
*Para:* Alberto Villanueva
*Asunto:* Re: [rt-users] Tickets with Owner= (no value)

Alberto,

You're database is now out of sync. Did you remember to remove
the appropriate records from the PRINCIPLALS, GROUPS,
GROUIPMEMBERS, CACHEDGROUPMEMBERS, ACL, ATTACHMENTS, 
TRANSACTIONS Tables as well as the ACLEquivilence record from the
USERS Table? All these records are tied to the user that is an
owner of a ticket. Removing Users manually from the DataBase is
highly discouraged. Now, if you can go back and see what the ID
was for that particular User record, you will need to re-create
it. If not, then you will have to go thru several SQL steps to
create the User all over again and then link that User ID to all
the records that WERE linked to the old UserID. Let me know what
your situation is. I've gone thru this several times and have my
own set of SQL that keeps all these table records in sync.

Kenn
LBNL

On 6/3/2009 9:36 AM, Alberto Villanueva wrote:

Alberto,



Hi,

  
When you say you removed a user via MySQL do you mean you 
merely dropped the record from the USERS Table?




Yes, only I dropped it from USERS table. I had a little error
:( :(

Any idea? :S

Thanks!

  

Kenn
LBNL

On 6/3/2009 1:55 AM, Alberto Villanueva wrote:


Good morning,

Yesterday I removed a user (within MySQL) had several
  

assigned
  

tickets. Now these have Owner= (no value).

I have tested next:

1.- MySQL query, but I cannot select because Owner= (no
  

value)
  

2.- In RT: new Search / Batch update / (I cannot because RT
  

says
  

Only you can assign tickets that they haven't Owner or it's
Nobody)

Could I tell me how I assign the new owner?

Best regards,

ALBERTO VILLANUEVA DEL VAL 
Consultant


Altran Technologies
ParqueEmpresarial Las Mercedes, Edificio 1 
Campezo Street, 1- 28022 - Madrid, Spain

Tel: + 34 91 744 46 00 - Ext: 2205
Fax: + 34 91 415 24 57
www.altran.es
  


___

  

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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


Discover RT's hidden secrets with RT Essentials from 
  
O'Reilly Media. 


Buy a copy at http://rtbook.bestpractical.com