Hi ,
I want to update the parent issue custom field value after creating the child issue . I use the post-function of workflow , but it doesn't work .
This is the script :
import com.atlassian.jira.issue.CustomFieldManager;
import com.atlassian.jira.issue.fields.CustomField;
import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.issue.CustomFieldManager;
import com.atlassian.jira.issue.MutableIssue;
import com.atlassian.jira.issue.Issue;
CustomFieldManager customFieldManager = ComponentAccessor.getCustomFieldManager();
Issue pIssue = issue.getParentObject();
CustomField totalAmount = customFieldManager.getCustomFieldObjectByName("my custom field");
MutableIssue mutableIssue = (MutableIssue) pIssue;
mutableIssue.setCustomFieldValue(totalAmount, 200);
Please help confirm the cause of the problem . Any and all help would be appreciated. Thanks