1
0
-1

Dear sir,

I want to know how to sync the customer's components and map them to my Select List (cascading) field "FunctionGroup".

I search the doc, no such examples, could you please help me? Thanks in advance.

Map fields
Customer JIRA instanceMy JIRA Instance
Component/sFunctionGroup Parent field
HW Hardware
ClusterCluster
InfraInfra
BSPBSP
Android-HAL IVI
AudioAudio
MCUVIP
SRSSYS
aaaaOther
bbbb
cccc
dddd
….


 

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Cascading fields are documented in Syncing cascading select custom fields

      Incoming Sync - Target Jira - Untested
      // get the first component out of the components list sent over from the customer jira
      def remoteComponentName = replica.components?.first().name
      
      // component map allows to map the name of the component to the local value
      def componentMapping = [
          // "remote component name" : "target parent"
          "HW" : "Hardware",
          "Cluster" : "Cluster",
          "Android-HAL" : "IVI",
      ]
      
      // Find the mapped value, default to 'Hardware'
      def targetValue = componentMapping[remoteComponentName] ?: "Hardware"
      
      def parent = nodeHelper.getOption(issue, "FunctionGroup", targetValue)
      issue.customFields."FunctionGroup".value = nodeHelper.getCascadingSelect(parent,"")

      Let me know if this helps

      1. Helen Li

        Greate. Thanks so much.

      CommentAdd your comment...