Closed aok-foss closed 3 years ago
Make a rule that triggers on a work item update and then updates the same work item. Enable impersonation for that rule.
.impersonate=onBehalfOfInitiator self.Description = self.Title;
The rule triggers impersonated.
No impersonation.
This is because inside TfsAggregator the WorkItemStore tries to emit a JsonPatchOperation that will do the impersonation: https://github.com/tfsaggregator/aggregator-cli/blob/dbdf4b579e3f1d743c637694be6e0bd820934d1a/src/aggregator-ruleng/WorkItemStore.cs#L158
But inside WorkItemWrapper the change is ignored: https://github.com/tfsaggregator/aggregator-cli/blob/dbdf4b579e3f1d743c637694be6e0bd820934d1a/src/aggregator-ruleng/WorkItemWrapper.cs#L368
Aggregator 1.0.0 running in Azure Functions on Windows
Steps to reproduce
Make a rule that triggers on a work item update and then updates the same work item. Enable impersonation for that rule.
Expected behavior
The rule triggers impersonated.
Actual behavior
No impersonation.
This is because inside TfsAggregator the WorkItemStore tries to emit a JsonPatchOperation that will do the impersonation: https://github.com/tfsaggregator/aggregator-cli/blob/dbdf4b579e3f1d743c637694be6e0bd820934d1a/src/aggregator-ruleng/WorkItemStore.cs#L158
But inside WorkItemWrapper the change is ignored: https://github.com/tfsaggregator/aggregator-cli/blob/dbdf4b579e3f1d743c637694be6e0bd820934d1a/src/aggregator-ruleng/WorkItemWrapper.cs#L368
Environment
Aggregator 1.0.0 running in Azure Functions on Windows