/// <summary> /// Update defect field value /// <para/> returns True if successfull /// </summary> /// <param name="bug">TDAPIOLELib.Bug Object</param> /// <param name="fieldName">Database Field name</param> /// <param name="newValue">New Field value</param> /// <param name="Post">Post the defect after updating valie</param> /// <returns>True if successfull</returns> public Boolean UpdateFieldValue(TDAPIOLELib.Bug bug, String fieldName, String newValue, Boolean Post = true) { bug[fieldName.ToUpper()] = newValue; if (Post) { bug.Post(); } return(true); }
/// <summary> /// creates a defect in ALM /// <para/>returns TDAPIOLELib.Bug Object /// </summary> /// <param name="defectDetails">Dictionary Object with Field name and field value strings</param> /// <returns>TDAPIOLELib.Bug Object</returns> public TDAPIOLELib.Bug Create(Dictionary <String, String> defectDetails) { TDAPIOLELib.BugFactory OBGFactory = tDConnection.BugFactory; TDAPIOLELib.Bug OBug = OBGFactory.AddItem(System.DBNull.Value); foreach (KeyValuePair <string, string> kvp in defectDetails) { OBug[kvp.Key.ToUpper()] = kvp.Value; } OBug.Post(); return(OBug); }