Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Updating the custom field through the Java code

Sandesh TM 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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events