1
0
-1

Hello,

I have issue with the Jira to Jira synchronization due to "Due date" error: Your request could not be created. Check that the fields have been filled in correctly. Enter a value for the required field 'Due date'.  

One of the Jiras is not using the Due date field, but it is mandatory in the other.
I have tried to hardcode the value in the Due date field in the


This is the config of the incoming sync:


f(firstSync){
   issue.projectKey   = "ATH" 
   // Set type name from source issue, if not found set a default
  issue.typeName = replica.typeName
    def typeNameToIdMap = ["Tarea":"10009"]
    issue.customKeys.issueTypeId = typeNameToIdMap[replica.typeName] ?: "10009"
    
}
issue.summary      = replica.summary
issue.description  = replica.description
issue.comments     = commentHelper.mergeComments(issue, replica)
issue.attachments  = attachmentHelper.mergeAttachments(issue, replica)
issue.labels       = replica.labels
issue.due = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss z")
    .parse("2023-10-24 13:30:59 EET")

def priorityMapping = [
        // remote side priority <-> local side priority  
        "Highest priority" : "Alta", 
        "High priority" : "Media",
        "Medium priority" : "Baja",
        "Low priority" : "Muy Bajo Impacto"
        
    ]
def priorityName = priorityMapping[replica.priority?.name] ?: "Media" // set default priority in case the proper urgency could not be found
issue.priority = nodeHelper.getPriority(priorityName)



Could you advise me how to resolve this issue? 

  1. Ariel Aguilar

    Hi Andon,

    I just reproduced the scenario and the configuration should work with the system field "Due date", however thinking on other reasons why this is happening, could you verify if there is a custom field with name "Due date" which is a required value? If it's the case, you can do it by ID since issue.due will only work for the system field, and then you should get the cF ID and do something like:

    issue.customFields."10076"?.value = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss z").parse("2023-10-24 13:30:59 EET")

    Kind regards,

    Ariel

CommentAdd your comment...