search cancel

Rally Jira Adapter: Mapping a blocked (boolean) field from Rally to JIRA maps null

book

Article ID: 215531

calendar_today

Updated On:

Products

CA Agile Central SaaS (Rally)

Issue/Introduction

When mapping fields from Rally to JIRA, mapping the Blocked field on a story or feature (or other Boolean custom field) maps null values regardless of the value of the field.  

Mapping Blocked or boolean fields from JIRA to Rally works as expected.  

Cause

A boolean represented in json data ingested from Rally is not transforming as expected, resulting in a null value after the transformation, regardless of the value.  

Resolution

Until this can be fixed in the adapter code, the workaround for mapping blocked fields from Rally to JIRA is to make use of the Blocked Reason field. 

NOTE: This approach makes the assumption that if an item is blocked, the Blocked Reason field will be populated, and when an item is unblocked, the Blocked Reason field will be cleared.  

To implement this workaround:

1.  Add the following mappings to your affected Rally to JIRA cfg_obj_fld:

Source Field             Target Field             Default Value

Blocked Reason        Blocked                     true

2.  Add the following value mappings to this field mapping added above:

Source Value             Target Value

nil                                  false

Note that the same source field can be mapped to multiple target fields, so Blocked Reason can still also be used to map to a Blocked Reason field.  

 

Additional Information

Additional checks when implementing this workaround: 

Confirm that the "Blocked" field is NOT in the ac_sync_cfg for the source Rally object.  If it is present in the ac_sync_cfg, subsequent updates to Rally will fail, or updates to JIRA may be propagated as null.  

Be sure to clean out any stray entries in the ac_field table for the Blocked field that have null values in them. 

Ensure that the user_attribute = system_attribute in the ac_field_def table.  They should both be null for Blocked fields, but if the system_value != user_value in the ac_field table, then it may be that one is blank and the other null and so that integration does not see them as "equal".  Confirm that the value for both fields (user_attribute and system_attribute are equal, including if they are both blank or both null).  

Note that Blocked Reason cannot be mapped to Rally without setting the Blocked field, too.  If a non-null Blocked Reason is mapped to a Rally artifact and the artifact is not Blocked, the API will return a validation error:  "Validation error: HierarchicalRequirement.BlockedReasonBlocked must be set to true in order to set a Blocked Reason".