Class TfsBugServiceClient
Contains all the TfsBugServiceClient code that is related to the bug creation history for Aruba.
Implements
Inherited Members
Namespace: Microsoft.Internal.Studios.Aruba.Tfs
Assembly: Aruba.Tfs.dll
Syntax
public class TfsBugServiceClient : IBugCreationHistoryServiceClient, IBugServiceClient, IMultiselectControlConfig, IDupeCheckServiceClient
Properties
View SourceMultiselectControlDelimiter
Gets the multi-select control delimiter for Tfs. In Tfs, this is a semi-colon.
Declaration
public string MultiselectControlDelimiter { get; }
Property Value
Type | Description |
---|---|
string |
MultiselectControlFieldTypes
Gets the set of field definitions that are multi-select fields.
Declaration
public HashSet<string> MultiselectControlFieldTypes { get; }
Property Value
Type | Description |
---|---|
HashSet<string> |
TfsClient
Gets the TFS Client.
Declaration
public TfsClient TfsClient { get; }
Property Value
Type | Description |
---|---|
TfsClient |
Methods
View SourceAddAttachmentToExistingBugAsync(string, string)
Adds an attachment to an existing TFS bug.
Declaration
public Task AddAttachmentToExistingBugAsync(string filePath, string bugID)
Parameters
Type | Name | Description |
---|---|---|
string | filePath | The filepath of the attachment to add. |
string | bugID | The ID of the bug. |
Returns
Type | Description |
---|---|
Task | The task. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | If |
CreateBugAsync(BugCreationParams)
Creates a bug and saves it in TFS/VSTS.
Declaration
public Task<string> CreateBugAsync(BugCreationParams creationParams)
Parameters
Type | Name | Description |
---|---|---|
BugCreationParams | creationParams | The data to create the bug with. |
Returns
Type | Description |
---|---|
Task<string> | The id of the newly created bug. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | If |
CreateFromClientAsync(TfsClient)
Creates the BugServiceClient from the given TfsClient.
Declaration
public static Task<TfsBugServiceClient> CreateFromClientAsync(TfsClient tfsClient)
Parameters
Type | Name | Description |
---|---|---|
TfsClient | tfsClient | The TFS Client. |
Returns
Type | Description |
---|---|
Task<TfsBugServiceClient> | The created TfsBugServiceClient. |
FindNearbyBugsAsync(IBugPruner, string, string, string, CancellationToken)
Runs a query that checks for bugs nearby to the specified location.
Declaration
public Task<IEnumerable<DupeCheckBugInfo>> FindNearbyBugsAsync(IBugPruner bugPruner, string areaPath, string mapFieldName, string mapName, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
IBugPruner | bugPruner | The bug pruner that defines how to remove bugs from the search. |
string | areaPath | The area path that defines which category to search under. |
string | mapFieldName | The field name for the map name data on the bug database. |
string | mapName | The map that the bug resides in. |
CancellationToken | cancellationToken | The cancellation token to cancel the task. |
Returns
Type | Description |
---|---|
Task<IEnumerable<DupeCheckBugInfo>> | A list of all bugs that are nearby. |
FollowBugAsync(string)
Follows a bug given its key.
Declaration
public ValueTask<bool> FollowBugAsync(string bugKey)
Parameters
Type | Name | Description |
---|---|---|
string | bugKey | The bug key. |
Returns
Type | Description |
---|---|
ValueTask<bool> | True if it was followed. |
GetArrayFieldNames()
Gets the names of the fields that are filled with by an array value.
Declaration
public HashSet<string> GetArrayFieldNames()
Returns
Type | Description |
---|---|
HashSet<string> | An empty HastSet. |
GetBrowseUriFromBugKeyAsync(string)
Get the Uri to browse a bug, given the bug key.
Declaration
public ValueTask<Uri?> GetBrowseUriFromBugKeyAsync(string bugKey)
Parameters
Type | Name | Description |
---|---|---|
string | bugKey | The bug key. |
Returns
Type | Description |
---|---|
ValueTask<Uri> | The Uri if found, null otherwise. |
GetBugCreationHistoryForCurrentUserAsync()
Gets the bug creation history for all bugs created by the current user.
Declaration
public Task<IEnumerable<BugCreationHistory>> GetBugCreationHistoryForCurrentUserAsync()
Returns
Type | Description |
---|---|
Task<IEnumerable<BugCreationHistory>> | Returns a list of BugCreationHistory. |
Exceptions
Type | Condition |
---|---|
ArubaException | Thrown when an Microsoft.VisualStudio.Services.Common.VssException is encountered from querying ADO. |
GetBugCreationHistoryUsingIDAsync(string)
Gets the bug creation history for a single item using the bug ID.
Declaration
public Task<BugCreationHistory> GetBugCreationHistoryUsingIDAsync(string bugID)
Parameters
Type | Name | Description |
---|---|---|
string | bugID | The ID of the bug. |
Returns
Type | Description |
---|---|
Task<BugCreationHistory> | Returns a BugCreationHistory, or null if nothing was found. |
Exceptions
Type | Condition |
---|---|
ArubaException | Thrown when an Microsoft.VisualStudio.Services.Common.VssException is encountered from querying ADO. |
GetBugInfoFromKeyAsync(string, CancellationToken)
Gets info about a bug gives its key.
Declaration
public Task<BugInfo?> GetBugInfoFromKeyAsync(string key, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | key | The bug id. |
CancellationToken | cancellationToken | A cancellation token. |
Returns
Type | Description |
---|---|
Task<BugInfo> | Info about the bug. |
GetBugLinkTypesAsync()
Gets a list of the bug link types available to add to a bug.
Declaration
public Task<List<BugLinkType>> GetBugLinkTypesAsync()
Returns
Type | Description |
---|---|
Task<List<BugLinkType>> | A list of BugLinkType. |
GetBugSubmittedWithinPast5MinutesAsync()
Finds all bugs that have been submitted within the past five minutes.
Declaration
public Task<IEnumerable<DupeCheckBugInfo>> GetBugSubmittedWithinPast5MinutesAsync()
Returns
Type | Description |
---|---|
Task<IEnumerable<DupeCheckBugInfo>> | Bugs that have been submitted within the past five minutes. |
GetDefaultTemplateFields()
Gets the default template fields for the bug work item type.
Declaration
public IList<TemplateFieldDefinition> GetDefaultTemplateFields()
Returns
Type | Description |
---|---|
IList<TemplateFieldDefinition> | Returns a list with the fields. |
GetTags()
Gets all the tags available in the database.
Declaration
public List<string> GetTags()
Returns
Type | Description |
---|---|
List<string> | Tags as a list of strings. |
GetValueRestrictedFieldInfo()
Gets the restricted field info.
Declaration
public Dictionary<string, IEnumerable<object>> GetValueRestrictedFieldInfo()
Returns
Type | Description |
---|---|
Dictionary<string, IEnumerable<object>> | A dictionary of the field name and its allowed values. |
RefreshBugFieldValuesAsync()
Refreshes the available field values from the bug database.
Declaration
public Task RefreshBugFieldValuesAsync()
Returns
Type | Description |
---|---|
Task | A Task representing the asynchronous operation. |
RunDupeCheckQueryAsync(DuplicateCheckQueryDefinition, IDictionary<string, string>, CancellationToken)
Runs a query that was saved to a bug template for checking for duplicates.
Declaration
public Task<IEnumerable<DupeCheckBugInfo>> RunDupeCheckQueryAsync(DuplicateCheckQueryDefinition queryArgs, IDictionary<string, string> fieldValues, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
DuplicateCheckQueryDefinition | queryArgs | The object that contains the arguments for the query. |
IDictionary<string, string> | fieldValues | The values of the fields to be matched. |
CancellationToken | cancellationToken | The cancellation token to cancel the task. |
Returns
Type | Description |
---|---|
Task<IEnumerable<DupeCheckBugInfo>> | A list of all bugs that were returned from the query. |
SetArrayFieldNames(HashSet<string>)
Some fields may be array fields, taking in an array of values on bug creation. This sets the set of those field names.
Declaration
public void SetArrayFieldNames(HashSet<string> fields)
Parameters
Type | Name | Description |
---|---|---|
HashSet<string> | fields | The set of field names that are array types. |
SetAttachmentInfoIfAvailableAsync(DupeCheckBugInfo, CancellationToken)
Sets the attached files for a given bug.
Declaration
public Task SetAttachmentInfoIfAvailableAsync(DupeCheckBugInfo bug, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
DupeCheckBugInfo | bug | The bug to get the attachment info for. This bug's attachment property will be updated. |
CancellationToken | cancellationToken | The cancellation token to cancel the task. |
Returns
Type | Description |
---|---|
Task | An awaitable task. |
ValidateBugCreationParamsAsync(BugCreationParams)
Validates whether the current parameters meet the requirements to make a bug.
Declaration
public Task ValidateBugCreationParamsAsync(BugCreationParams creationParams)
Parameters
Type | Name | Description |
---|---|---|
BugCreationParams | creationParams | Parameters for creating a bug. |
Returns
Type | Description |
---|---|
Task | A task. |