C# Class Telerik.TestStudio.Jira.BugTracking.JiraBugTracker

This is the main Test Studio plug-in class. It ties everything together and provides the main communication between Test Studio and this plug-in. The sequence of events is this: On Project load: 1) ResetSettings is called. Intended to let the plugin clear out old setting in prepartion of new settings being loaded. 2) ApplyPersistableSettings is called. The deserialized JiraConnectionModel object is passed in. It contains the settings loaded from the projects settings.aiis file. On clicking the "Bug Tracking" button in the ribbon bar: 1) GetPersistableSettings is called. The plugin is expected to return a filled out BugTrackerPersistableSettings object. Test Studio uses this data to fill in the Manaege Bug Tracking dialog. On clicking the "Configure the connection" button 1) CanSave is called. Controls whether or not the Save button is enabled. 2) CanClose is called. Controls whether or not the Cancel button is enabled. On clicking Save: 1) OnSave is called. Save the UI settings and make them active. 2) GetPersistableSettings is called. On clicking Cancel: 1) OnClose is called. The plugin can clean up any resources or connections that were being used. 2) ApplyPersistableSettings is called. 3) CanSave is called. On clicking Save in the Manage Bug Tracking dialog 1) Actually nothing in the bug tracker is called On clicking Cancel in the Manage Bug Tracking dialog 1) ApplyPersistableSettings is called 2) CanSave is called On closing the project: 1) ResetSettings is called. The plugin should remove all active settings so that the next project doesn't recieve carried over settings. 2) CanSave is called. On clicking Submit Bug in the Results view 1) SubmitBug is called
Inheritance: IBugTracker, IBugTrackerConnectionUI
Afficher le fichier Open project: TestStudio/JiraPlugin

Méthodes publiques

Méthode Description
ApplyPersistableSettings ( BugTrackerPersistableSettings settings ) : bool

Applies the persistable settings upon loading the user settings from the XML file where persisted, or when Cancel is clicked. The settings are persisted so that the user can get the configured bug tracker on the next project load.

GetPersistableSettings ( ) : BugTrackerPersistableSettings

Retrieve the object that implements the BugTrackerPersistableSettings interface. This includes the LoadFrom and SaveTo methods used to serialize and deserialize the the configuration into/out of the current Test Studio project.

OnClose ( ) : void

Optional. Called whenever the bug tracker UI is closed for any reason. Clear the view for the next project to be loaded, which may not have Jira settings.

OnSave ( ) : void

Optional. Called whenever user clicks Save in the UI to save the settings. Enables customizing the save click handling. We'll make the settings in the ViewModel the active settings for submitting bugs.

ResetSettings ( ) : void

Resets bug tracker connection settings to default settings. Called when a project containg Jira settings is first opened, but before settings are loaded. Also called when the project is closed. Useful method to clean up the bug tracker data internally.

SubmitBug ( IBug bug ) : int

Submits a bug to the bug tracking tool. Return an int that represents the newly created bug ID.

SubmitBug ( IBug bug ) : string
jiraConnSettings_PropertyChanged ( object sender, PropertyChangedEventArgs e ) : void

Handle property changes in the ViewModel. For now all we do is bubble up the SelectedProject property change to CanSave which enables/disables the 'Done' button on the Test Studio wrapping WPF window.

Private Methods

Méthode Description
OnPropertyChanged ( string propertyName ) : void
SettingsControlLoaded ( object sender, System e ) : void

Event handler called when the WPF UserControl is loaded. The wrapping window listens to the CanSave and CanClose property changed events.

WorkerMethod ( ) : void

Worker thread that fetches the list projects from JIRA.

settingsUiControl_OnGetProjects ( object sender, GetProjectsEventArgs e ) : void

Event handler that is called when the user clicks the 'Get Projects' button in the UI. We'll spawn a background thread which will fetch the list of projects the user has access to from JIRA.

Method Details

ApplyPersistableSettings() public méthode

Applies the persistable settings upon loading the user settings from the XML file where persisted, or when Cancel is clicked. The settings are persisted so that the user can get the configured bug tracker on the next project load.
public ApplyPersistableSettings ( BugTrackerPersistableSettings settings ) : bool
settings BugTrackerPersistableSettings The deserialized settings to make active.
Résultat bool

GetPersistableSettings() public méthode

Retrieve the object that implements the BugTrackerPersistableSettings interface. This includes the LoadFrom and SaveTo methods used to serialize and deserialize the the configuration into/out of the current Test Studio project.
public GetPersistableSettings ( ) : BugTrackerPersistableSettings
Résultat BugTrackerPersistableSettings

OnClose() public méthode

Optional. Called whenever the bug tracker UI is closed for any reason. Clear the view for the next project to be loaded, which may not have Jira settings.
public OnClose ( ) : void
Résultat void

OnSave() public méthode

Optional. Called whenever user clicks Save in the UI to save the settings. Enables customizing the save click handling. We'll make the settings in the ViewModel the active settings for submitting bugs.
public OnSave ( ) : void
Résultat void

ResetSettings() public méthode

Resets bug tracker connection settings to default settings. Called when a project containg Jira settings is first opened, but before settings are loaded. Also called when the project is closed. Useful method to clean up the bug tracker data internally.
public ResetSettings ( ) : void
Résultat void

SubmitBug() public méthode

Submits a bug to the bug tracking tool. Return an int that represents the newly created bug ID.
public SubmitBug ( IBug bug ) : int
bug IBug The bug from Test Studio to be created.
Résultat int

SubmitBug() public méthode

public SubmitBug ( IBug bug ) : string
bug IBug
Résultat string

jiraConnSettings_PropertyChanged() public méthode

Handle property changes in the ViewModel. For now all we do is bubble up the SelectedProject property change to CanSave which enables/disables the 'Done' button on the Test Studio wrapping WPF window.
public jiraConnSettings_PropertyChanged ( object sender, PropertyChangedEventArgs e ) : void
sender object The object that raised the event.
e System.ComponentModel.PropertyChangedEventArgs Event arguments.
Résultat void