Jira Copy Custom Field to Another Customer Field
(Backup your data first, use at your own risk)
set @rank=0;
INSERT INTO jiradb.customfieldvalue
SELECT 12101 + @rank:=@rank+1 as ID,
a.ISSUE,
10308 as CUSTOMFIELD,
a.UPDATED,
a.PARENTKEY,a.STRINGVALUE, a.NUMBERVALUE,a.TEXTVALUE,
a.DATEVALUE,
a.VALUETYPE
FROM jiradb.customfieldvalue a
left join
jiradb.customfieldvalue b
on a.ISSUE = b.ISSUE and b.CUSTOMFIELD = 10308
where a.CUSTOMFIELD = 10800 and a.ISSUE = 11763;
where
12101 is the max(ID) of the table to insert into
10308 is the new customerfieldID to be inserted
10800 is the from customfieldID to get the data from
11763 is only to do one issue to make sure it works first