Exemplo n.º 1
0
        private async Task <IList <JiraIssue> > DownloadIssues(int boardId, bool forceReload, Action <float> progressUpdateCallback)
        {
            var boardConfig = await GetBoardConfiguration(boardId);

            var filter = await _metadataRetriever.GetFilterDefinition(boardConfig.Filter.Id);

            if (_boardCaches.ContainsKey(boardId) == false)
            {
                _boardCaches[boardId] = _applicationCache.GetAgileBoardCache(boardId);
            }
            var boardCache = _boardCaches[boardId];

            if (forceReload)
            {
                boardCache.Invalidate();
            }

            var issues = await _issuesFinder.Search(boardCache.PrepareSearchStatement(filter.Jql), progressUpdateCallback);

            issues = await boardCache.UpdateCache(issues);

            return(issues);
        }