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
{{ message }}
This repository has been archived by the owner on Jan 6, 2019. It is now read-only.
I'm having a problem with the WorkItemLinks collection for a work item PreviousRevision. I have the following code which attempts to find either the current parent, or if there isn't one and it just got removed then the previous one.
Whenever I delete a link from a child to a parent the following code for the child work item never finds the old parent, and always logs "Work item X does not have a previous parent".
Any ideas?
IWorkItemExposed parent = self.Parent;
if(parent == null)
{
IWorkItemLinkExposed parentLink = self.PreviousRevision.WorkItemLinks.FirstOrDefault(wi => wi.LinkTypeEndImmutableName == WorkItemImplementationBase.ParentRelationship);
if (parentLink != null)
{
parent = parentLink.Target;
}
else
{
logger.Log("Work item {0} does not have a previous parent", self.Id);
}
}
The text was updated successfully, but these errors were encountered:
I'm having a problem with the WorkItemLinks collection for a work item PreviousRevision. I have the following code which attempts to find either the current parent, or if there isn't one and it just got removed then the previous one.
Whenever I delete a link from a child to a parent the following code for the child work item never finds the old parent, and always logs "Work item X does not have a previous parent".
Any ideas?
The text was updated successfully, but these errors were encountered: