Send the Status custom field from ADO so that it populates the ADO - Status field in Asana

Hi,

I’m having trouble with the status not registering correctly and throwing an error in the intergration:

ADO outgoing:
replica.key = workItem.key
replica.assignee = workItem.assignee
replica.summary = workItem.summary
replica.description = workItem.description
replica.type = workItem.type
replica.status = workItem.status
replica.labels = workItem.labels
replica.priority = workItem.priority
replica.comments = workItem.comments
replica.attachments = workItem.attachments
replica.project = workItem.project
replica.areaPath = workItem.areaPath
replica.iterationPath = workItem.iterationPath
replica.parentId = workItem.parentId

replica.assignee = workItem.assignee
replica.“severity” = workItem.“Microsoft.VSTS.Common.Severity”
replica.“System.Tags” = workItem.“System.Tags”

// Custom Fields
replica.customFields.“Product” = workItem.customFields.“Product”
replica.“Microsoft.VSTS.Scheduling.StoryPoints” = workItem.“Microsoft.VSTS.Scheduling.StoryPoints”
replica.customFields.“TShirt” = workItem.customFields.“TShirt”
replica.customFields.“Start Date” = workItem.customFields.“Start Date”
replica.customFields.“Target Date” = workItem.customFields.“Target Date”
replica.customFields.“Finish Date” = workItem.customFields.“Finish Date”
replica.customFields.“Backlog Prioritization” = workItem.customFields.“Backlog Prioritization”
replica.customFields.“Release Assignment” = workItem.customFields.“Release Assignment”
replica.customFields.“Release Status” = workItem.customFields.“Release Status”
replica.customFields.“Product Release” = workItem.customFields.“Product Release”
replica.customFields.“Notes” = workItem.customFields.“Notes”
replica.customFields.“Production Deployment Version” = workItem.customFields.“Production Deployment Version”

// Custom Fields - Expected Outcome
replica.customFields.“ExpectedOutcome - Documentation” = workItem.customFields.“ExpectedOutcome - Documentation”
replica.customFields.“ExpectedOutcome - ImplementationWorkItems” = workItem.customFields.“ExpectedOutcome - ImplementationWorkItems”
replica.customFields.“ExpectedOutcome - ArchitectureRecommendations” = workItem.customFields.“ExpectedOutcome - ArchitectureRecommendations”
replica.customFields.“ExpectedOutcome - InfrastructureChanges” = workItem.customFields.“ExpectedOutcome - InfrastructureChanges”
replica.customFields.“ExpectedOutcome - MessageContractChanges” = workItem.customFields.“ExpectedOutcome - MessageContractChanges”
replica.customFields.“ExpectedOutcome - ProofOfConcept” = workItem.customFields.“ExpectedOutcome - ProofOfConcept”

// Custom Fields - Review Panel
replica.customFields.“ReviewPanel - ArchitectureReview” = workItem.customFields.“ReviewPanel - ArchitectureReview”
replica.customFields.“ReviewPanel - ArchitectureLead” = workItem.customFields.“ReviewPanel - ArchitectureLead”
replica.customFields.“ReviewPanel - AnalyticsReview” = workItem.customFields.“ReviewPanel - AnalyticsReview”
replica.customFields.“ReviewPanel - AnalyticsLead” = workItem.customFields.“ReviewPanel - AnalyticsLead”
replica.customFields.“ReviewPanel - InfrastructureReview” = workItem.customFields.“ReviewPanel - InfrastructureReview”
replica.customFields.“ReviewPanel - InfrastructureLead” = workItem.customFields.“ReviewPanel - InfrastructureLead”

/*
Custom Fields (CF)
How to send any field value from the source side to the destination side.
1/ Add the value to the replica object. Use the Field Name from the field or the API name:
How to Sync Work Item Fields Obtained through a REST API Call in Azure DevOps Server & Service | Exalate Documentation
2/ Uncomment this next statement out and change accordingly:
replica.customFields.“CF Name” = issue.customFields.“CF Name”
*/

// Exalate API Reference Documentation: Exalate API Reference Documentation
def isEpic = (entity.typeName == “project” || workItem.type?.name == “Epic”)

// Handle subtasks (entity.parentId exists)
if (entity.parentId && !isEpic) {
def localParent = syncHelper.getLocalIssueKeyFromRemoteId(entity.parentId.toLong(), “issue”)
if (localParent) {
replica.parentId = localParent.id
}
// If parent doesn’t exist, proceed without setting parentId
// It can be linked later when the parent is synced
}

// Handle project assignment (Features assigned to Epic projects in Asana)
if (entity.customFields.project?.value && !isEpic) {
def projectParent = syncHelper.getLocalIssueKeyFromRemoteId(entity.customFields.project.value.toLong(), “issue”)
if (projectParent) {
replica.parentId = projectParent.id
}
// If Epic project doesn’t exist, proceed without setting parentId
// It can be linked later when the Epic is synced
}

I believe you are missing the statement from the ADO outgoing script. As I am not 100% certain of the field name, please edit the following as needed and add to the ADO Outgoing script:

replica.customFields.“Status” = workItem.customFields.“Status”

Once you add this, please trigger a sync event from ADO and check if you received the data in the Remote Replica within Asana. If you see it, then the last step would be to populate it in the ADO - Status field in Incoming script of Asana (the line is already there but commented out).

Hope it helps.

Thanks
Majid