Class DuplicateCheckViewModel
A view model class containing logic for the duplicate checking feature of Aruba.
Inherited Members
Namespace: Phoenix.Aruba
Assembly: Phoenix.Plugin.Aruba.dll
Syntax
public class DuplicateCheckViewModel : BindableBase, INotifyPropertyChanged, IDisposable
Constructors
View SourceDuplicateCheckViewModel(ViewModelSharedInfo, TemplateViewModel, IDictionary<string, FieldViewModel>)
Initializes a new instance of the DuplicateCheckViewModel class.
Declaration
public DuplicateCheckViewModel(ViewModelSharedInfo sharedInfo, TemplateViewModel templateVM, IDictionary<string, FieldViewModel> fields)
Parameters
| Type | Name | Description |
|---|---|---|
| ViewModelSharedInfo | sharedInfo | The shared view model info, which contains the bug client. |
| TemplateViewModel | templateVM | The bug template for the bug being filed. |
| IDictionary<string, FieldViewModel> | fields | The current field's values in the view. |
Properties
View SourceAreAttachmentArrowsVisible
Gets a value indicating whether the arrows in the view in the attachment section is visible.
Declaration
public bool AreAttachmentArrowsVisible { get; }
Property Value
| Type | Description |
|---|---|
| bool |
AttachmentNumberItemsDisplayText
Gets the display text for the number of attachments for a bug. EX: "1 of 3".
Declaration
public string AttachmentNumberItemsDisplayText { get; }
Property Value
| Type | Description |
|---|---|
| string |
AutomaticQueryCount
Gets the number of bugs from the automatic query that performs string matching that are potential duplicates.
Declaration
public int AutomaticQueryCount { get; }
Property Value
| Type | Description |
|---|---|
| int |
CancelClosestMatchingBugsQueryCommand
Gets the delegate command that cancels a running closest matching bugs query.
Declaration
public DelegateCommand CancelClosestMatchingBugsQueryCommand { get; }
Property Value
| Type | Description |
|---|---|
| DelegateCommand |
CancelNearbyBugsQueryCommand
Gets the delegate command that cancels a running nearby bugs query.
Declaration
public DelegateCommand CancelNearbyBugsQueryCommand { get; }
Property Value
| Type | Description |
|---|---|
| DelegateCommand |
ChangePauseStateCommand
Gets the delegate command that handles the pause query button being clicked by the user.
Declaration
public DelegateCommand ChangePauseStateCommand { get; }
Property Value
| Type | Description |
|---|---|
| DelegateCommand |
ClosestMatchingBugsLastUpdatedText
Gets the text that shows the time when the closest matching bugs query was last updated.
Declaration
public string ClosestMatchingBugsLastUpdatedText { get; }
Property Value
| Type | Description |
|---|---|
| string |
CurrentSelectedAttachment
Gets the image source for the current selected attachment for a bug.
Declaration
public string CurrentSelectedAttachment { get; }
Property Value
| Type | Description |
|---|---|
| string |
CurrentSelectedAttachmentFilename
Gets the file name of the current selected attachment for a bug.
Declaration
public string CurrentSelectedAttachmentFilename { get; }
Property Value
| Type | Description |
|---|---|
| string |
CycleLeftThroughAttachmentCommand
Gets the delegate command that handles the user wanting to cycle to the previous attachment.
Declaration
public DelegateCommand CycleLeftThroughAttachmentCommand { get; }
Property Value
| Type | Description |
|---|---|
| DelegateCommand |
CycleRightThroughAttachmentCommand
Gets the delegate command that handles the user wanting to cycle to the next attachment.
Declaration
public DelegateCommand CycleRightThroughAttachmentCommand { get; }
Property Value
| Type | Description |
|---|---|
| DelegateCommand |
DisableBackgroundDupeChecking
Gets a value indicating whether duplicate checking is allowed to run when the Duplicate Check tab isn't actively in focus.
Declaration
public bool DisableBackgroundDupeChecking { get; }
Property Value
| Type | Description |
|---|---|
| bool |
DisableShowRecentlySubmittedBugsPopup
Gets the function that disables the recently submitted bugs pop-up.
Declaration
public Action DisableShowRecentlySubmittedBugsPopup { get; }
Property Value
| Type | Description |
|---|---|
| Action |
IsAttachmentInfoVisible
Gets a value indicating whether the CurrentSelectedAttachment, the AttachmentNumberItemsDisplayText and the left/right arrows are visible.
Declaration
public bool IsAttachmentInfoVisible { get; }
Property Value
| Type | Description |
|---|---|
| bool |
IsAutomaticQueryPaused
Gets a value indicating whether the query being sent automatically is paused.
Declaration
public bool IsAutomaticQueryPaused { get; }
Property Value
| Type | Description |
|---|---|
| bool |
IsClosestMatchingBugsQueryRunning
Gets a value indicating whether the query to find the closest matching bugs is currently running.
Declaration
public bool IsClosestMatchingBugsQueryRunning { get; }
Property Value
| Type | Description |
|---|---|
| bool |
IsInBackground
Gets or sets a value indicating whether to prevent refresh because the user is on another tab.
Declaration
public bool IsInBackground { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
IsNearbyBugsQueryRunning
Gets a value indicating whether the query to find nearby bugs is currently running.
Declaration
public bool IsNearbyBugsQueryRunning { get; }
Property Value
| Type | Description |
|---|---|
| bool |
IsPotentialDupesTextVisible
Gets a value indicating whether the text that informs the user that Aruba found potential duplicates is visible.
Declaration
public bool IsPotentialDupesTextVisible { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Remarks
This text only shows if there are any potential duplicates.
NearbyBugs
Gets the bugs that are nearby to the current bug being filled out.
Declaration
public ObservableCollection<DupeCheckBugInfo> NearbyBugs { get; }
Property Value
| Type | Description |
|---|---|
| ObservableCollection<DupeCheckBugInfo> |
NearbyBugsCount
Gets the number nearby bugs that are potential duplicates.
Declaration
public int NearbyBugsCount { get; }
Property Value
| Type | Description |
|---|---|
| int |
NearbyBugsLastUpdatedText
Gets the text that shows the time when the nearby bugs query was last updated.
Declaration
public string NearbyBugsLastUpdatedText { get; }
Property Value
| Type | Description |
|---|---|
| string |
NearbyBugsRadius
Gets or sets the distance threshold for a bug. Work Items whose location data do not fall within this radius shouldn't be shown in the view.
Declaration
public int NearbyBugsRadius { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Remarks
Units depend on in-game units, so the unit is arbitrary.
NoClosestMatchingBugsFound
Gets a value indicating whether the "No results were found" text appears in the view for the closest matching bugs table.
Declaration
public bool NoClosestMatchingBugsFound { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Remarks
The only reason a private field is being used here instead of having NoClosestMatchingBugsFound => this.automaticQueryCount == 0 is because this text should not be shown on the view's initialization, and should only show after a query has gone through.
NoNearbyBugsFound
Gets a value indicating whether the "No results were found" text appears in the view for the nearby bugs table.
Declaration
public bool NoNearbyBugsFound { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Remarks
The only reason a private field is being used here instead of having NoNearbyBugsFound => this.nearbyBugsCount == 0 is because this text should not be shown on the view's initialization, and should only show after a query has gone through.
PotentialDupesCount
Gets the number of potential duplicate bugs.
Declaration
public int PotentialDupesCount { get; }
Property Value
| Type | Description |
|---|---|
| int |
PotentialDupesText
Gets the text that shows in the bug creation view, notifying the user of potential duplicates as they fill out a bug.
Declaration
public string PotentialDupesText { get; }
Property Value
| Type | Description |
|---|---|
| string |
QueryResults
Gets the results from the current query based on what is saved to the current template.
Declaration
public ObservableCollection<DupeCheckBugInfo> QueryResults { get; }
Property Value
| Type | Description |
|---|---|
| ObservableCollection<DupeCheckBugInfo> |
RefreshClosestMatchingBugsTableAsyncCommand
Gets the delegate command that handles the user wanting to refresh the closest matching bugs table.
Declaration
public AsyncDelegateCommand RefreshClosestMatchingBugsTableAsyncCommand { get; }
Property Value
| Type | Description |
|---|---|
| AsyncDelegateCommand |
RefreshNearbyBugsTableAsyncCommand
Gets the delegate command that handles the user wanting to refresh the nearby bugs table.
Declaration
public AsyncDelegateCommand RefreshNearbyBugsTableAsyncCommand { get; }
Property Value
| Type | Description |
|---|---|
| AsyncDelegateCommand |
SharedInfo
Gets the view model's shared info.
Declaration
public ViewModelSharedInfo SharedInfo { get; }
Property Value
| Type | Description |
|---|---|
| ViewModelSharedInfo |
ShowNearbyBugsTable
Gets a value indicating whether the nearby bugs table is visible in the UI.
Declaration
public bool ShowNearbyBugsTable { get; }
Property Value
| Type | Description |
|---|---|
| bool |
ShowRecentlySubmittedBugsPopup
Gets a value indicating whether a pop-up should appear when a user submits a bug that lets a user know if a recent submitted bug is a potential duplicate.
Declaration
public bool ShowRecentlySubmittedBugsPopup { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
View SourceCheckForRecentlySubmittedDupes()
Gets recently submitted bugs within the past five minutes that are possible duplicates.
Declaration
public Task<IEnumerable<DupeCheckBugInfo>> CheckForRecentlySubmittedDupes()
Returns
| Type | Description |
|---|---|
| Task<IEnumerable<DupeCheckBugInfo>> | A collection of recently submitted potential duplicate bugs. |
DeleteTmpFolderContents()
Cleans up the temporary folder contents that is used to download image attachments from work items.
Declaration
public static void DeleteTmpFolderContents()
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
UpdateAttachmentViewAsync(DupeCheckBugInfo)
Updates the attachment view with the attachments of the given bug.
Declaration
public Task UpdateAttachmentViewAsync(DupeCheckBugInfo bug)
Parameters
| Type | Name | Description |
|---|---|---|
| DupeCheckBugInfo | bug | The bug whose attachments are to be displayed. |
Returns
| Type | Description |
|---|---|
| Task | A Task representing the result of the asynchronous operation. |
UpdateFields(IDictionary<string, FieldViewModel>)
Updates the duplicate checker's fields info with the latest data.
Declaration
public void UpdateFields(IDictionary<string, FieldViewModel> fields)
Parameters
| Type | Name | Description |
|---|---|---|
| IDictionary<string, FieldViewModel> | fields | The current state of the fields and their values. |