/// <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); }