How to get TextAreaCFType value?

Hi,

I have a custom field Free Text Field (unlimited text)

I need to retrive the newly entered values for this custom field from a page

I tried like below

final String newvalue = (String)cusfieldtype.getValueFromCustomFieldParams((CustomFieldParams)formValues);

But i'm getting the below error

java.lang.ClassCastException: java.lang.String cannot be cast to com.atlassian.jira.issue.customfields.view.CustomFieldParams

I can able to retrive for Label Custom field type values from the below code

final Set<Label> newvalues = (Set<Label>)type.getValueFromCustomFieldParams((CustomFieldParams)formValue);

Can anyone suggested me how to retrive the newly entered valued from Textfield area?

Thanks.

3 answers

normally the following way we use to get field value from issue

CustomFieldManager cfm = ComponentAccessor.getCustomFieldManager();
CustomField customField=cfm.getCustomFieldObjectByName("Customfield name");
String value=(String)issue.getCustomFieldValue(customField);

Yes, This is to retrive the already existing values from that field. But What i need is

i have this custom field on my .vm page. So i need to get the newly entered values from that page before sending to next page.

Yes, This is to retrive the already existing values from that field. But What i need is

i have this custom field on my .vm page. So i need to get the newly entered values from that page before sending to next page.

To retrive that i tried in above mentioned way. But getting error

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,756 views 11 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot