Ejemplo n.º 1
0
        public void RefreshFromJira(Issue jiraIssue, User currentUser)
        {
            if (jiraIssue == null) return;

            SetJiraExportedTime(jiraIssue.GetCurrentLoggedTimeForDate(DateStarted, currentUser));
            JiraReference = jiraIssue.key;
            JiraProjectName = jiraIssue.fields.project.key;
            JiraName = jiraIssue.fields.summary;
            if (jiraIssue.fields.parent != null)
            {
                JiraParentReference = jiraIssue.fields.parent.key;
                JiraParentName = jiraIssue.fields.parent.fields.summary;
            }
            else
            {
                JiraParentReference = string.Empty;
                JiraParentName = string.Empty;
            }

            if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs("ExactCurrentTime"));
            if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs("TimeToExport"));
            if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs("JiraReference"));
            if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs("JiraProjectName"));
            if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs("JiraName"));
            if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs("JiraParentReference"));
            if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs("JiraParentName"));
            if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs("HasParent"));
        }
Ejemplo n.º 2
0
        public void UpdateExportTimeFromJira(Issue jiraIssue, User currentUser)
        {
            if (jiraIssue == null) return;

            LocalTimer = false;

            SetJiraExportedTime(jiraIssue.GetCurrentLoggedTimeForDate(DateStarted, currentUser));

            LastJiraTimeCheck = DateTime.UtcNow;

            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("ExactCurrentTime"));
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("TimeToExport"));
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("LastJiraTimeCheck"));
        }