I have an issue of the type Initiate which is linked to an issue type Automation. I want a script listener which would update a custom field for the type Automation if it updated in the issue type Initiate. Actual End Date and Actual Start Date are the two fields that are to be updated.
I have tried writing a script below. But it updating the same issue, which is of the issue type Initiate. Please help me with this.
def issue = event.getIssue()def user = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
log.warn("Issue updated event triggered listener")
IssueManager issueManager = ComponentAccessor.getIssueManager()
def changeHolder = new DefaultIssueChangeHolder()
def actualStartDate = ComponentAccessor.getCustomFieldManager().getCustomFieldObject("customfield_10400")
def actualEndDate = ComponentAccessor.getCustomFieldManager().getCustomFieldObject("customfield_10400")
def issueLinkManager = ComponentAccessor.getComponent(IssueLinkManager)
log.warn("Entered the Loop")
actualStartDate.updateValue(null, issue, new ModifiedValue(issue.getCustomFieldValue(actualStartDate), actualStartDate), changeHolder)
actualEndDate.updateValue(null, issue, new ModifiedValue(issue.getCustomFieldValue(actualEndDate), actualEndDate), changeHolder)
It’s very important to have access to the workflow process from anywhere. Especially if you manage the work of others. There is no difference whether you’re out of office, or drive a ca...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event