public void ExtractLinkChangeActions(ClearQuestOleServer.Session session, ClearQuestOleServer.OAdEntity hostRecord, List <LinkChangeGroup> linkChangeGroups) { string recordId = CQWrapper.GetFieldValue(CQWrapper.GetEntityFieldValue(hostRecord, CQIdFieldName)); string url = string.Format(m_urlFormat, recordId); var linkChangeGroup = new LinkChangeGroup(recordId, LinkChangeGroup.LinkChangeGroupStatus.Created, false); string hostEntityDefName = CQWrapper.GetEntityDefName(hostRecord); string hostEntityDispName = CQWrapper.GetEntityDisplayName(hostRecord); string hostRecordId = UtilityMethods.CreateCQRecordMigrationItemId(hostEntityDefName, hostEntityDispName); ArtifactLink link = new ArtifactLink(hostRecordId, new Artifact(hostRecordId, s_sourceArtifactType), new Artifact(url, s_targetArtifactType), string.Empty, this); LinkChangeAction action = new LinkChangeAction(WellKnownChangeActionId.Add, link, LinkChangeAction.LinkChangeActionStatus.Created, false); linkChangeGroup.AddChangeAction(action); linkChangeGroups.Add(linkChangeGroup); }
public bool Update(ClearQuestMigrationContext migrationContext, ClearQuestOleServer.Session session, ClearQuestOleServer.OAdEntity hostRecord, LinkChangeAction linkChangeAction) { // this link type is fabricated. Do nothing for submission. linkChangeAction.Status = LinkChangeAction.LinkChangeActionStatus.Completed; return(true); }