Using Script Runner...
Problem:
I cannot get a customField value from an Epic to be inherited when I Create a new issue type that is linked to that Epic.
What I tried:
- I tried using the Post Function "Set Field Value from Parent" but technically the EPIC is not the parent...and, no dice.
- I then looked for a script to post using the "Conditional execution:" option in that same Post Function. I found a few script options to try, but I am running into issues with the variable values. The below script looks good, but any help will appreciated.
Values I know:
- The custom Field ID is the same on the EPIC and the New Issue
- For Reference, the Custom Field Name is "Activity Type" or the above custom id (11200). This is one of my hangups because I am not sure how to define this. Do I call it "ActivityType", "11200", etc
Code I found on this board and tried to manipulate:
Tried being the operative word. 
import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.issue.CustomFieldManager;
import com.atlassian.jira.issue.fields.CustomField;
import com.atlassian.jira.issue.Issue;
CustomFieldManager customFieldManager = ComponentAccessor.getCustomFieldManager();
if (issue.getIssueTypeObject().getName() == "Story" ) {
CustomField epicLink = customFieldManager.getCustomFieldObjectByName('Epic Link');
Issue epic = issue.getCustomFieldValue(epicLink);
if(epic)
{
issue.setActivityType(epic.getActivityType());
}
}
Please help. Will be much appreciated! 