/// <summary> /// Updates a requirement field value /// </summary> /// <param name="req">TDAPIOLELib.Req Object</param> /// <param name="fieldName"></param> /// <param name="newValue"></param> /// <param name="Post"></param> /// <returns></returns> public Boolean UpdateFieldValue(TDAPIOLELib.Req req, String fieldName, String newValue, Boolean Post = true) { req[fieldName.ToUpper()] = newValue; if (Post) { req.Post(); } return(true); }
/// <summary> /// Creates a requirement Folder /// </summary> /// <param name="folderName">Requirement folder name</param> /// <param name="folderPath">Requirement folder path</param> /// <returns>TDAPIOLELib.Req Object</returns> public TDAPIOLELib.Req CreateFolder(String folderName, String folderPath) { TDAPIOLELib.Req req = GetReqByPath(folderPath); TDAPIOLELib.ReqFactory reqFactory = tDConnection.ReqFactory; TDAPIOLELib.Req newReq = reqFactory.AddItem(System.DBNull.Value); newReq.ParentId = req.ID; newReq["RQ_TYPE_ID"] = TDAPIOLELib.TDAPI_PREDEFINED_REQ_TYPES.REQ_TYPE_FOLDER; newReq.Name = folderName; newReq.Post(); return(newReq); }
/// <summary> /// Creates a new requirement /// </summary> /// <param name="requirementDetails">dictionary object with requirement database field names and values</param> /// <param name="folderPath"></param> /// <param name="reqType"></param> /// <returns></returns> public TDAPIOLELib.Req Create(Dictionary <String, String> requirementDetails, String folderPath, TDAPIOLELib.TDAPI_PREDEFINED_REQ_TYPES reqType = TDAPIOLELib.TDAPI_PREDEFINED_REQ_TYPES.REQ_TYPE_UNDEFINED) { TDAPIOLELib.Req req = GetReqByPath(folderPath); TDAPIOLELib.ReqFactory reqFactory = tDConnection.ReqFactory; TDAPIOLELib.Req newReq = reqFactory.AddItem(System.DBNull.Value); newReq.ParentId = req.ID; newReq["RQ_TYPE_ID"] = reqType; foreach (KeyValuePair <String, String> kvp in requirementDetails) { newReq[kvp.Key] = kvp.Value; } newReq.Post(); return(newReq); }
/// <summary> /// Delete target cycles /// </summary> /// <param name="req">TDAPIOLELib.Req Object</param> /// <returns>True if successfull</returns> public Boolean DeleteTargetCycles(TDAPIOLELib.Req req) { req["RQ_TARGET_RCYC"] = ""; req.Post(); return(true); }
/// <summary> /// Set target cycles for requirement /// </summary> /// <param name="req">TDAPIOLELib.Req Obejct</param> /// <param name="listofCycleIDs">List of Cycle ID's</param> /// <returns>True if successfull</returns> public Boolean SetTargetCycles(TDAPIOLELib.Req req, TDAPIOLELib.List listofCycleIDs) { req["RQ_TARGET_RCYC"] = listofCycleIDs; req.Post(); return(true); }
/// <summary> /// Set target releases for a requirements. /// </summary> /// <param name="req">TDAPIOLELib.Req Object</param> /// <param name="listofReleaseIDs">TDAPIOLELib.List of Release ID's</param> /// <returns>True if successfull</returns> public Boolean SetTargetReleases(TDAPIOLELib.Req req, TDAPIOLELib.List listofReleaseIDs) { req["RQ_TARGET_REL"] = listofReleaseIDs; req.Post(); return(true); }
/// <summary> /// Rename a requirement /// </summary> /// <param name="req">TDAPIOLELib.Req Object</param> /// <param name="newName">New requirement name</param> /// <returns>True if Successfull</returns> public Boolean Rename(TDAPIOLELib.Req req, String newName) { req["RQ_REQ_NAME"] = newName; req.Post(); return(true); }