The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Updating the custom field through the Java code

Sandesh TM
Contributor
December 4, 2023

We need to update the custom field of Text field(read only) through the Java code using the updateValue method but it is not working. 

Please let us know us the solution.

Here is the code snippet we used.

 Issue tdIssue = issueManager.getIssueObject(tiereviewId);

CustomField enableButtonField2 = customFieldManager.getCustomFieldObjectByName(text field name);

String enableButtonText2 = (String)tdIssue.getCustomFieldValue(enableButtonField2);        

CustomField enableButtonField = customFieldManager.getCustomFieldObjectByName(text field name);

enableButtonField.updateValue(null, tdIssue, new ModifiedValue(enableButtonText2,"yes"), new DefaultIssueChangeHolder());

CustomField enableButtonField1 = customFieldManager.getCustomFieldObjectByName(text field name);

String enableButtonText1 = (String)tdIssue.getCustomFieldValue(enableButtonField1);

0 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

TAGS
AUG Leaders

Atlassian Community Events