Confluence has been updated to version 6.15.9

You can synchronize custom fields between HP QC/ALM and JIRA Instances.

In HP QC/ALM custom fields are called user fields. 

Available types of the user fields in HP QC/ALM defectAvailable types of the custom fields in HP QC/ALM test cases
  • String
  • Multi-line text field
  • Number field
  • Date 
  • User List 
  • Lookup list (multiple values support)
  • String
  • Number field
  • Date 
  • User List 
  • Lookup list (only single value support)

There are always two main configuration points: a source side that sends data and a destination side that receives data.

Source Side 

The sending side needs to add the custom field to the replica in the  Outgoing sync.

 

HP QC/ALM

Outgoing sync 

Defect custom field

//BG_USER_02 is a defect custom field name
replica.customFields."BG_USER_02" = defect.customFields."BG_USER_02"
Test case custom field
//TS_USER_05 is a test case custom field name
replica.customFields."TS_USER_05" = testCase.customFields."TS_USER_05"

JIRA

Add the code the Outgoing sync to send issue custom field value to the HP QC/ALM Instance.

Check how to sync custom fields on Jira for more details.

replica.customFields."custom field name" = issue.customFields."custom field name"

Note

You must use the correct custom field name to get the defect/testCase custom field value.


Destination side 

Incoming sync

JIRA

For simple field types like text custom field, you can just assign the value of the received custom field to the local one.

The replica.customFields is set by the remote Instance. The issue.customFields is the custom field in Jira.

This is an example of how to assign the value of the received HP QC/ALM custom field to the local JIRA custom field.

issue.customFields."Local Custom field name".value = replica.customFields."BG_USER_02"

Multi-select custom field type

Set the values received from the HP QC/ALM multi-select custom field to the Jira multi-select custom field options.

issue.customFields."Local Custom field name".value = replica.customFields."BG_USER_04"?.value?.collect { opt -> opt?.value }

HP QC/ALM

The replica.customFields  is set by the Jira Instance. The defect.customFields and testCase.CustomFields are the custom fields in HP QC/ALM defects and test cases.

This is an example of how to assign the value of the received Jira custom field to the local HP QC/ALM custom field.

Defect

//add value from the jira custom field into the defect custom field with name BG_USER_02
defect.customFields."BG_USER_02".value = replica.customFields."jira custom field name".value

Test case

//add value from the jira custom field into the test case custom field with name TS_USER_05
testCase.customFields."TS_USER_05".value = replica.customFields."jira custom field name".value

See Also