Originally asked by Andres Martynowicz on 05 January 2022 (original question)
We are trying to map servicenow RITM to Jira stories. We are done with all the fields but we are stuck with mapping reference field. We are stuck with mapping Servicenow assign to field with reporter on Jira and we are having issue in mapping fields having dates.
First thing is we need help or code snippet for mapping assigned to(reference variable) in servicenow to Jira. Code is as below:
def openedby= entity.opened_by.display_value
replica.reporter = openedby
Second thing is we are mapping due date in Jira to due date in servicenow. Script is as below, we are getting couldn’t able to apply changes.
def pattern = “yyyy-MM-dd HH:mm:ss”
input = replica.due_date
debug.error(“replica.due_date ${replica.due_date}”)
entity.due_date = new SimpleDateFormat(pattern).parse(input)