TF401320: Rule Error for field "Responsible" when creating work item via Exalate

I am trying to synchronize work items from Azure DevOps to Jira using Exalate. I’m encountering the following error when creating a work item in Azure DevOps:

TF401320: Rule Error for field Responsible. Error code: Required, HasValues, AllowsOldValue, InvalidEmpty

Here’s what I have done so far:

  • I have a valid user in Azure DevOps: malin.harbu@rema.no.

  • I am trying to set the assignee like this:

def defaultAssignee = "malin.harbu@rema.no"
def projectName = "REMA1000"
workItem."System.AssignedTo" = nodeHelper.getUserByEmail(defaultAssignee, projectName)
replica.assignee = workItem."System.AssignedTo"

  • I’ve tried adding a fallback to the display name ("Malin Harbu") if the email lookup fails.

  • I’ve ensured the user has access to the project.

Despite this, I still get the TF401320 error, and it appears Azure DevOps is rejecting the creation because the field Responsible is empty.

Some observations:

  1. System.AssignedTo is set correctly.

  2. The error references Responsible, which may be a custom required field in our process template.

  3. The field is required and cannot be empty (InvalidEmpty).

My questions:

  • How can I correctly set the required Responsible field via Exalate?

  • Is there a way to programmatically determine the internal field name of a required custom field in Azure DevOps?

  • Are there any known best practices for populating both System.AssignedTo and a custom “Responsible” field to avoid TF401320?

Any guidance or examples would be greatly appreciated.

Thanks in advance!

You’re running into the TF401320 error because Azure DevOps is enforcing a required custom field (“Responsible”) that isn’t being set during work item creation via Exalate. Here’s how you can address your questions:

  1. How to set the required “Responsible” field via Exalate:

    • You need to explicitly set the custom field in your Incoming sync script for Azure DevOps. The syntax is:
      workItem.customFields."Responsible" = <value>
      
      Replace <value> with the appropriate user or value that the “Responsible” field expects. If it’s a user field, ensure the value matches the expected format (often the display name or email, depending on your process template).
  2. How to determine the internal field name of a custom field:

    • In most cases, the display name (as seen in the Azure DevOps UI) is used in the script, e.g., workItem.customFields."Responsible". If you’re unsure, you can check your Azure DevOps process template or use the Azure DevOps API to list field references. Exalate’s documentation also suggests using the display name directly in the script. See: How to Sync Custom Fields in Azure DevOps.
  3. Best practices for populating both “System.AssignedTo” and a custom “Responsible” field:

    • Set both fields explicitly in your Incoming sync script:
      workItem."System.AssignedTo" = nodeHelper.getUserByEmail(defaultAssignee, projectName)
      workItem.customFields."Responsible" = workItem."System.AssignedTo"
      
      Or, if “Responsible” expects a different format, adjust accordingly. Make sure the value you assign is valid for that field (e.g., a user object, display name, or email).

Key points:

  • Always set all required fields in the Incoming sync script to avoid creation errors.
  • If you’re not sure about the field’s expected value format, check your Azure DevOps process or use the API to inspect field details.
  • For more on syncing custom fields, see: How to Sync Custom Fields in Azure DevOps.
  • For handling required field errors, see: Unblocking Required Fields Error.

This approach should resolve the TF401320 error and ensure both “System.AssignedTo” and “Responsible” are set correctly during synchronization.

Hi @abdullahr99

Can you please update us whether the response given by @Aida helped or not? Also , can you try to use store function? So here would be your script:

<your other fields>

store(workItem) 

<set Responsible custom field>

Thanks,

Sonal

Unfortunately it did not help as I am still getting the same error

Hi @abdullahr99

Seems like the name of the custom field you provided is not correct. You can do mouse hover to the field which will give you the name of custom Field.

Thanks,

Sonal

More information is provided here as well:

Hi @abdullahr99

May I know if the information shared by Sonal was helpful or you are still experiencing issues?