Skip to content

Commit 65e963b

Browse files
committed
Filtering out 2 other test case related fields that do not contain HTML.
1 parent ccee633 commit 65e963b

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

src/HistoryDiffPageScript.js

+14
Original file line numberDiff line numberDiff line change
@@ -921,8 +921,22 @@ function GetDiffFromUpdatedField(fieldsPropertiesMap, fieldReferenceName, value)
921921
// TODO: Can we still show a meaningful proper diff?
922922
// https://devblogs.microsoft.com/devops/how-to-use-test-step-using-rest-client-helper/
923923
// https://oshamrai.wordpress.com/2019/05/11/azure-devops-services-rest-api-14-create-and-add-test-cases-2/
924+
// ADO probably parses it in TestBase.getTestStepsInternal() in TestManagement\Scripts\TFS.TestManagement.js.
924925
return '(Showing the diff of test case steps is not supported.)';
925926
}
927+
else if (fieldReferenceName === 'Microsoft.VSTS.TCM.Parameters') {
928+
// This field is used in 'shared parameter set' work items, which are work items that can be referenced by test case items.
929+
// https://learn.microsoft.com/en-us/azure/devops/test/repeat-test-with-different-data?view=azure-devops#share-parameters-between-test-cases
930+
// The field type is reported as 'gFieldTypeEnum.Html', although in reality it is some general XML. For example:
931+
// "<parameterSet><paramNames><param>someVar</param><param>var</param></paramNames><paramData lastId=\"1\"><dataRow id=\"1\"><kvp key=\"someVar\" value=\"test value\"/><kvp key=\"var\" value=\"another value\"/></dataRow></paramData></parameterSet>"
932+
return '(Showing the diff of a shared parameter set is not supported.)';
933+
}
934+
else if (fieldReferenceName === 'Microsoft.VSTS.TCM.LocalDataSource') {
935+
// Similar to the two cases above, this field is used in test case work items. It contains parameter values. And as the
936+
// other fields, it is reported to contain HTML, which is again a lie. For local parameters it is again some XML string.
937+
// Insidiously, for shared parameters it seems to contain data in JSON.
938+
return '(Showing the diff of parameter values is not supported.)';
939+
}
926940

927941
// Azure DevOps (at least 2019) reports identities (e.g. the 'System.CreatedBy' field) as 'gFieldTypeEnum.String', but the 'isIdentity' flag is set.
928942
// An identity is probably an 'IdentityReference': https://learn.microsoft.com/en-us/javascript/api/azure-devops-extension-api/identityreference

vss-extension.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"manifestVersion": 1,
33
"id": "HistoryDiff",
44
"publisher": "Sedenion",
5-
"version": "1.3.0.0",
5+
"version": "1.3.0.3",
66
"name": "History Diff",
77
"description": "Azure DevOps extension to show the history of work item fields with proper diffs.",
88
"public": true,

0 commit comments

Comments
 (0)