index > Team Foundation Server - Work Item Tracking > System.ChangedBy populating with "currentuser" prior to...

System.ChangedBy populating with "currentuser" prior to...


Using the predefined system fields, I would like to add on who created the work item, date of creation, the last person to modify it, and when the last modifications were made.

This is not a problem .. or is it?

It seems that System.ChangedBy is being populated with the "currentuser" who is viewing the work item regardless if he/she has made any changes rather then the the last user who commited changes to the system.  System.ChangedBy is updating PRIOR to the save and commit.

Interesting enough the field System.ChangedDate is not being populated with the current date that the work item was opened, but rather when the last changes were commited.  The System.ChangedDate updates AFTER a save but prior to the commit.

So how does one actually retrieve the value stored in TfsWorkItemTrack.dbo.WorkItemsLatest.ChangedBy field in the backend server for a given work item without having the true value of the field overwritten by your own name?

BMittelstedt

Try using Fields["System.ChangedBy"].OriginalValue - it should give you the right name.

Thanks,

Alex

Aliaksei Baturytski - MSFT

I must apologize, it would have been much more informative to state that I was trying to update a work item (like Bug.xml).

Field Definition

<FIELD name="Changed By" refname="System.ChangedBy" type="String" reportable="dimension">
<VALIDUSER />
</FIELD>

Form Declaration

<Control Type="FieldControl" FieldName="System.ChangedBy" Label="Changed By:" LabelPosition="Left" ReadOnly="True"/>

Using the above in a work item will give the results I stated in the first post. The ChangeBy field is populated with the person viewing the work item whether they have saved it or not, rather then the true value stored in the db.

BMittelstedt

Changed By is a special system field, which is populated automatically. Unfortunately this behavior is not configurable.

Thanks,

Alex

Aliaksei Baturytski - MSFT
reply 4

You can use google to search for other answers

 

More Articles

Use of History field for a Note Log?
Field won't copy from another field on New Work Item Activation
Office table Pivot
Open source control
What are the SQL queries to view and add Workitems
Is there a web interface to VSTS defect tracking?
What Is the Difference Between a Task and a Work Item
How do I change a WI type, from Scenario to Task for example, wit...
WorkItem Class is not marked as serializable
Get all changesets number that linked to work items
Welcome to Bokebb   New Update   Joins the collection  
 

New Articles

Automatically generate a work item on st…
GCHandle exception when querying TFS fro…
Custom Work Item Controls - How can you …
Newbie Question - Edit Existing Team Pro…
Web Bug Tracking for TFS
Project Name in queries?
Creating an workitem from an email
TF26027 error after work item import
View history in MS Excel
How to get the attachment file name usin…
Migrating work items and setting the &qu…
Work Items Areas and the WOrk Item OM
Changing transition rules, only reason t…
Assignment and delegation: Is teher any …
Inbox like query ?

Hot Articles

Want just to see (not manage) work items…
Area not refreshed in Work Items - TFS RTM
Migrating Work Items while preserving th…
WorkItemChangedEvent doesn't retrieve &q…
Default is fixed, once set, even if the …
Custom work item editor
Work Item object model - problem with ed…
Deleted AD resource causes publishing er…
Email notifications for other bugs than …
Filter Bissubscribe on Files during Chec…
Does VSTS support dynamic Query?
Work Item Update Collisions
How to change my work items?
Query for Empty String
ActivatedDate field definition problem

Recommend Articles

getting selected item
There is a way to make the link control …
Customizing Project Alerts
System.Description Storage
how do you delete defects?
calculating hours with subtasks
TF80070 after updating FieldMapping.xml …
Areas and Interations
Integrating with TFS: Use of ExecuteDefa…
Assign Work Item on Check-Out
Work Item rule change works ... most of …
Project to TFS sync problem
"Assigned To" field
Default is fixed, once set, even if the …
How to add custom fields that works like…