I try to correct script from exalate for Jira Cloud (try to help).
I - Code :
________
def cfTimeDetection = issue.customFields.‘Time and date of detection’
def detectionDate = replica.customFields.‘Date et heure de Détection’?.value
if (cfTimeDetection && detectionDate) {
cfTimeDetection.value = detectionDate
} else {
debug.error(
"\[SKIP\] Time and date of detection non accessible " +
"(cf=${cfTimeDetection}, value=${detectionDate})" +
"DEBUG CONTEXT firstSync=" + firstSync +
" issue.key=" + issue.key
)
_____________
2 - Log:
Error Detail Message:
[SKIP] Time and date of detection non accessible (cf=null, value=2026-04-13 06:30:00.0)DEBUG CONTEXT firstSync=true issue.key=null
_____
3 - Jira conf:
This issue ticket has this field has mandatory. So if we don’t affect the value it will exit with “field 10052 is requiered”.
I see when executing this incoming Jira Cloud script, when defining cfTimeDetection is not reading the custom field object, what type of custom field is it?
issue.customFields.‘Time and date of detection’ = replica.customFields.‘Date et heure de Détection’
Error Detail Message:
Request type `Incident` requires a custom field 10052 of type `com.atlassian.jira.plugin.system.customfieldtypes:datetime` but none was set through exalate config.
Is it possible the local date format is different from the one received in replica.customFields.‘Date et heure de Détection’
Try the following, add the the field in the Outgoing Script like:
replica.customFields."Time and date of detection" = issue.customFields."Time and date of detection"
debug(issue.customFields."Time and date of detection".value)
Manually add the time and date of detection, and check if the format matches.
if (issue.project?.key == “CEP”) {
replica.customFields.“Time and date of detection” = issue.customFields.“Time and date of detection”
} else if (issue.project?.key == “ESIC”) {
replica.customFields.“Date et heure de Détection” = issue.customFields."Date
}
debug(issue.customFields.“Time and date of detection”.value)
=> I didn’t succeed to read the log anywhere. Evenif I add debug.error script still going to Incoming Sync
Incoming Sync:
def cfTimeDetection = issue.customFields.‘Time and date of detection’
debug.error(cfTimeDetection.value)
=> com.exalate.api.exception.script.ScriptException: Cannot get property ‘value’ on null object
Why issue.key has a value now (before is null) ? I changed almost nothing just added log
def cfTimeDetection = issue.customFields.‘Time and date of detection’
def detectionDate = replica.customFields.‘Date et heure de Détection’?.value
def detection = issue.customFields.“Time and date of detection”?.value
if (cfTimeDetection && detectionDate) {
cfTimeDetection.value = detectionDate
} else {
//cfTimeDetection.value = new Date()
debug.error(
"\[SKIP\] Time and date of detection non accessible " +
"(cf=${cfTimeDetection}, value=${detectionDate})" + "DEBUG CONTEXT firstSync=" + firstSync +
" issue.key=" + issue.key + " " + issue.customFields."Time and date of detection"?.getClass()?.getName() + " Outgoing detection value = " + detection + "Outgoing detection type = " + detection?.getClass()?.getName()
)
}
Error Detail Message:
[SKIP] Time and date of detection non accessible (cf=null, value=null)DEBUG CONTEXT firstSync=false issue.key=CEP-28007 null Outgoing detection value = nullOutgoing detection type = null
[SKIP] Time and date of detection non accessible (cf=null, value=2026-04-13 06:30:00.0)DEBUG CONTEXT firstSync=true issue.key=null null Outgoing detection value = nullOutgoing detection type = null
As we concluded over the meeting, it seems the actual issue was with the name of the field, Exalate by some reason was unable to fetch the object and by making the change to use ID of the field, seems to have corrected the situation as we tested. Thanks for your time.