protected override void ExecuteConcreate(PluginProfileErrorCollection errors)
 {
     try
     {
         var       url       = new BugzillaUrl(ConnectionSettings);
         WebClient webClient = new TpWebClient(errors)
         {
             Encoding = Encoding.UTF8
         };
         webClient.DownloadString(url.Url);
     }
     catch (WebException webException)
     {
         if (webException.Status != WebExceptionStatus.TrustFailure)
         {
             errors.Add(new PluginProfileError {
                 FieldName = BugzillaProfile.UrlField, Message = webException.Message, AdditionalInfo = ValidationErrorType.BugzillaNotFound.ToString()
             });
         }
     }
     catch (Exception exception)
     {
         errors.Add(new PluginProfileError {
             FieldName = BugzillaProfile.UrlField, Message = exception.Message, AdditionalInfo = ValidationErrorType.BugzillaNotFound.ToString()
         });
     }
 }
 public void CreateComment(string comment, int bugId, string ownerEmail, string createDate)
 {
     _bugzillaResponse =
         new BugzillaUrl(Profile.GetProfile<BugzillaProfile>()).ExecuteOnBugzilla(new BugzillaCommentAction(
                                                                                  	bugId.ToString(), comment, ownerEmail,
                                                                                  	DateTime.Parse(createDate)));
 }
 protected override void ExecuteConcreate(PluginProfileErrorCollection errors)
 {
     try
     {
         var url = new BugzillaUrl(ConnectionSettings);
         var webClient = new WebClient {Encoding = Encoding.UTF8};
         webClient.DownloadString(url.Url);
     }
     catch (Exception exception)
     {
         errors.Add(new PluginProfileError {FieldName = BugzillaProfile.UrlField, Message = exception.Message, AdditionalInfo = ValidationErrorType.BugzillaNotFound.ToString()});
     }
 }
Exemplo n.º 4
0
 protected override void ExecuteConcreate(PluginProfileErrorCollection errors)
 {
     try
     {
         Data = new BugzillaUrl(ConnectionSettings).CheckConnection();
     }
     catch (Exception)
     {
         errors.Add(new PluginProfileError
         {
             FieldName      = BugzillaProfile.UrlField,
             Message        = "The Bugzilla script tp2.cgi was not found. Please copy tp2.cgi to the Bugzilla folder.",
             AdditionalInfo = ValidationErrorType.TpCgiNotFound.ToString()
         });
     }
 }
Exemplo n.º 5
0
 protected override void ExecuteConcreate(PluginProfileErrorCollection errors)
 {
     try
     {
         Data = new BugzillaUrl(ConnectionSettings).GetChangedBugsIds(CurrentDate.Value);
     }
     catch (Exception)
     {
         errors.Add(new PluginProfileError
         {
             FieldName      = BugzillaProfile.QueriesField,
             Message        = "The defined Bugzilla Saved Searches are not valid",
             AdditionalInfo = ValidationErrorType.QueryNotFound.ToString()
         });
     }
 }
		public void ChangeAssignmentInBugzilla(int bugId, string userEmail)
		{
			_bugzillaResponse =
				new BugzillaUrl(Profile.GetProfile<BugzillaProfile>()).ExecuteOnBugzilla(new BugzillaAssigneeAction(
				                                                                         	bugId.ToString(), userEmail));
		}