示例#1
0
        public int GetNumIssues(
            int boardId,
            int sprintId,
            string state         = "active",
            List <string> fields = null,
            int startAt          = 0,
            int maxResult        = 50)
        {
            SearchRequestBoards request = new SearchRequestBoards();

            request.ProjectKeyOrId = "VATT";
            request.MaxResults     = maxResult;
            request.StartAt        = startAt;

            string data = JsonConvert.SerializeObject(request);


            string extUrl = "rest/agile/1.0/board/";

            string argument = string.Format("{0}{1}{2}{3}{4}/", extUrl, boardId, "/sprint/", sprintId, "/issue/");
            //string result = RunQueryBoard();
            string result = RunQuery(argument);

            IssueDescription issueDescription = JsonConvert.DeserializeObject <IssueDescription>(result);

            return(issueDescription.Total);
        }
示例#2
0
        public BoardsDescription GetBoards(string baseUrl,
                                           string type   = "scrum",
                                           string name   = null,
                                           int startAt   = 0,
                                           int maxResult = 50)
        {
            SearchRequestBoards request = new SearchRequestBoards();

            request.Name           = name;
            request.ProjectKeyOrId = "VATT";
            request.MaxResults     = maxResult;
            request.StartAt        = startAt;
            request.Type           = type;

            string data   = JsonConvert.SerializeObject(request);
            string extUrl = "rest/agile/1.0/board";
            //string result = RunQueryBoard();
            string result = RunQuery(extUrl);

            return(JsonConvert.DeserializeObject <BoardsDescription>(result));
        }
示例#3
0
        public SprintsDescription GetSprints(
            int boardId,
            string state         = "active",
            List <string> fields = null,
            int startAt          = 0,
            int maxResult        = 50)
        {
            SearchRequestBoards request = new SearchRequestBoards();

            //request.ProjectKeyOrId = "VATT";
            request.MaxResults = maxResult;
            request.StartAt    = startAt;

            string data = JsonConvert.SerializeObject(request);


            string extUrl = "rest/agile/1.0/board/";

            string argument = string.Format("{0}{1}{2}", extUrl, boardId, "/sprint");
            //string result = RunQueryBoard();
            string result = RunQuery(argument);

            return(JsonConvert.DeserializeObject <SprintsDescription>(result));
        }