|
Failed to add QC Defect to VSTS
Last post 03-10-2010 16:57 by ilpo. 9 replies.
-
03-09-2010 13:54
|
|
-
ianzero



- Joined on 12-15-2009
- Points 100
|
Failed to add QC Defect to VSTS
Found xml for bug id 82 2010-03-09 19:03:16,681 DEBUG JuvanderTFS.TfsConnection (:0) - Creating new TFS Bug using State Active... 2010-03-09 19:03:16,681 DEBUG JuvanderTFS.TfsConnection (:0) - Handling default value into field 'AreaID' 2010-03-09 19:03:16,681 DEBUG JuvanderTFS.TfsConnection (:0) - Handling default value into field 'IterationID' 2010-03-09 19:03:16,681 DEBUG JuvanderTFS.TfsConnection (:0) - Handling default value into field 'State' 2010-03-09 19:03:16,681 DEBUG JuvanderTFS.TfsConnection (:0) - Handling field 'BG_USER_05' into 'Work Item Type' 2010-03-09 19:03:16,681 DEBUG JuvanderTFS.TfsConnection (:0) - Writing value 'Bug' (IsTreePath=False, ''/'Bug') 2010-03-09 19:03:16,681 DEBUG JuvanderTFS.TfsConnection (:0) - Handling field 'BG_SUMMARY' into 'Title' 2010-03-09 19:03:16,681 DEBUG JuvanderTFS.TfsConnection (:0) - Writing value 'wwwwwwwwwwwwwwwwwwwwwwwwwwwwwww' (IsTreePath=False, ''/'wwwwwwwwwwwwwwwwwwwwwwwwwwwwwww') 2010-03-09 19:03:16,681 DEBUG JuvanderTFS.TfsConnection (:0) - Handling field 'BG_SEVERITY' into 'Severity' 2010-03-09 19:03:16,681 DEBUG JuvanderTFS.TfsConnection (:0) - Writing value '3-High' (IsTreePath=False, ''/'3-High') 2010-03-09 19:03:16,681 ERROR JuvanderTFS.TfsConnection (:0) - Field Severity NOT found in TFS Project 2010-03-09 19:03:16,681 DEBUG JuvanderTFS.TfsConnection (:0) - Handling field 'BG_RESPONSIBLE' into 'Assigned To' 2010-03-09 19:03:16,681 DEBUG JuvanderTFS.TfsConnection (:0) - Writing value '' (IsTreePath=False, ''/'') 2010-03-09 19:03:16,681 DEBUG JuvanderTFS.TfsConnection (:0) - Empty field value with no default value 2010-03-09 19:03:16,681 DEBUG JuvanderTFS.TfsConnection (:0) - Handling field 'BG_PRIORITY' into 'Priority' 2010-03-09 19:03:16,681 DEBUG JuvanderTFS.TfsConnection (:0) - Writing value '' (IsTreePath=False, ''/'') 2010-03-09 19:03:16,681 DEBUG JuvanderTFS.TfsConnection (:0) - Empty field value with no default value 2010-03-09 19:03:16,681 DEBUG JuvanderTFS.TfsConnection (:0) - Handling field 'BG_DETECTED_BY' into 'Created By' 2010-03-09 19:03:16,681 DEBUG JuvanderTFS.TfsConnection (:0) - Writing value 'test00' (IsTreePath=False, ''/'test00') 2010-03-09 19:03:16,681 DEBUG JuvanderTFS.TfsConnection (:0) - Handling field 'BG_DETECTION_DATE' into 'Created Date' 2010-03-09 19:03:16,681 DEBUG JuvanderTFS.TfsConnection (:0) - Writing value '03/09/2010 00:00:00' (IsTreePath=False, ''/'03/09/2010 00:00:00') 2010-03-09 19:03:16,681 DEBUG JuvanderTFS.TfsConnection (:0) - Handling field 'BG_DESCRIPTION' into 'Description' 2010-03-09 19:03:16,681 DEBUG JuvanderTFS.TfsConnection (:0) - Writing value '<html> <body>wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww</body> </html>' (IsTreePath=False, ''/'<html> <body>wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww</body> </html>') 2010-03-09 19:03:16,681 DEBUG JuvanderTFS.TfsConnection (:0) - Saving... 2010-03-09 19:03:16,696 ERROR JuvanderTFS.TfsConnection (:0) - Failed to add QC Defect to VSTS: <?xml version="1.0" encoding="utf-16"?><Entity xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <ChangedDateTime>0001-01-01T00:00:00</ChangedDateTime> <EntityField FieldDataMaster="None" EditStyle="" IsTreePath="false" ForceFieldUpdate="false" name="BG_ACTUAL_FIX_TIME" label="Actual Fix Time" technicalname="BG_ACTUAL_FIX_TIME" /> <EntityField FieldDataMaster="None" EditStyle="" IsTreePath="false" ForceFieldUpdate="false" name="BG_ATTACHMENT" label="Attachment" technicalname="BG_ATTACHMENT" /> <EntityField FieldDataMaster="None" EditStyle="" IsTreePath="false" ForceFieldUpdate="false" name="BG_BUG_ID" label="Defect ID" technicalname="BG_BUG_ID">82</EntityField> <EntityField FieldDataMaster="None" EditStyle="" IsTreePath="false" ForceFieldUpdate="false" name="BG_BUG_VER_STAMP" label="Version Stamp" technicalname="BG_BUG_VER_STAMP">1</EntityField> <EntityField FieldDataMaster="None" EditStyle="DateCombo" IsTreePath="false" ForceFieldUpdate="false" name="BG_CLOSING_DATE" label="Closing Date" technicalname="BG_CLOSING_DATE" /> <EntityField FieldDataMaster="None" EditStyle="ListCombo" IsTreePath="false" ForceFieldUpdate="false" name="BG_CLOSING_VERSION" label="Closed in Version" technicalname="BG_CLOSING_VERSION" /> <EntityField FieldDataMaster="None" EditStyle="" IsTreePath="false" ForceFieldUpdate="false" name="BG_CYCLE_ID" label="Cycle ID" technicalname="BG_CYCLE_ID" /> <EntityField FieldDataMaster="None" EditStyle="" IsTreePath="false" ForceFieldUpdate="false" name="BG_CYCLE_REFERENCE" label="TestSet Reference" technicalname="BG_CYCLE_REFERENCE" /> <EntityField FieldDataMaster="None" EditStyle="" IsTreePath="false" ForceFieldUpdate="false" name="BG_DESCRIPTION" label="Description" technicalname="BG_DESCRIPTION"><html><body>wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww</body></html></EntityField> <EntityField FieldDataMaster="None" EditStyle="UserCombo" IsTreePath="false" ForceFieldUpdate="false" name="BG_DETECTED_BY" label="Detected By" technicalname="BG_DETECTED_BY">test00</EntityField> <EntityField FieldDataMaster="None" EditStyle="ReleaseCycleSingleTreeCombo" IsTreePath="false" ForceFieldUpdate="false" name="BG_DETECTED_IN_RCYC" label="Detected in Cycle" technicalname="BG_DETECTED_IN_RCYC" /> <EntityField FieldDataMaster="None" EditStyle="ReleaseSingleTreeCombo" IsTreePath="false" ForceFieldUpdate="false" name="BG_DETECTED_IN_REL" label="Detected in Release" technicalname="BG_DETECTED_IN_REL" /> <EntityField FieldDataMaster="None" EditStyle="DateCombo" IsTreePath="false" ForceFieldUpdate="false" name="BG_DETECTION_DATE" label="Detected on Date" technicalname="BG_DETECTION_DATE">03/09/2010 00:00:00</EntityField> <EntityField FieldDataMaster="None" EditStyle="ListCombo" IsTreePath="false" ForceFieldUpdate="false" name="BG_DETECTION_VERSION" label="Detected in Version" technicalname="BG_DETECTION_VERSION" /> <EntityField FieldDataMaster="None" EditStyle="" IsTreePath="false" ForceFieldUpdate="false" name="BG_DEV_COMMENTS" label="Comments" technicalname="BG_DEV_COMMENTS" /> <EntityField FieldDataMaster="None" EditStyle="" IsTreePath="false" ForceFieldUpdate="false" name="BG_ESTIMATED_FIX_TIME" label="Estimated Fix Time" technicalname="BG_ESTIMATED_FIX_TIME" /> <EntityField FieldDataMaster="None" EditStyle="" IsTreePath="false" ForceFieldUpdate="false" name="BG_EXTENDED_REFERENCE" label="Extended Reference" technicalname="BG_EXTENDED_REFERENCE" /> <EntityField FieldDataMaster="None" EditStyle="" IsTreePath="false" ForceFieldUpdate="false" name="BG_HAS_CHANGE" label="Has Change" technicalname="BG_HAS_CHANGE" /> <EntityField FieldDataMaster="None" EditStyle="ListCombo" IsTreePath="false" ForceFieldUpdate="false" name="BG_PLANNED_CLOSING_VER" label="Planned Closing Version" technicalname="BG_PLANNED_CLOSING_VER" /> <EntityField FieldDataMaster="None" EditStyle="ListCombo" IsTreePath="false" ForceFieldUpdate="false" name="BG_PRIORITY" label="Priority" technicalname="BG_PRIORITY" /> <EntityField FieldDataMaster="None" EditStyle="TreeCombo" IsTreePath="false" ForceFieldUpdate="false" name="BG_PROJECT" label="Project" technicalname="BG_PROJECT" /> <EntityField FieldDataMaster="None" EditStyle="ListCombo" IsTreePath="false" ForceFieldUpdate="false" name="BG_REPRODUCIBLE" label="Reproducible" technicalname="BG_REPRODUCIBLE">Y</EntityField> <EntityField FieldDataMaster="None" EditStyle="" IsTreePath="false" ForceFieldUpdate="false" name="BG_REQUEST_ID" label="ITG Request Id" technicalname="BG_REQUEST_ID" /> <EntityField FieldDataMaster="None" EditStyle="" IsTreePath="false" ForceFieldUpdate="false" name="BG_REQUEST_NOTE" label="ITG Request Note" technicalname="BG_REQUEST_NOTE" /> <EntityField FieldDataMaster="None" EditStyle="" IsTreePath="false" ForceFieldUpdate="false" name="BG_REQUEST_SERVER" label="ITG Server URL" technicalname="BG_REQUEST_SERVER" /> <EntityField FieldDataMaster="None" EditStyle="" IsTreePath="false" ForceFieldUpdate="false" name="BG_REQUEST_TYPE" label="ITG Request Type" technicalname="BG_REQUEST_TYPE" /> <EntityField FieldDataMaster="None" EditStyle="UserCombo" IsTreePath="false" ForceFieldUpdate="false" name="BG_RESPONSIBLE" label="Assigned To" technicalname="BG_RESPONSIBLE" /> <EntityField FieldDataMaster="None" EditStyle="" IsTreePath="false" ForceFieldUpdate="false" name="BG_RUN_REFERENCE" label="Run Reference" technicalname="BG_RUN_REFERENCE" /> <EntityField FieldDataMaster="None" EditStyle="ListCombo" IsTreePath="false" ForceFieldUpdate="false" name="BG_SEVERITY" label="Severity" technicalname="BG_SEVERITY">3-High</EntityField> <EntityField FieldDataMaster="None" EditStyle="ListCombo" IsTreePath="false" ForceFieldUpdate="false" name="BG_STATUS" label="Status" technicalname="BG_STATUS">New</EntityField> <EntityField FieldDataMaster="None" EditStyle="" IsTreePath="false" ForceFieldUpdate="false" name="BG_STEP_REFERENCE" label="Step Reference" technicalname="BG_STEP_REFERENCE" /> <EntityField FieldDataMaster="None" EditStyle="TreeCombo" IsTreePath="false" ForceFieldUpdate="false" name="BG_SUBJECT" label="Subject" technicalname="BG_SUBJECT">Subject\BPT Resources</EntityField> <EntityField FieldDataMaster="None" EditStyle="" IsTreePath="false" ForceFieldUpdate="false" name="BG_SUMMARY" label="Summary" technicalname="BG_SUMMARY">wwwwwwwwwwwwwwwwwwwwwwwwwwwwwww</EntityField> <EntityField FieldDataMaster="None" EditStyle="ReleaseCycleSingleTreeCombo" IsTreePath="false" ForceFieldUpdate="false" name="BG_TARGET_RCYC" label="Target Cycle" technicalname="BG_TARGET_RCYC" /> <EntityField FieldDataMaster="None" EditStyle="ReleaseSingleTreeCombo" IsTreePath="false" ForceFieldUpdate="false" name="BG_TARGET_REL" label="Target Release" technicalname="BG_TARGET_REL" /> <EntityField FieldDataMaster="None" EditStyle="" IsTreePath="false" ForceFieldUpdate="false" name="BG_TEST_REFERENCE" label="Test Reference" technicalname="BG_TEST_REFERENCE" /> <EntityField FieldDataMaster="None" EditStyle="ListCombo" IsTreePath="false" ForceFieldUpdate="false" name="BG_TO_MAIL" label="To Mail" technicalname="BG_TO_MAIL" /> <EntityField FieldDataMaster="None" EditStyle="" IsTreePath="false" ForceFieldUpdate="false" name="BG_USER_01" label="ErrorDBID" technicalname="BG_USER_01" /> <EntityField FieldDataMaster="None" EditStyle="TreeCombo" ValuePath="" IsTreePath="true" ForceFieldUpdate="false" name="BG_USER_02" label="Browser" technicalname="BG_USER_02" /> <EntityField FieldDataMaster="None" EditStyle="TreeCombo" ValuePath="" IsTreePath="true" ForceFieldUpdate="false" name="BG_USER_03" label="Language" technicalname="BG_USER_03" /> <EntityField FieldDataMaster="None" EditStyle="TreeCombo" IsTreePath="false" ForceFieldUpdate="false" name="BG_USER_04" label="Regression" technicalname="BG_USER_04" /> <EntityField FieldDataMaster="None" EditStyle="TreeCombo" IsTreePath="false" ForceFieldUpdate="false" name="BG_USER_05" label="Category" technicalname="BG_USER_05">Bug</EntityField> <EntityField FieldDataMaster="None" EditStyle="TreeCombo" IsTreePath="false" ForceFieldUpdate="false" name="BG_USER_06" label="ErrorDBSyncStatus" technicalname="BG_USER_06">Not Transferred</EntityField> <EntityField FieldDataMaster="None" EditStyle="TreeCombo" IsTreePath="false" ForceFieldUpdate="false" name="BG_USER_07" label="ErrorDB" technicalname="BG_USER_07" /> <EntityField FieldDataMaster="None" EditStyle="" IsTreePath="false" ForceFieldUpdate="false" name="BG_VTS" label="Modified" technicalname="BG_VTS">03/09/2010 06:01:52</EntityField> </Entity> Microsoft.TeamFoundation.WorkItemTracking.Client.ValidationException: TF26201: This work item has unsupported fields, or user does not have permissions. ---> Microsoft.TeamFoundation.WorkItemTracking.Client.ClientException: The issue cannot be updated. The issue content is not valid or you do not have access. (Object Model) --- End of inner exception stack trace --- at Microsoft.TeamFoundation.WorkItemTracking.Client.DataStore.HandleComException(Int32 hr) at Microsoft.TeamFoundation.WorkItemTracking.Client.DataStore.DatastoreItemClass.Save(Boolean closeForEdit) at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItem.Save() at JuvanderTFS.TfsConnection.AddBugToVSTS(String server, String domain, String project, String errordbid, String defect, DefectClass existingDefect, String configFile, String fieldMapName, String valueMapFile, DateTime& modified, DateTime& previousModification, String workItemType, List`1 fieldUpdateInfo, WorkItemClass existingStoredWorkItem, ProjectMapType projectMapType, Boolean includeAttachments, Boolean allowDefaultValueIfFieldNotValid) 2010-03-09 19:03:16,696 ERROR YapWatcher.YapWatcherClass (:0) - Failed to update TFS Bug for msg 634037581453217500
|
|
-
-
ilpo



- Joined on 06-16-2006
- Espoo, Finland
- Points 50,730

|
Re: Failed to add QC Defect to VSTS
Hei
Take these out from the field map:
Create Date cannot be updated at all, this is internal to TFS.
Created By can be updated, but only with Force Field Update.
//Ilpo
|
|
-
-
ianzero



- Joined on 12-15-2009
- Points 100
|
Re: Failed to add QC Defect to VSTS
Hi,
it can be added to TFS successfully. Thanks for your help.
I have another issue,
Field Mapping:
<FIELD VALUEMAPNAME=""> <FIELDDATAMASTER>None</FIELDDATAMASTER> <HTMLFORMAT>False</HTMLFORMAT> <FIELDMETHOD>Always</FIELDMETHOD> <RESOLVEUSERNAME>False</RESOLVEUSERNAME> <TDFIELD FieldTechnicalName="BG_STATUS" FieldLabel="Status">BG_STATUS</TDFIELD> <TFSFIELD FieldTechnicalName="System.State" FieldLabel="State">State</TFSFIELD> <DEFAULTVALUE /> <FORCEFIELDUPDATE>False</FORCEFIELDUPDATE> </FIELD>
Value Mapping:
<ValueMap Name="StateStatusQCtoTFS"> <Value MatchTypeValue="DefaultMatch" tfs="Active" qc="New"> </Value> <Value MatchTypeValue="DefaultMatch" tfs="Active" qc="Open"> <UpdateOtherField name="Reason" value="Investigate"/> </Value> </ValueMap>
But when I add a new defect in QC, there still display an error in log file.
TFS Workitem 0 Field 'State' does not have valid value, current value is 'New'. Source type 'New' item id Defects from '86/http://205.191.53.108:8088/qcbin/DEFAULT'
Is there an error in value mapping?
thank you~
|
|
-
-
ilpo



- Joined on 06-16-2006
- Espoo, Finland
- Points 50,730

|
Re: Failed to add QC Defect to VSTS
Hei
Send few lines before and after this log entry to see what is happening.
//Ilpo
|
|
-
-
ianzero



- Joined on 12-15-2009
- Points 100
|
Re: Failed to add QC Defect to VSTS
Writing value '
test in qc 2309
' (IsTreePath=False, ''/'
test in qc 2309
')
2010-03-09 23:10:23,181 DEBUG JuvanderTFS.TfsConnection (:0) - Handling field 'BG_STATUS' into 'State'
2010-03-09 23:10:23,181 DEBUG JuvanderTFS.TfsConnection (:0) - Writing value 'New' (IsTreePath=False, ''/'New')
2010-03-09 23:10:23,181 DEBUG JuvanderTFS.TfsConnection (:0) - Saving...
2010-03-09 23:10:23,196 ERROR JuvanderTFS.TfsConnection (:0) - TFS Workitem 0 Field 'State' does not have valid value, current value is 'New'. Source type 'New' item id Defects from '86/http://205.191.53.108:8088/qcbin/DEFAULT'
2010-03-09 23:10:23,196 ERROR JuvanderTFS.TfsConnection (:0) - Failed to add QC Defect to VSTS:
0001-01-01T00:00:00
86
1
<html><body>test in qc 2309</body></html>
tfsservice
03/09/2010 00:00:00
Y
tfsservice
2-Medium
New
Subject\BPT Resources
test in qc 2309
Bug
Not Transferred
03/09/2010 10:09:09
Microsoft.TeamFoundation.WorkItemTracking.Client.ValidationException: TF26201: This work item has unsupported fields, or user does not have permissions. ---> Microsoft.TeamFoundation.WorkItemTracking.Client.ClientException: The issue cannot be updated.
Field 'State' is invalid (list value)
(Object Model)
--- End of inner exception stack trace ---
at Microsoft.TeamFoundation.WorkItemTracking.Client.DataStore.HandleComException(Int32 hr)
at Microsoft.TeamFoundation.WorkItemTracking.Client.DataStore.DatastoreItemClass.Save(Boolean closeForEdit)
at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItem.Save()
at JuvanderTFS.TfsConnection.AddBugToVSTS(String server, String domain, String project, String errordbid, String defect, DefectClass existingDefect, String configFile, String fieldMapName, String valueMapFile, DateTime& modified, DateTime& previousModification, String workItemType, List`1 fieldUpdateInfo, WorkItemClass existingStoredWorkItem, ProjectMapType projectMapType, Boolean includeAttachments, Boolean allowDefaultValueIfFieldNotValid)
2010-03-09 23:10:23,196 ERROR YapWatcher.YapWatcherClass (:0) - Failed to update TFS Bug for msg 634037730191967500
|
|
-
-
ilpo



- Joined on 06-16-2006
- Espoo, Finland
- Points 50,730

|
Re: Failed to add QC Defect to VSTS
Ok.
Was this an already existing workitem? What it looks like is that State value 'New' is not valid according to current transition rules set for this field.
So all changes that you get from QC, you need to obey the transition rules as well that you have set for your workitem template.
If updating old defects to TFS, you might consider temporarily setting the Force Field Update for this field. This allows you to bypass transition rules. But for production usage it is not really recommended as your workitems are getting out of this set transition rules.
//Ilpo
|
|
-
-
ianzero



- Joined on 12-15-2009
- Points 100
|
Re: Failed to add QC Defect to VSTS
No, it a new defect in QC, the status in QC is 'New', and i use the value mapping to update "New" to "Actvie" which will display in TFS.
And, i don't set any transition rules.
If i set the "status" field of TFS as default value "Active", the new defect can be synchronized into TFS successfully.
I guess there is something wrong in value mapping. So when i add a new bug in QC, how can i mapping the "New" in QC to "Active" in TFS.
|
|
-
-
ilpo



- Joined on 06-16-2006
- Espoo, Finland
- Points 50,730

|
Re: Failed to add QC Defect to VSTS
Did you select this valuemap for your field map from QC to TFS? From the sample seen above it looks like it was not selected.
And also, is Active valid State on which you can create this workitem? In default workitem config workitems are created using Proposed State.
//Ilpo
|
|
-
-
ianzero



- Joined on 12-15-2009
- Points 100
|
Re: Failed to add QC Defect to VSTS
thanks, It's works after selected valuemap.
But when i change staus to "Open" or "Fixed" in QC, there is no update to TFS.
there is no error in YapWatcher.service.txt.
|
|
-
Page 1 of 1 (10 items)
|
|
|