I need to copy custom field i.e (checkbox here) value of epic to child story checkbox field (custom field again).
I tried doing this
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.util.DefaultIssueChangeHolder
import com.atlassian.jira.issue.ModifiedValue
def field = ComponentAccessor.getCustomFieldManager().getCustomFieldObject('customfield_10434')
Issue currentIssue = getIssueContext() as Issue
def parentFieldValue = currentIssue.parentObject.getCustomFieldValue(field)
def changeHolder = new DefaultIssueChangeHolder();
def currentIssueStatus = currentIssue.getStatus().getName()
if(currentIssueStatus=="Open"){
field.updateValue(null, currentIssue, new ModifiedValue(currentIssue.getCustomFieldValue(field), parentFieldValue),changeHolder);
}
but seems its not working..any leads are appreciated.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.