I have a Salesforce Case Custom Date field that I am trying to send to a JIRA custom date Field. I can see the long value in the remote replica but the field in JIRA is blank, there are no errors on the connection.
Salesforce Case Outgoing
replica.Escalation_Due_Date__c = entity.Escalation_Due_Date__c
Jira Incoming
import java.text.SimpleDateFormat;
def Date = new SimpleDateFormat(“MM-dd-yyyy”)
if (replica.customDateField) {
issue.customFields.“SLA Resolution Due Date”.value = new Date(replica.customDateField.longValue())
}
Nevermind I found the Issue I was not defining the Custom Field here is the fix
import java.text.SimpleDateFormat;
def Date = new SimpleDateFormat(“MM-dd-yyyy”)
if (replica.Escalation_Due_Date__c) {
issue.customFields.“SLA Resolution Due Date”.value = new Date(replica.Escalation_Due_Date__c.longValue())
}
hey @mathieu , I actually responded above realized my mistake In the Replica I never defined the custom field what ended up working was
import java.text.SimpleDateFormat;
def Date = new SimpleDateFormat(“MM-dd-yyyy”)
if (replica.Escalation_Due_Date__c) {
issue.customFields.“SLA Resolution Due Date”.value = new Date(replica.Escalation_Due_Date__c.longValue())
}