HPQC: Connector Error failed on attempt to create QC Requirement
search cancel

HPQC: Connector Error failed on attempt to create QC Requirement

book

Article ID: 105955

calendar_today

Updated On:

Products

Rally On-Premise Rally SaaS

Issue/Introduction

When trying to use a COPY service to copy work items from Agile Central into HP ALM via the HPQC Connector, the following error is seen in the log:
[2018-07-10 21:12:32 Z] ERROR : RallyEIF::WRK::QCConnection.rescue in create_internal - failed on attempt to create QC Requirement item from src item 
[2018-07-10 21:12:32 Z]  WARN : RallyEIF::WRK::QCConnection.initialize - Could not create requirement - QCAPI - HTTP-500 on request - http://qc.domain.com/qcbin/rest/domains/YOURDOMAIN/projects/YOURPROJECT/requirements.
Response was: {"Id":"qccore.unknown-field-name","Title":"Entity: requirement doesn't have a field named: user-03","ExceptionProperties":[],"StackTrace":null} - 
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rally_hp_alm_api-1.0.5/lib/rally_hp_alm_api/qc_rest_json.rb:180:in `send_request'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rally_hp_alm_api-1.0.5/lib/rally_hp_alm_api/client/hp_client.rb:69:in `send_request'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rally_hp_alm_api-1.0.5/lib/rally_hp_alm_api/client/hp_client.rb:155:in `create'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rallyeif-qc-4.8.2/lib/rallyeif/qc/qc_connection/qc_connection.rb:766:in `create_internal'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rallyeif-wrk-1.3.0/lib/rallyeif/wrk/connection.rb:454:in `create'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rallyeif-wrk-1.3.0/lib/rallyeif/wrk/connector.rb:358:in `copy_to_other'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rallyeif-wrk-1.3.0/lib/rallyeif/wrk/connector_runner.rb:470:in `block in process_service_artifacts'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rally_api-1.2.1/lib/rally_api/rally_query_result.rb:22:in `block in each'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rally_api-1.2.1/lib/rally_api/rally_query_result.rb:21:in `each'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rally_api-1.2.1/lib/rally_api/rally_query_result.rb:21:in `each'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rallyeif-wrk-1.3.0/lib/rallyeif/wrk/connector_runner.rb:467:in `process_service_artifacts'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rallyeif-wrk-1.3.0/lib/rallyeif/wrk/connector_runner.rb:409:in `process_service'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rallyeif-wrk-1.3.0/lib/rallyeif/wrk/connector_runner.rb:529:in `block in run_services'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rallyeif-wrk-1.3.0/lib/rallyeif/wrk/connector_runner.rb:528:in `each'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rallyeif-wrk-1.3.0/lib/rallyeif/wrk/connector_runner.rb:528:in `run_services'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rallyeif-wrk-1.3.0/lib/rallyeif/wrk/connector_runner.rb:347:in `block in run'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rallyeif-wrk-1.3.0/lib/rallyeif/wrk/connector_runner.rb:286:in `each'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rallyeif-wrk-1.3.0/lib/rallyeif/wrk/connector_runner.rb:286:in `run'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rallyeif-qc-4.8.2/bin/ca_agile_central2_hpalm_connector.rb:12:in `<top (required)>'
C:/Ruby22-x64/bin/ca_agile_central2_hpalm_connector.rb:23:in `load'
C:/Ruby22-x64/bin/ca_agile_central2_hpalm_connector.rb:23:in `<main>'
[2018-07-10 21:12:32 Z] ERROR : RallyEIF::WRK::Connector.rescue in copy_to_other - Unable to create a ALM requirement with these field values: {"RQ_REQ_NAME"=>"User Story Title", :RQ_USER_01=>"236183553420", "user-03"=>"US12", "type-id"=>"0", "description"=>"<html><body>Description</body></html>", "parent-id"=>"0"}, Could not create requirement - QCAPI - HTTP-500 on request - http://qc.domain.com/qcbin/rest/domains/YOURDOMAIN/projects/YOURPROJECT/requirements.
Response was: {"Id":"qccore.unknown-field-name","Title":"Entity: requirement doesn't have a field named: user-03","ExceptionProperties":[],"StackTrace":null} - 
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rally_hp_alm_api-1.0.5/lib/rally_hp_alm_api/qc_rest_json.rb:180:in `send_request'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rally_hp_alm_api-1.0.5/lib/rally_hp_alm_api/client/hp_client.rb:69:in `send_request'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rally_hp_alm_api-1.0.5/lib/rally_hp_alm_api/client/hp_client.rb:155:in `create'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rallyeif-qc-4.8.2/lib/rallyeif/qc/qc_connection/qc_connection.rb:766:in `create_internal'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rallyeif-wrk-1.3.0/lib/rallyeif/wrk/connection.rb:454:in `create'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rallyeif-wrk-1.3.0/lib/rallyeif/wrk/connector.rb:358:in `copy_to_other'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rallyeif-wrk-1.3.0/lib/rallyeif/wrk/connector_runner.rb:470:in `block in process_service_artifacts'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rally_api-1.2.1/lib/rally_api/rally_query_result.rb:22:in `block in each'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rally_api-1.2.1/lib/rally_api/rally_query_result.rb:21:in `each'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rally_api-1.2.1/lib/rally_api/rally_query_result.rb:21:in `each'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rallyeif-wrk-1.3.0/lib/rallyeif/wrk/connector_runner.rb:467:in `process_service_artifacts'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rallyeif-wrk-1.3.0/lib/rallyeif/wrk/connector_runner.rb:409:in `process_service'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rallyeif-wrk-1.3.0/lib/rallyeif/wrk/connector_runner.rb:529:in `block in run_services'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rallyeif-wrk-1.3.0/lib/rallyeif/wrk/connector_runner.rb:528:in `each'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rallyeif-wrk-1.3.0/lib/rallyeif/wrk/connector_runner.rb:528:in `run_services'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rallyeif-wrk-1.3.0/lib/rallyeif/wrk/connector_runner.rb:347:in `block in run'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rallyeif-wrk-1.3.0/lib/rallyeif/wrk/connector_runner.rb:286:in `each'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rallyeif-wrk-1.3.0/lib/rallyeif/wrk/connector_runner.rb:286:in `run'
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rallyeif-qc-4.8.2/bin/ca_agile_central2_hpalm_connector.rb:12:in `<top (required)>'
C:/Ruby22-x64/bin/ca_agile_central2_hpalm_connector.rb:23:in `load'
C:/Ruby22-x64/bin/ca_agile_central2_hpalm_connector.rb:23:in `<main>'

Environment

HP ALM Work Item Connector 4.8.x

Cause

This can happen when the following conditions exist in the configuration

Requirement type is not the default (Undefined)
Trying to define this alternate requirement type using RQ_REQ_TYPE
The field you are trying to store data in is not active in the Undefined requirement type

This happens because the connector does not regard RQ_REQ_TYPE when it goes to create the requirement.  The connector tries to create the work item in the Undefined requirement type where the field is not enabled and QC throws the error that the field does not exist.

Resolution

Use the <RequirementType> attribute in place of the RQ_TYPE_ID.
  1. Remove the RQ_TYPE_ID reference in the <FieldDefaults> section. 
  2. Add a <RequirementType> attribute in the <QCConnection> section as shown in the below example:
<QCConnection> 

    <Url>http://qc</Url> 
    <User>MyUser</User> 
    <Password></Password> 

    <RequirementType>Functional</RequirementType> 

...

</QCConnection>