1
0
-1

Hi,


I've got a problem with customFields mapping.


On my Azure DevOps project I've got custom field called "Bug Type". It's a dropdown field and exists on "Bug" work item type. That's the mandatory field, so I need to fill it before new "Bug" item can be saved.


I'm trying to configure exalate, so that it exports item from Jira and creates it on DevOps.

Using script option to map field, and in case of "Bug Type" I just want to hardcode it to "Other" (it's one of the options available on the dropdown). To do so, in the "incoming sync" I've got:


issue.customFields."Bug Type".value = "Other"


It failes with: Cannot set property 'value' on null object


When I add question mark before .value, above error is gone, however import to DevOps fails because of validation (as mentioned before "Bug Type" is mandatory on my DevOps project).

issue.customFields."Bug Type"?.value = "Other"


"Bad response when creating work item - 400 - response body: TF401320: Rule Error for field Bug Type. Error code: Required, HasValues, LimitedToValues, AllowsOldValue, InvalidEmpty. One additional error occurred during validation of the work item. Please correct all errors and try again."


What I'm doing wrong? How can I fulfill a custom field when importing work item to Azure DevOps?


Thanks

JJ

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Looks like I found it out. Following format worked fine.


      issue."Bug Type" = "Other"

        CommentAdd your comment...