1
0
-1

I am trying to sync severity from Zendesk to JIRA. Severity is a custom field on both sides and the options are also same(Low, Medium, High, Blocker). I have tried the following


issue.customFields."Severity".value =  replica.customFields."Severity"?.value?.value

issue.customFields."Severity".value =  replica.customFields."Severity".value.value

issue.customFields."Severity".value =  replica.customFields."Severity".value


def remoteSeverity = replica.customFields."Severity"?.value?.value
issue.customFields."Severity".value = severityMap[remoteSeverity] ?: remoteSeverity
issue.customFields."Severity" = remoteSeverity.value


Keep getting the same error


Jira Cloud error
Field Specify a valid value for Severity: customfield_10108.

    CommentAdd your comment...

    1 answer

    1.  
      2
      1
      0

      Hi Gautam,

      We have seen Zendesk values are stored in lower case. Maybe you can try to do:

      Outgoing Zendesk:

      replica.customFields."Severity" =  issue.customFields."Severity"

      Incoming Jira:

      def severityMap = [
      "low": "Low", 
      "medium": "Medium",
      "high" : "High",
      "blocker" : "Blocker"
      ] // ["remote options" : "local option"]
      def remoteValue = replica.customFields."Severity".value 
      issue.customFields."Severity".value = severityMap[remoteValue] ?: remoteValue

      Kind regards,

      Ariel

      1. Gautam Dama

        Thanks Ariel, that did the trick!!

      2. Ariel Aguilar

        You're welcome!

        Ariel

      CommentAdd your comment...