Hi All
I need to change one of my custom fields from 'Text Field' tp 'Free Text'.
Please let me know your suggestions.
Thanks
Vishnu.
As a possibly safer alternative to the above, you can try the copy custom field values function from the script runner plugin. So you could copy Ref Testcase to "Ref testcase new", verify everything looks OK, delete "Ref Testcase", then rename Ref Testcase New to Ref Testcase.
Advantage of this is that you don't need downtime to do it.
Thanks Jamie.
Sounds good. But is it possible to move values from one field to another using Jelly Runner ?
I do not prefer installing plugins.
Please offer your opinions.
Thanks, Vishnu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In theory it's possible with jelly runner, in practice not so much, not unless someone has already written how.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Deepnight,
I already got this.
"UPDATE
customfieldvalue
SET
textvalue=stringvalue
WHERE
ID=(
SELECT
ID
FROM
customfield
WHERE
customfieldtypekey=
'com.atlassian.jira.plugin.system.customfieldtypes:textfield'
AND
cfname=
'Text Field'
);"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, that SQL is correct - note the use of the "cfname" in the selection, you need to replace 'Text Field' with the actual name of your custom field that you want to change.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks to Both. You are right !!!
I faced another problem. I ran the following queries.
1. 1. UPDATE customfieldvalue SET textvalue=stringvalue WHERE ID=(SELECT ID FROM customfield WHERE
customfieldtypekey='com.atlassian.jira.plugin.system.customfieldtypes:textfield' AND cfname='Ref. Testcase');
2. UPDATE customfield SET CUSTOMFIELDTYPEKEY='com.atlassian.jira.plugin.system.customfieldtypes:textarea', CUSTOMFIELDSEARCHERKEY='com.atlassian.jira.plugin.system.customfieldtypes:textsearcher'
where cfname='Ref. Testcase';
The first one didn't change anything as The table ' customfieldvalue' doesn't have an entry for this field.
I avoided this and ran the second one which changed the field type. Restarted the JIRA, I lost values in this field of all issues. But the type has been chaged.
I guess the problem was I haven't changes the values to 'stringvalue'.
Do we have ant other table which keeps this liek 'customfieldvalue' ? This is JIRA 4.0.1.
Regards
Vishnu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Er, no, the table customfieldvalue IS where the data is kept. If you're saying you didn't find any in there, then you didn't have any data to change.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I fear the documentation is wrong (at least for jira 4.4). IMO instead of
{code}
UPDATE
customfieldvalue
SET
textvalue=stringvalue
WHERE
ID=(
SELECT
ID
FROM
customfield
WHERE
customfieldtypekey=
'com.atlassian.jira.plugin.system.customfieldtypes:textfield'
AND
cfname=
'Text Field'
);
It should be
{code}
UPDATE
customfieldvalue
SET
textvalue=stringvalue
WHERE
CUSTOMFIELD=(
SELECT
ID
FROM
customfield
WHERE
customfieldtypekey=
'com.atlassian.jira.plugin.system.customfieldtypes:textfield'
AND
cfname=
'Text Field'
);
note the part "WHERE
CUSTOMFIELD=(
SELECT
ID".
Try simple select and see if its really so.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.