Hi everybody,
I'm working with two workflows, one for main JIRA and one for subtasks.
When I close a subtask I have a screen that ask the user to complete a date field.
I would like the value of this date field to be "injected" in another date field in the main JIRA.
I wrote a post script function that doesn't work. Can you please give me some help?
Here is the code:
//Imports nécessaires
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.ComponentManager
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.MutableIssue
def customFieldManager = ComponentAccessor.getCustomFieldManager()
MutableIssue parentIssue = issue.getParentObject() as MutableIssue
def cfSendingSFD = customFieldManager.getCustomFieldObjectByName("Deadline for sending the SFD")
def cFieldSendingSFD = customFieldManager.getCustomFieldObject("customfield_10801")
def cField = issue.getCustomFieldValue(cFieldSendingSFD)
parentIssue.setCustomFieldValue(cfSendingSFD, cField)
Thanks in advance.
Germain.