/// <summary> /// This method returns all of the issues which relate to this one. /// </summary> /// <returns>The list of issues which are relate to this one</returns> public List <Issue> GetRelatedIssues() { List <Issue> relatedIssues = IssueLinks.Where(link => link.Type.ToEnum() == IssueLinkType.IssueLinkTypeEnum.Relates).Select(link => (link.InwardIssue != null ? link.InwardIssue : link.OutwardIssue)).ToList(); loadIssues(relatedIssues); return(relatedIssues); }
/// <summary> /// This method returns all of the issues which are duplicates from this one. /// </summary> /// <returns>The list of issues which are duplicates from this one</returns> public List <Issue> GetDuplicateIssues() { List <Issue> duplicateIssues = IssueLinks.Where(link => link.Type.ToEnum() == IssueLinkType.IssueLinkTypeEnum.Duplicate).Select(link => (link.InwardIssue != null ? link.InwardIssue : link.OutwardIssue)).ToList(); loadIssues(duplicateIssues); return(duplicateIssues); }
/// <summary> /// This method returns all of the issues which are blocked by this one. /// </summary> /// <returns>The list of issues which are blocked by this one</returns> public List <Issue> GetImpactedIssues() { List <Issue> impactedIssues = IssueLinks.Where(link => link.Type.ToEnum() == IssueLinkType.IssueLinkTypeEnum.Blocks && link.OutwardIssue != null).Select(link => link.OutwardIssue).ToList(); loadIssues(impactedIssues); return(impactedIssues); }
/// <summary> /// This method returns all issues which are blocking this one. /// </summary> /// <returns>The list of issues which are blocking this one</returns> public List <Issue> GetBlockingIssues() { List <Issue> blockingIssues = IssueLinks.Where(link => link.Type.ToEnum() == IssueLinkType.IssueLinkTypeEnum.Blocks && link.InwardIssue != null).Select(link => link.InwardIssue).ToList(); loadIssues(blockingIssues); return(blockingIssues); }
/// <summary> /// This method returns all issues which where cloned from this one. /// </summary> /// <returns>The list of issues which where cloned from this one</returns> public List <Issue> GetClones() { List <Issue> clones = IssueLinks.Where(link => link.Type.ToEnum() == IssueLinkType.IssueLinkTypeEnum.Cloners && link.InwardIssue != null).Select(link => link.InwardIssue).ToList(); loadIssues(clones); return(clones); }
/// <summary> /// This method returns all issues which where cloned from this one. /// </summary> /// <returns>The list of issues which where cloned from this one</returns> public Issue GetClonedIssue() { Issue cloned = IssueLinks.Where(link => link.Type.ToEnum() == IssueLinkType.IssueLinkTypeEnum.Cloners && link.OutwardIssue != null).Select(link => link.OutwardIssue).FirstOrDefault(); if (cloned != null) { loadIssues(new List <Issue>() { cloned }); } return(cloned); }
public override int GetHashCode() { unchecked { int result = (comments != null ? comments.GetHashCode() : 0); result = (result * 397) ^ (versions != null ? versions.GetHashCode() : 0); result = (result * 397) ^ (fixVersions != null ? fixVersions.GetHashCode() : 0); result = (result * 397) ^ (SubtaskKeys.GetHashCode()); result = (result * 397) ^ (IssueLinks.GetHashCode()); result = (result * 397) ^ (components != null ? components.GetHashCode() : 0); result = (result * 397) ^ (attachments != null ? attachments.GetHashCode() : 0); result = (result * 397) ^ (Server != null ? Server.GUID.GetHashCode() : 0); result = (result * 397) ^ (IssueType != null ? IssueType.GetHashCode() : 0); result = (result * 397) ^ IssueTypeId; result = (result * 397) ^ (IssueTypeIconUrl != null ? IssueTypeIconUrl.GetHashCode() : 0); result = (result * 397) ^ (Description != null ? Description.GetHashCode() : 0); result = (result * 397) ^ Id; result = (result * 397) ^ (Key != null ? Key.GetHashCode() : 0); result = (result * 397) ^ (Summary != null ? Summary.GetHashCode() : 0); result = (result * 397) ^ (Status != null ? Status.GetHashCode() : 0); result = (result * 397) ^ (StatusIconUrl != null ? StatusIconUrl.GetHashCode() : 0); result = (result * 397) ^ (Priority != null ? Priority.GetHashCode() : 0); result = (result * 397) ^ (Resolution != null ? Resolution.GetHashCode() : 0); result = (result * 397) ^ (Reporter != null ? Reporter.GetHashCode() : 0); result = (result * 397) ^ (Assignee != null ? Assignee.GetHashCode() : 0); result = (result * 397) ^ CreationDate.GetHashCode(); result = (result * 397) ^ UpdateDate.GetHashCode(); result = (result * 397) ^ (ProjectKey != null ? ProjectKey.GetHashCode() : 0); result = (result * 397) ^ (Environment != null ? Environment.GetHashCode() : 0); result = (result * 397) ^ (OriginalEstimate != null ? OriginalEstimate.GetHashCode() : 0); result = (result * 397) ^ (RemainingEstimate != null ? RemainingEstimate.GetHashCode() : 0); result = (result * 397) ^ (TimeSpent != null ? TimeSpent.GetHashCode() : 0); result = (result * 397) ^ (ParentKey != null ? ParentKey.GetHashCode() : 0); result = (result * 397) ^ (PriorityIconUrl != null ? PriorityIconUrl.GetHashCode() : 0); result = (result * 397) ^ StatusId; result = (result * 397) ^ PriorityId; return(result); } }