Esempio n. 1
0
        public List <JiraSavedFilter> getSavedFilters()
        {
#if PLVS_133_WORKAROUND
            object[] results = service.getSavedFilters(Token);
            return((from pobj in results.ToList()
                    let id = pobj.GetType().GetProperty("id")
                             let name = pobj.GetType().GetProperty("name")
                                        select new JiraSavedFilter(
                        int.Parse((string)id.GetValue(pobj, null)),
                        (string)name.GetValue(pobj, null)))
                   .ToList());
#else
            RemoteFilter[] fTable = service.getSavedFilters(Token);
            return(fTable.Select(f => new JiraSavedFilter(int.Parse(f.id), f.name)).ToList());
#endif
        }
Esempio n. 2
0
        public IIssueFilter[] GetFilters()
        {
            List <IIssueFilter> filters = new List <IIssueFilter>();

            try
            {
                foreach (RemoteFilter filter in _service.getSavedFilters(Token))
                {
                    filters.Add(new JiraFilter(this, filter));
                }
            }
            catch (Exception e) { Log.Warning(e); }
            try
            {
                foreach (RemoteFilter filter in _service.getFavouriteFilters(Token))
                {
                    JiraFilter jfilt = new JiraFilter(this, filter);
                    if (!filters.Contains(jfilt))
                    {
                        filters.Add(jfilt);
                    }
                }
            }
            catch (Exception e) { Log.Warning(e); }

            filters.Sort(new NameSorter <IIssueFilter>());

            RemoteServerInfo jiraInfo = _service.getServerInfo(_token);

            //if (new Version(jiraInfo.version) < new Version("4.0"))
            filters.Add(new JiraAllFilter(this));

            return(filters.ToArray());
        }
Esempio n. 3
0
        public List <JiraSavedFilter> getSavedFilters()
        {
            RemoteFilter[]         fTable = service.getSavedFilters(token);
            List <JiraSavedFilter> list   = new List <JiraSavedFilter>();

            foreach (RemoteFilter f in fTable)
            {
                list.Add(new JiraSavedFilter(int.Parse(f.id), f.name));
            }
            return(list);
        }
 public List <JiraSavedFilter> getSavedFilters()
 {
     object[] results = service.getSavedFilters(Token);
     return((from pobj in results.ToList()
             let id = pobj.GetType().GetProperty("id")
                      let name = pobj.GetType().GetProperty("name")
                                 select new JiraSavedFilter(
                 int.Parse((string)id.GetValue(pobj, null)),
                 (string)name.GetValue(pobj, null)))
            .ToList());
 }
Esempio n. 5
0
        public JiraFilter[] getFilters()
        {
            List <JiraFilter> filters = new List <JiraFilter>();

            checkCredentials();
            RemoteFilter[] remoteFilters = jira.getSavedFilters(credentials);
            foreach (RemoteFilter remoteFilter in remoteFilters)
            {
                filters.Add(new JiraFilter(remoteFilter.name, remoteFilter.id));
            }
            return(filters.ToArray());
        }
Esempio n. 6
0
 private void InitializeFilters(bool ignoreCache)
 {
     //TODO caching.
     if (_filters == null || ignoreCache)
     {
         _filters = new Dictionary <string, RemoteFilter>();
         foreach (RemoteFilter f in _jira.getSavedFilters(_jiraToken))
         {
             _filters[f.name.ToLowerInvariant()] = f;
         }
     }
 }