Pull Parent Link data using Java API

Anil Mishra February 28, 2024

Hi,

I'm trying to pull parent link custom field data in my custom plugin using java api, however it is returning null whereas I'm able to pull data for other custom fields.

Also same code snipped working in scrip runner, not sure why it giving null in java api

Below is java code snipped which is returning null when pulling custom field value from issue

MutableIssue issueTest = ComponentAccessor.getIssueManager().getIssueByKeyIgnoreCase("C63500-2600");
Collection<CustomField> initiativeCustomFields = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectsByName("Parent Link");
CustomField parentLinkCustomField = initiativeCustomFields.iterator().next();
log.error("cf Name C63500-2600 :: {}",issueTest.getCustomFieldValue(parentLinkCustomField));

  

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events