Jira 또는 Service Management 의 관리자 역할을 하다보면 간혹 사용자 제거가 필요한 경우를 만나게 된다. 이 때 삭제 대상 사용자가 생성했던 이슈의 assignee는 쉽게 변경할 수 있지만 생성된 코멘트의 작성자는 변경하기 어렵다.
서비스를 중지한다.
select id from jiraissue I join project P on P.id = I.project where P.pkey = 'GOT' and I.issuenum = 1; |
select AU.* from cwd_user CU join app_user AU on AU.lower_user_name = CU.lower_user_name where user_name in ('clevine','thor'); |
Result:
id | user_key | lower_user_name |
10000 | JiraUSER10000 | clevine |
10100 | JiraUSER10100 | thor |
update jiraaction set author = 'JiraUSER10100' where author = 'JiraUSER10000' and actiontype = 'comment' and issueid = 10000; |
서비스 시작