You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update a work item field with impersonation enabled (i.e. .impersonate=onBehalfOfInitiator)
A simple update ( self["Custom.CustomField"] = 10) or any other update will trigger an error.
Version 1.0.1
Expected behavior
WorkItem should be updated successfully
Actual behavior
Update fails with the message: "Remove requires Value to be null."
Diagnostic logs
Running it locally and adding some additional debug info:
[2021-02-06 16:11:35Z] [{"Method":"PATCH","Uri":"/_apis/wit/workItems/160536?bypassRules=True&suppressNotifications=False&api-version=5.0-preview.3","Headers":{"Content-Type":"application/json-patch+json"},"Body":"[{"op":5,"path":"/rev","from":null,"value":11},{"op":2,"path":"/fields/Custom.GTRMScore","from":null,"value":80},{"op":1,"path":"/fields/System.ChangedBy","from":null,"value":"George Roberts"}]"}]
[2021-02-06 16:11:35Z] [{"Code":400,"Headers":{"Content-Type":"application/json; charset=utf-8"},"Body":"{"count":1,"value":{"Message":"Remove requires Value to be null."}}"}]
[2021-02-06 16:11:35Z] Save failed: {"count":1,"value":{"Message":"Remove requires Value to be null."}}
[2021-02-06 16:11:35Z] Changes saved to Azure DevOps (mode Batch): 0 created, 1 updated.
[2021-02-06 16:11:35Z] Rule returned ''
[2021-02-06 16:11:35Z] Succeeded
First log line is the JsonPatchDocument info for the update.
Second log line is the actual response with the response code.
Environment
Happens both locally and in Azure Functions.
Version 1.0.1
The text was updated successfully, but these errors were encountered:
* fix typos in messages
* Squashed commit of the following:
commit 80e7206
Author: George Roberts <groberts@moddigital.net>
Date: Mon Feb 8 10:51:21 2021 -0600
Remove test log line
commit bf4d89d
Author: George Roberts <groberts@moddigital.net>
Date: Sat Feb 6 23:26:55 2021 -0600
Remove some extraneous logging
commit db994e3
Author: George Roberts <groberts@moddigital.net>
Date: Sat Feb 6 23:16:06 2021 -0600
Fix tests
commit c5945cd
Author: George Roberts <groberts@moddigital.net>
Date: Sat Feb 6 22:57:14 2021 -0600
Fix bypassrules value
commit 59f338d
Author: George Roberts <groberts@moddigital.net>
Date: Sat Feb 6 22:54:45 2021 -0600
Support for .bypassrules directive
* fixed an issue which caused removing work item links to fail
* Fix ".check revision false" directive disappearing on rule upload
* change log
* Add tests to check more double assignment cases
* Fixes#229 - double assignment and reset to original value
Alternative implementation to PR #236
* Fixes spurious upgrade message noted in #225
* trigger build
* Fully async
Co-authored-by: Rob Osborne <rob.osborne@capita.co.uk>
Co-authored-by: Alexander Omelchuk <AOK@foss.dk>
Steps to reproduce
Update a work item field with impersonation enabled (i.e. .impersonate=onBehalfOfInitiator)
A simple update ( self["Custom.CustomField"] = 10) or any other update will trigger an error.
Version 1.0.1
Expected behavior
WorkItem should be updated successfully
Actual behavior
Update fails with the message: "Remove requires Value to be null."
Diagnostic logs
Running it locally and adding some additional debug info:
[2021-02-06 16:11:35Z] [{"Method":"PATCH","Uri":"/_apis/wit/workItems/160536?bypassRules=True&suppressNotifications=False&api-version=5.0-preview.3","Headers":{"Content-Type":"application/json-patch+json"},"Body":"[{"op":5,"path":"/rev","from":null,"value":11},{"op":2,"path":"/fields/Custom.GTRMScore","from":null,"value":80},{"op":1,"path":"/fields/System.ChangedBy","from":null,"value":"George Roberts"}]"}]
[2021-02-06 16:11:35Z] [{"Code":400,"Headers":{"Content-Type":"application/json; charset=utf-8"},"Body":"{"count":1,"value":{"Message":"Remove requires Value to be null."}}"}]
[2021-02-06 16:11:35Z] Save failed: {"count":1,"value":{"Message":"Remove requires Value to be null."}}
[2021-02-06 16:11:35Z] Changes saved to Azure DevOps (mode Batch): 0 created, 1 updated.
[2021-02-06 16:11:35Z] Rule returned ''
[2021-02-06 16:11:35Z] Succeeded
First log line is the JsonPatchDocument info for the update.
Second log line is the actual response with the response code.
Environment
Happens both locally and in Azure Functions.
Version 1.0.1
The text was updated successfully, but these errors were encountered: