Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impersonation does not work when a rule updates the same work item #206

Closed
aok-foss opened this issue Nov 18, 2020 · 0 comments
Closed

Impersonation does not work when a rule updates the same work item #206

aok-foss opened this issue Nov 18, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@aok-foss
Copy link
Contributor

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.

.impersonate=onBehalfOfInitiator
self.Description = self.Title;

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:

workItem.ChangedBy = _triggerIdentity;

But inside WorkItemWrapper the change is ignored:

if (_item.Fields[field]?.Equals(value) ?? false)

Environment

Aggregator 1.0.0 running in Azure Functions on Windows

@aok-foss aok-foss added the bug Something isn't working label Nov 18, 2020
@aok-foss aok-foss changed the title Impersonation dose not work when a rule updates the same work item Impersonation does not work when a rule updates the same work item Nov 18, 2020
@giuliov giuliov closed this as completed Dec 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants