Example #1
0
 public IssueTypeWrapper(IssueType type)
 {
     Value = type;
     switch (type)
     {
         case IssueType.Normal:
             DisplayName = "Zwykły";
             break;
         case IssueType.Habilitation:
             DisplayName = "Praca habilitacyjna";
             break;
         case IssueType.Conference:
             DisplayName = "Konferencja";
             break;
         case IssueType.Monograph:
             DisplayName = "Monografia";
             break;
         case IssueType.Session:
             DisplayName = "Sesja";
             break;
         case IssueType.Symposium:
             DisplayName = "Sympozjum naukowe";
             break;
         default:
             throw new ArgumentException("The supplied type is unknown.", "type");
     }
 }
Example #2
0
 public Issue(IssueType type, string item, string itemValue, string description)
 {
     Type = type;
     Item = item;
     ItemValue = itemValue;
     Description = description;
 }
Example #3
0
 public void IssueRegistered(TenantId Tenant, ProductId Product, IssueId Id, string Name, string Description, IssueType Type, IssueAssignerId assigner)
 {
     Issues.Add(new IssueView { Id = Id, Name = Name, Description = Description, Assigner = assigner });
     if (Type == IssueType.Defect)
         Bus.DefectReported(Tenant, Product, Id, Name, Description, assigner);
     else
         Bus.FeatureRequested(Tenant, Product, Id, Name, Description, assigner);
 }
Example #4
0
 private CompileIssue(IssueLocation location, IssueType type, IssueId id)
 {
     this._id = id;
     this._issueType = type;
     _desc = id.GetDescription();
     _msg = _desc;
     _location = location;
 }
Example #5
0
		public Issue(ApplicationUser creator, ApplicationUser assignedTo, IssueType type, string subject, string body)
		{
			Creator = creator;
			AssignedTo = assignedTo;
			Subject = subject;
			Body = body;
			CreatedAt = DateTime.Now;
			IssueType = type;
		}
Example #6
0
        public Issue(string header, string descripton, IssueType issueType)
        {
            Require.NotEmpty(header, nameof(header));
            Require.NotNull(descripton, nameof(descripton));

            Header = header;
            Descripton = descripton;
            IssueType = issueType;
        }
Example #7
0
        public ActionResult AddIssue(IssueType type, string summary)
        {
            if (string.IsNullOrWhiteSpace(summary))
                summary = string.Empty;

            var model = new IssueModel
            {
                Type = type,
                Summary = summary
            };

            return PartialView("_AddIssue", model);
        }
Example #8
0
 public IList<StatusItem> GetStatuses(IssueType id)
 {
     try
     {
         var resp = DbMethods.GetStatuses(id);
         return resp;
     }
     catch (Exception e)
     {
         Console.WriteLine(e.Message);
         throw;
     }
 }
Example #9
0
 public static IList<StatusItem> GetStatuses(IssueType typeId)
 {
     try
     {
         using (var db = new IssuesEntities())
         {
             var query = (from s in db.Status select s);
             switch (typeId)
             {
                 case IssueType.Userstory:
                     {
                         query = query.Where(arg => arg.UserstorySupport);
                         break;
                     }
                 case IssueType.Bag:
                     {
                         query = query.Where(arg => arg.BagSupport);
                         break;
                     }
                 case IssueType.Enhancement:
                     {
                         query = query.Where(arg => arg.EnhancementSupport);
                         break;
                     }
                 default:
                     {
                         return null;
                     }
             }
             return query.Select(arg => new StatusItem { Id = arg.Id, Name = arg.Name }).ToList();
         }
     }
     catch (Exception e)
     {
         Console.WriteLine(e.Message);
         return null;
     }
 }
Example #10
0
 public CreateIssue(IssueType type, string title, string description)
 {
     Type        = type;
     Title       = title;
     Description = description;
 }
Example #11
0
 public IssueRecord(string errorText)
 {
     type = IssueType.Error;
     misc = errorText;
 }
 private Promise ReportIssue(string reporter, string description, IssueType type, HashSet<string> attachments)
 {
     return CoroutineScheduler.Schedule<bool>(ReportIssueAsync(reporter, description, type, attachments));
 }
Example #13
0
 public IssueRecord(GameObject gameObject, Component component, string field, int gameObjectIndex, string path, IssueType type) :
     this(gameObject, component, gameObjectIndex, path, type)
 {
     if (!String.IsNullOrEmpty(field))
     {
         this.field = ObjectNames.NicifyVariableName(field);
     }
 }
Example #14
0
 private CompileIssue(IssueLocation location, IssueType type, IssueId id, params object[] args)
     : this(location, type, id)
 {
     _msg = _desc.TryFormat(args);
 }
 public void AddToIssueTypes(IssueType issueType)
 {
     base.AddObject("IssueTypes", issueType);
 }
Example #16
0
        public ICollection<Issue> GetIssuesByType(IssueType issueType, Guid? projectId, bool includeClosedIssue = false)
        {
            var issuesByType = _issueRepo.FindBy(i => i.Type == issueType);

            if (projectId != null)
            {
                issuesByType = issuesByType.Where(i => i.ProjectId == projectId);
            }

            return issuesByType.ToList();
        }
 /// <summary>
 /// Creates the issue.
 /// </summary>
 /// <param name="type">The type.</param>
 /// <param name="priority">The priority.</param>
 /// <param name="summary">The summary.</param>
 /// <param name="description">The description.</param>
 /// <param name="isCustomRoot">if set to <c>true</c> [is custom root].</param>
 /// <param name="deadline"> </param>
 /// <param name="links">The HTTP link.</param>
 /// <returns>System.Int32.</returns>
 public int CreateIssue(IssueType type, int priority, string summary, string description, bool isCustomRoot, string deadline, IEnumerable<string> links)
 {
     int id = NewIssueId();
     _document.Issues.Add(id, new Issue
                                  {
                                      Id = id,
                                      Type = type,
                                      Status = IssueStatus.Open,
                                      Priority = priority,
                                      Summary = summary,
                                      Description = description,
                                      IsCustomRoot = isCustomRoot,
                                      Deadline = deadline,
                                      CreationDate = DateTime.Now,
                                      Links = links.ToList()
                                  });
     return id;
 }
Example #18
0
 public abstract int CreateNewIssueType(IssueType issueTypeToCreate);
Example #19
0
 public abstract bool UpdateIssueType(IssueType issueTypeToUpdate);
Example #20
0
 public IssueTime(IssueType _type, System.DateTime _time)
 {
     type        = _type;
     time        = _time;
     bHasSpawned = false;
 }
Example #21
0
 public Issue(IssueType type, int offset, int length, int line) : this(type, offset, length, line, null)
 {
 }
Example #22
0
 public IssueRecord(GameObject gameObject, Component component, int gameObjectIndex, string path, IssueType type) :
     this(gameObject, gameObjectIndex, path, type)
 {
     if (component != null)
     {
         this.component = component.GetType().Name;
     }
 }
 public Issue(IssueType t, string txt)
 {
     Type = t;
     State = IssueState.NEW;
     Description = txt;
     Priority = IssuePriority.NORMAL;
     ID = 0;
 }
Example #24
0
 public int GetIssueCount(IssueType issueType)
 {
     throw new NotImplementedException();
 }
Example #25
0
        private static async void GetChangelog()
        {
            try
            {
                RepositoryIssueRequest issueQuery;

                if (options.IncludeOpen == "Y")
                {
                    issueQuery = new RepositoryIssueRequest
                    {
                        Filter = IssueFilter.All,
                        State  = ItemStateFilter.All,
                    };
                }
                else
                {
                    issueQuery = new RepositoryIssueRequest
                    {
                        Filter = IssueFilter.All,
                        State  = ItemStateFilter.Closed,
                    };
                }

                var issues = await client.Issue.GetAllForRepository(options.Organization, options.Repo, issueQuery);

                Dictionary <IssueType, List <Issue> > IssuesByIssueType = new Dictionary <IssueType, List <Issue> >();
                foreach (var issue in issues)
                {
                    if (issue.Milestone != null && issue.Milestone.Title == options.Milestone)
                    {
                        bool      issueFixed = true;
                        bool      hidden     = false;
                        IssueType issueType  = IssueType.None;
                        bool      epicLabel  = false;
                        bool      regressionDuringThisVersion = false;
                        bool      engineeringImprovement      = false;
                        string    requiredLabel      = options.RequiredLabel?.ToLower();
                        bool      foundRequiredLabel = string.IsNullOrEmpty(requiredLabel);

                        foreach (var label in issue.Labels)
                        {
                            if (label.Name.Contains("ClosedAs:"))
                            {
                                issueFixed = false;
                            }

                            if (label.Name == "RegressionDuringThisVersion")
                            {
                                regressionDuringThisVersion = true;
                                hidden = true;
                            }

                            if (label.Name == "Area: Engineering Improvements")
                            {
                                engineeringImprovement = true;
                                hidden = true;
                            }

                            if (!foundRequiredLabel && label.Name.ToLower() == requiredLabel)
                            {
                                foundRequiredLabel = true;
                            }

                            switch (label.Name)
                            {
                            case "Epic":
                                epicLabel = true;
                                break;

                            case "Type:Feature":
                                issueType = IssueType.Feature;
                                break;

                            case "Type:DCR":
                                issueType = IssueType.DCR;
                                break;

                            case "Type:Bug":
                                issueType = IssueType.Bug;
                                break;

                            case "Type:Spec":
                                issueType = IssueType.Spec;
                                break;

                            default:
                                break;
                            }
                        }

                        if (!foundRequiredLabel)
                        {
                            hidden = true;
                        }

                        // if an issue is an epicLabel and has a real IssueType (feature/bug/dcr),
                        // then hide it... we want to show the primary epic issue only.
                        if (epicLabel)
                        {
                            if (issueType == IssueType.None)
                            {
                                issueType = IssueType.Feature;
                            }
                            else
                            {
                                hidden = true;
                            }
                        }
                        else if (issueType == IssueType.None)
                        {
                            if (!(issueFixed && !regressionDuringThisVersion && !engineeringImprovement))
                            {
                                hidden = true;
                            }
                        }

                        if (!hidden && issueFixed)
                        {
                            if (!IssuesByIssueType.ContainsKey(issueType))
                            {
                                IssuesByIssueType.Add(issueType, new List <Issue>());
                            }

                            IssuesByIssueType[issueType].Add(issue);
                        }
                    }
                }

                GenerateMarkdown(IssuesByIssueType);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
        }
Example #26
0
 public int GetIssueCount(IssueType issueType, Guid? projectId)
 {
     throw new NotImplementedException();
 }
Example #27
0
 public static CompileIssue CreateNoLocationIssue(IssueType type, IssueId id, params object[] args)
 {
     CompileIssue issue = new CompileIssue(IssueLocation.NA, type, id, args);
     return issue;
 }
Example #28
0
        public int GetIssueCount(IssueType issueType, Project project, bool includeClosedIssue = true)
        {
            Guid? projectId;

            if (project == null)
            {
                projectId = null;
            }
            else
            {
                projectId = project.Id;
            }

            return GetIssueCount(issueType, projectId, includeClosedIssue);
        }
Example #29
0
        public Issue(string id_inst, string id_wyd, string id_serie, int? id_w_serii, int nr_w_serii, int nr_w_wydawnictwie,
            string tytul_pl, int? rok_wydania, bool fl_zwer, string typ, string nr_typ)
        {
            this.InstitutionId = id_inst;
            this.PublisherId = id_wyd;
            this.JournalId = id_serie;
            this.IdWithinJournal = id_w_serii;
            this.NumberWithinJournal = nr_w_serii;
            this.NumberWithinPublisher = nr_w_wydawnictwie;
            this.Title = tytul_pl;
            this.YearOfPublication = rok_wydania;
            this.WasVerified = fl_zwer;
            this.TypeNumber = nr_typ;

            switch (typ)
            {
                case "art":
                    this.Type = IssueType.Normal;
                    this.TypeSave = typ;
                    break;
                case "hab":
                    this.Type = IssueType.Habilitation;
                    this.TypeSave = typ;
                    break;
                case "kon":
                    this.Type = IssueType.Conference;
                    this.TypeSave = typ;
                    break;
                case "mon":
                    this.Type = IssueType.Monograph;
                    this.TypeSave = typ;
                    break;
                case "ses":
                    this.Type = IssueType.Session;
                    this.TypeSave = typ;
                    break;
                case "sym":
                    this.Type = IssueType.Symposium;
                    this.TypeSave = typ;
                    break;
                case "Zwykły":
                    this.Type = IssueType.Normal;
                    this.TypeSave = "art";
                    break;
                case "Konferencja":
                    this.Type = IssueType.Conference;
                    this.TypeSave = "kon";
                    break;
                case "Praca habilitacyjna":
                    this.Type = IssueType.Habilitation;
                    this.TypeSave = "hab";
                    break;
                case "Monografia":
                    this.Type = IssueType.Monograph;
                    this.TypeSave = "mon";
                    break;
                case "Sesja":
                    this.Type = IssueType.Session;
                    this.TypeSave = "ses";
                    break;
                case "Sympozjum naukowe":
                    this.Type = IssueType.Symposium;
                    this.TypeSave = "sym";
                    break;
                default:
                    //error....
                    break;
            }
        }
        public async Task Update(int id, string name, string issuePictureUrl, string description, RegionType region, IssueType type,
                                 string addressStreet, string streetNumber)
        {
            var issueFromDb = await this.db.FindAsync <UrbanIssue>(id);

            issueFromDb.Name            = name;
            issueFromDb.IssuePictureUrl = issuePictureUrl;
            issueFromDb.Description     = description;
            issueFromDb.Region          = region;
            issueFromDb.Type            = type;
            issueFromDb.AddressStreet   = addressStreet;
            issueFromDb.StreetNumber    = streetNumber;

            await this.db.SaveChangesAsync();
        }
        protected void OnEnable()
        {
            this.LastError = null;
            this.ThanksMessage = null;
            this.Description = null;
            this.Type = IssueType.Bug;
            this.Attachments = new HashSet<string>();
            this.attachmentsToAdd = new HashSet<string>();
            this.attachmentsToRemove = new HashSet<string>();

            if (!string.IsNullOrEmpty(EditorLogPath) && File.Exists(EditorLogPath))
                this.attachmentsToAdd.Add(EditorLogPath);

            if (!string.IsNullOrEmpty(EditorPrevLogPath) && File.Exists(EditorPrevLogPath))
                this.attachmentsToAdd.Add(EditorPrevLogPath);

            if (!string.IsNullOrEmpty(CharonLogPath) && File.Exists(CharonLogPath))
                this.attachmentsToAdd.Add(CharonLogPath);
        }
Example #32
0
        public IHttpActionResult GetIssues(int gimmickId = 0, int userId = 0, IssueType type = IssueType.Any, IssueStatus status = IssueStatus.Any)
        {
            if (gimmickId < 0)
            {
                return(BadRequest("Gimmick ID is not valid!"));
            }

            if (userId < 0)
            {
                return(BadRequest("Gimmick ID is not valid!"));
            }

            try
            {
                using (var ctx = new BugghyDbContext())
                {
                    var query = ctx.Issues.AsQueryable();
                    if (gimmickId > 0)
                    {
                        query = query.Where(x => x.GimmickId == gimmickId);
                    }
                    if (userId > 0)
                    {
                        query = query.Where(x => x.UserId == userId);
                    }
                    if (type != IssueType.Any)
                    {
                        query = query.Where(x => x.Type == type);
                    }
                    if (status != IssueStatus.Any)
                    {
                        query = query.Where(x => x.Status == status);
                    }

                    return(Ok(Dto.Wrap(new Poco.DataBundle <Poco.Issue>
                    {
                        Items = query
                                .Select(x => new Poco.Issue
                        {
                            IssueId = x.IssueId,
                            GimmickId = x.GimmickId,
                            UserId = x.UserId,
                            Sender = x.Sender,
                            Code = x.Code,
                            Title = x.Title,
                            Description = x.Description,
                            Type = x.Type,
                            Status = x.Status,
                            CreationDate = x.CreationDate,
                            ReplyDate = x.ReplyDate,
                            ClosedDate = x.ClosedDate,
                            IsClosed = x.IsClosed
                        })
                                .ToArray()
                    })));
                }
            }
            catch (Exception ex)
            {
                return(InternalServerError(ex));
            }
        }
Example #33
0
        private void FillIssueData(Issue issue)
        {
            if (issue == null)
            {
                _issueFound = false;
                numberWithinJournalBox.IsEnabled = false;
                numberWithinPublisherBox.IsEnabled = false;

                editButton.IsEnabled = true;
                cancelButton.IsEnabled = true;

                yearBox.IsEnabled = true;
                titleBox.IsEnabled = true;
                typeCombo.IsEnabled = true;
                typeNumberBox.IsEnabled = true;

                if (numberWithinJournalBox.Text != "")
                {
                    _seriesNumber = int.Parse(numberWithinJournalBox.Text);
                }
                if (numberWithinPublisherBox.Text != "")
                {
                    _publisherNumber = int.Parse(numberWithinPublisherBox.Text);
                }

                yearBox.Text = "";
                titleBox.Text = "";
                typeNumberBox.Text = "";

                _title = "";
                _type = default(IssueType);
                _typeNumber = "";
                _year = "";

                editButton.Content = "Dodaj zeszyt";

            }
            else
            {
                _issueFound = true;
                numberWithinJournalBox.Text = issue.NumberWithinJournal.ToString();
                numberWithinPublisherBox.Text = issue.NumberWithinPublisher.ToString();
                yearBox.Text = issue.YearOfPublication != null ? issue.YearOfPublication.ToString() : "";
                titleBox.Text = issue.Title != null ? issue.Title : "";
                _viewModel.IssueTypes.MoveCurrentTo(issue.Type);
                typeNumberBox.Text = issue.TypeNumber != null ? issue.TypeNumber.ToString() : "";

                _title = titleBox.Text;
                //TYPE??
                _type = issue.Type;
                _typeNumber = typeNumberBox.Text;
                _year = yearBox.Text;

                editButton.IsEnabled = true;
                cancelButton.IsEnabled = true;

                editButton.Content = "Edytuj zeszyt";
            }
        }
Example #34
0
 private static Func <Group, string, int, Issue> DefaultIssueFactory(Block block, IssueType type, string errorText)
 {
     return((group, text, line) =>
     {
         var index = block.SourcePosition + group.Index;
         int lineNumber = line + TextUtility.GetLineNumber(text, group.Index);
         var issue = new Issue(type, index, group.Length, lineNumber, errorText);
         return issue;
     });
 }
Example #35
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TypeViewModel" /> class.
 /// </summary>
 /// <param name="parent">The parent.</param>
 /// <param name="issueType">Type of the issue.</param>
 /// <param name="isChecked">if set to <c>true</c> [is checked].</param>
 public TypeViewModel(object parent, IssueType issueType, bool isChecked)
     : base(parent)
 {
     IssueType = issueType;
     IsChecked = isChecked;
 }
 public IssueTemplate(ICheck check, IssueType type, string unformattedMessage)
 {
     Check = check;
     Type  = type;
     UnformattedMessage = unformattedMessage;
 }
Example #37
0
        private void AppendCompileIssue(SyntaxToken token, IssueType type, IssueId id, params object[] args)
        {
            var issue = CompileIssue.Create(this._semanticModel.SyntaxTree, token, type, id, args);

            _aggregator.AppendIssue(issue);
        }
Example #38
0
 /// <inheritDoc />
 public IFinalClause Is(IssueType type)
 {
     return(Is(type.Id));
 }
Example #39
0
        public void CreateIssueType(Guid issueTypeKey, Guid versionKey, int ticket, string type, string issueLevel, string message, string stackTrace, DateTime serverTime, IssueTypeRequestEntity[] innerIssueTypes)
        {
            using (var context = GetDataContext())
            {
                var itk = GetIssueTypeKey(issueTypeKey, type, issueLevel, message, stackTrace);
                if (itk != null) throw new InvalidOperationException("A IssueType with this signature already exists.");

                var detail = new IssueTypeDetail
                {
                    Type = type,
                    Message = message,
                    StackTrace = stackTrace,                        
                };
                context.IssueTypeDetails.InsertOnSubmit(detail);

                var newIssueType = new IssueType
                {
                    IssueTypeKey = issueTypeKey,
                    VersionId = context.Versions.Single(x => x.VersionKey == versionKey).VersionId,
                    Ticket = ticket,
                    Level = issueLevel,
                    CreationServerTime = serverTime,
                    IssueTypeDetail = detail
                };
                context.IssueTypes.InsertOnSubmit(newIssueType);

                CreateIssueTypeDetail(innerIssueTypes, detail, context);

                context.SubmitChanges();
            }
        }
Example #40
0
        private void ValidateOperationOutcome(string actualStatusCode, OperationOutcome operationOutcome, string expectedStatusCode, string expectedDiagnostics, IssueType expectedIssueType)
        {
            Assert.Equal(expectedStatusCode, actualStatusCode);
            Assert.NotNull(operationOutcome);
            Assert.Single(operationOutcome.Issue);

            var issue = operationOutcome.Issue.First();

            Assert.Equal(IssueSeverity.Error, issue.Severity.Value);
            Assert.Equal(expectedIssueType, issue.Code);
            Assert.Equal(expectedDiagnostics, issue.Diagnostics);
        }
Example #41
0
 /// <summary>
 /// Creates the issue.
 /// </summary>
 /// <param name="type">The type.</param>
 /// <param name="priority">The priority.</param>
 /// <param name="summary">The summary.</param>
 /// <param name="description">The description.</param>
 /// <param name="isCustomRoot">if set to <c>true</c> [is custom root].</param>
 /// <param name="deadline"> </param>
 /// <param name="links">The HTTP link.</param>
 /// <returns>System.Int32.</returns>
 public int CreateIssue(IssueType type, int priority, string summary, string description, bool isCustomRoot, string deadline, IEnumerable<string> links)
 {
     return _documentRepository.CreateIssue(type, priority, summary, description, isCustomRoot, deadline, links);
 }
Example #42
0
        protected void OnGUI()
        {
            GUILayout.Space(5);
            if (string.IsNullOrEmpty(this.ThanksMessage))
            {
                GUI.enabled      = this.reportCoroutine == null || this.reportCoroutine.IsCompleted;
                this.Name        = EditorGUILayout.TextField(Resources.UI_UNITYPLUGIN_FEEDBACK_NAME_LABEL, this.Name);
                this.Email       = EditorGUILayout.TextField(Resources.UI_UNITYPLUGIN_FEEDBACK_EMAIL_LABEL, this.Email);
                this.Type        = (IssueType)EditorGUILayout.EnumPopup(Resources.UI_UNITYPLUGIN_FEEDBACK_TYPE_LABEL, this.Type);
                this.Description = EditorGUILayout.TextArea(this.Description, GUILayout.Height(120));

                GUILayout.Space(5);

                if (this.Attachments == null)
                {
                    this.Attachments = new HashSet <string>();
                }
                if (this.attachmentsToAdd == null)
                {
                    this.attachmentsToAdd = new HashSet <string>();
                }
                if (this.attachmentsToRemove == null)
                {
                    this.attachmentsToRemove = new HashSet <string>();
                }

                foreach (var attachmentFile in this.Attachments)
                {
                    var fileInfo = new FileInfo(attachmentFile);
                    if (GUILayout.Toggle(true, string.Format(Resources.UI_UNITYPLUGIN_FEEDBACK_ATTACH_FILE_CHECKBOX, fileInfo.Name, fileInfo.Length / 1024.0 / 1024.0)) == false)
                    {
                        this.attachmentsToRemove.Add(attachmentFile);
                    }
                }

                GUILayout.BeginHorizontal();
                EditorGUILayout.Space();
                if (GUILayout.Button(Resources.UI_UNITYPLUGIN_FEEDBACK_ATTACH_FILE_BUTTON, EditorStyles.toolbarButton, GUILayout.Width(70), GUILayout.Height(18)))
                {
                    var file = EditorUtility.OpenFilePanel(Resources.UI_UNITYPLUGIN_SELECT_FILE_TO_ATTACH_TITLE, "", "");
                    if (!string.IsNullOrEmpty(file) && File.Exists(file))
                    {
                        this.attachmentsToAdd.Add(Path.GetFullPath(file));
                    }
                }
                GUILayout.Space(5);
                GUILayout.EndHorizontal();

                GUILayout.Space(5);
                if (!string.IsNullOrEmpty(this.LastError))
                {
                    GUILayout.Box(this.LastError);
                }

                GUILayout.Space(18);
                GUILayout.BeginHorizontal();
                EditorGUILayout.Space();

                var reporter = string.Empty;
                if (string.IsNullOrEmpty(this.Email) == false && string.IsNullOrEmpty(this.Name) == false)
                {
                    reporter = "<" + this.Name + ">" + this.Email;
                }
                else if (string.IsNullOrEmpty(this.Email) == false)
                {
                    reporter = this.Email;
                }
                else
                {
                    reporter = this.Name;
                }

                GUI.enabled = !string.IsNullOrEmpty(reporter) && !string.IsNullOrEmpty(this.Description) && (this.reportCoroutine == null || this.reportCoroutine.IsCompleted);
                if (GUILayout.Button(Resources.UI_UNITYPLUGIN_FEEDBACK_SEND_BUTTON, GUILayout.Width(80)))
                {
                    this.reportCoroutine = this.ReportIssue(reporter, this.Description, this.Type, this.Attachments).ContinueWith(p =>
                    {
                        if (p.HasErrors)
                        {
                            this.LastError = p.Error.Unwrap().Message;
                        }
                        else
                        {
                            this.LastError           = null;
                            this.Description         = null;
                            this.Type                = IssueType.Bug;
                            this.Attachments         = null;
                            this.attachmentsToAdd    = null;
                            this.attachmentsToRemove = null;

                            this.ThanksMessage = Resources.UI_UNITYPLUGIN_FEEDBACK_THANKS_MESSAGE;
                            Promise.Delayed(TimeSpan.FromSeconds(3)).ContinueWith(_ => this.Close());
                        }
                        this.Repaint();
                    });
                }
                GUI.enabled = true;
                GUILayout.EndHorizontal();
            }
            else
            {
                GUILayout.Box(this.ThanksMessage, new GUIStyle {
                    fontSize = 24, alignment = TextAnchor.MiddleCenter
                });
            }

            GUILayoutUtility.GetRect(1, 1, 1, 1);
            if (Event.current.type == EventType.repaint && GUILayoutUtility.GetLastRect().y > 0)
            {
                var newRect = GUILayoutUtility.GetLastRect();
                this.position = new Rect(this.position.position, new Vector2(this.position.width, newRect.y + 7));
                this.minSize  = this.maxSize = this.position.size;
            }
        }
			public Fields()
			{
				Summary = "";
				IssueType = new IssueType();
				Created = "";
				Updated = "";
				Description = "";
				Priority = new Priority();
				Status = new Status();
				Labels = new List<string>();
				Assignee = new Author();
			}
Example #44
0
 private Promise ReportIssue(string reporter, string description, IssueType type, HashSet <string> attachments)
 {
     return(CoroutineScheduler.Schedule <bool>(this.ReportIssueAsync(reporter, description, type, attachments), "ui::ReportIssue"));
 }
Example #45
0
 public static CompileIssue Create(SyntaxTree tree, SyntaxToken token, IssueType type, IssueId id, params object[] args)
 {
     IssueLocation loc = new IssueLocation(tree, token);
     CompileIssue issue = new CompileIssue(loc, type, id, args);
     return issue;
 }
Example #46
0
 protected IssueTemplateUnsnap(ICheck check, IssueType type)
     : base(check, type, "{0} is unsnapped by {1:0.##} ms.")
 {
 }
Example #47
0
 protected IssueTemplateOverlap(ICheck check, IssueType issueType, string unformattedMessage)
     : base(check, issueType, unformattedMessage)
 {
 }
Example #48
0
 public void UpdateIssueDetails(IssueType type, string title, string description)
 {
     Type        = type;
     Title       = title;
     Description = description;
 }
Example #49
0
 protected IssueTemplateLongPeriod(ICheck check, IssueType type)
     : base(check, type, "Long period without hitsounds ({0:F1} seconds).")
 {
 }
Example #50
0
 protected IssueTemplateMuted(ICheck check, IssueType type, string unformattedMessage)
     : base(check, type, unformattedMessage)
 {
 }
 public Call(IssueType issue)
 {
     mIssue = issue;
 }
Example #52
0
 public static string ToVsts(this IssueType issueType)
 {
     return(IssueType.Map(issueType.ToString()));
 }
 public static IssueType CreateIssueType(int ID, string issueTypeName, byte[] rowVersion)
 {
     IssueType issueType = new IssueType();
     issueType.Id = ID;
     issueType.IssueTypeName = issueTypeName;
     issueType.RowVersion = rowVersion;
     return issueType;
 }
Example #54
0
 public Issue(Guid id, IssueType type, string title)
 {
     Id    = id;
     Type  = type;
     Title = title;
 }
        protected void OnGUI()
        {
            GUILayout.Space(5);
            if (string.IsNullOrEmpty(this.ThanksMessage))
            {
                GUI.enabled = this.reportCoroutine == null || this.reportCoroutine.IsCompleted;
                this.Reporter = EditorGUILayout.TextField(Resources.UI_UNITYPLUGIN_WINDOWREPORTERLABEL, this.Reporter);
                this.Type = (IssueType)EditorGUILayout.EnumPopup(Resources.UI_UNITYPLUGIN_WINDOWTYPELABEL, this.Type);
                this.Description = EditorGUILayout.TextArea(this.Description, GUILayout.Height(120));

                GUILayout.Space(5);

                if (this.Attachments == null) this.Attachments = new HashSet<string>();
                if (this.attachmentsToAdd == null) this.attachmentsToAdd = new HashSet<string>();
                if (this.attachmentsToRemove == null) this.attachmentsToRemove = new HashSet<string>();

                foreach (var attachmentFile in this.Attachments)
                {
                    var fileInfo = new FileInfo(attachmentFile);
                    if (GUILayout.Toggle(true, string.Format(Resources.UI_UNITYPLUGIN_WINDOWATTACHFILECHECKBOX, fileInfo.Name, fileInfo.Length / 1024.0 / 1024.0)) == false)
                        this.attachmentsToRemove.Add(attachmentFile);
                }

                GUILayout.BeginHorizontal();
                EditorGUILayout.Space();
                if (GUILayout.Button(Resources.UI_UNITYPLUGIN_ATTACHFILEBUTTON, EditorStyles.toolbarButton, GUILayout.Width(70), GUILayout.Height(18)))
                {
                    var file = EditorUtility.OpenFilePanel(Resources.UI_UNITYPLUGIN_SELECTFILETOATTACHTITLE, "", "");
                    if (!string.IsNullOrEmpty(file) && File.Exists(file))
                        this.attachmentsToAdd.Add(Path.GetFullPath(file));
                }
                GUILayout.Space(5);
                GUILayout.EndHorizontal();

                GUILayout.Space(5);
                if (!string.IsNullOrEmpty(this.LastError))
                    GUILayout.Box(this.LastError);

                GUILayout.Space(18);
                GUILayout.BeginHorizontal();
                EditorGUILayout.Space();
                GUI.enabled = !string.IsNullOrEmpty(this.Reporter) && !string.IsNullOrEmpty(this.Description) && (this.reportCoroutine == null || this.reportCoroutine.IsCompleted);
                if (GUILayout.Button(Resources.UI_UNITYPLUGIN_REPORTBUTTON, GUILayout.Width(80)))
                {
                    this.reportCoroutine = this.ReportIssue(this.Reporter, this.Description, this.Type, this.Attachments).ContinueWith(p =>
                    {
                        if (p.HasErrors)
                        {
                            this.LastError = p.Error.Unwrap().Message;
                        }
                        else
                        {
                            this.LastError = null;
                            this.Description = null;
                            this.Type = IssueType.Bug;
                            this.Attachments = null;
                            this.attachmentsToAdd = null;
                            this.attachmentsToRemove = null;

                            this.ThanksMessage = Resources.UI_UNITYPLUGIN_WINDOWREPORTTHANKSMESSAGE;
                            Promise.Delayed(TimeSpan.FromSeconds(3)).ContinueWith(_ => this.Close());
                        }
                        this.Repaint();
                    });
                }
                GUI.enabled = true;
                GUILayout.EndHorizontal();
            }
            else
            {
                GUILayout.Box(this.ThanksMessage, new GUIStyle { fontSize = 24, alignment = TextAnchor.MiddleCenter });
            }

            GUILayoutUtility.GetRect(1, 1, 1, 1);
            if (Event.current.type == EventType.repaint && GUILayoutUtility.GetLastRect().y > 0)
            {
                var newRect = GUILayoutUtility.GetLastRect();
                this.position = new Rect(this.position.position, new Vector2(this.position.width, newRect.y + 7));
                this.minSize = this.maxSize = this.position.size;
            }
        }
 /// <summary>
 /// Converts the <see cref="sourceValue" /> parameter to the <see cref="destinationType" /> parameter using <see cref="formatProvider"
 /// /> and <see cref="ignoreCase" />
 /// </summary>
 /// <param name="sourceValue">the <see cref="System.Object"/> to convert from</param>
 /// <param name="destinationType">the <see cref="System.Type" /> to convert to</param>
 /// <param name="formatProvider">not used by this TypeConverter.</param>
 /// <param name="ignoreCase">when set to <c>true</c>, will ignore the case when converting.</param>
 /// <returns>
 /// an instance of <see cref="IssueType" />, or <c>null</c> if there is no suitable conversion.
 /// </returns>
 public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => IssueType.CreateFrom(sourceValue);
        private IEnumerable ReportIssueAsync(string reporter, string description, IssueType type, HashSet<string> attachments)
        {
            var arguments = new List<string>
            {
                "SERVER", "REPORTISSUE",
                "--reporter", reporter,
                "--description", description,
                "--type", type.ToString()
            };
            if (attachments != null && attachments.Count > 0)
            {
                arguments.Add("--attachments");
                foreach (var attachment in attachments)
                    arguments.Add(attachment);
            }
            if (Settings.Current.Verbose)
                arguments.Add("--verbose");

            var reportIssue = ToolsRunner.RunCharonAsTool(arguments.ToArray());
            yield return reportIssue.IgnoreFault();

            var errorOutput = reportIssue.HasErrors ? reportIssue.Error.Message : reportIssue.GetResult().GetErrorData();
            if (string.IsNullOrEmpty(errorOutput) == false)
                throw new InvalidOperationException("Failed to report issue: " + (errorOutput.Length > 0 ? errorOutput : "An unknown error occured. Please report this issue directly to developer."));
        }
Example #58
0
 private void SetIssueTypeImage(IssueType type)
 {
     string[] typeImages = new[] { "image_gear", "image_issue_crash", "image_issue_blocking", "image_issue_nblocking" };
     this.TypeImage.Image = UIImage.FromBundle(typeImages[(int)type]);
 }
Example #59
0
 public static string ToSerialString(this IssueType value) => value switch
 {
Example #60
0
 public IssueRecord(GameObject gameObject, Component component, string field, string misc, int gameObjectIndex, string path, IssueType type) :
     this(gameObject, component, field, gameObjectIndex, path, type)
 {
     this.misc = misc;
 }