Example #1
0
        private void chkListWorkItems_SelectedIndexChanged(object sender, EventArgs e)
        {
            int          wi     = ExtractWorkItemFromDescription(((CheckedListBox)sender).SelectedItem.ToString());
            WorkItemInfo wiAzDo = WorkitemInfoHandler.GetDataForWorkItem(wi);

            lstDebugInfoOnWorkItem.Items.Clear();

            if (wiAzDo != null)
            {
                lstDebugInfoOnWorkItem.Items.Add(wiAzDo.Id);
                lstDebugInfoOnWorkItem.Items.Add(wiAzDo.Title);
                lstDebugInfoOnWorkItem.Items.Add(wiAzDo.Description);
                lstDebugInfoOnWorkItem.Items.Add(wiAzDo.State);
            }
        }
Example #2
0
        private void btnCreateTasks_Click(object sender, EventArgs e)
        {
            foreach (var item in chkListWorkItems.Items)
            {
                int          wi     = ExtractWorkItemFromDescription(item.ToString());
                WorkItemInfo wiAzDo = WorkitemInfoHandler.GetDataForWorkItem(wi);

                // TODO: process in validation routine

                if (wiAzDo != null && wiAzDo.IsValid)
                {
                    if (wiAzDo.WorkItemType == "Task")
                    {
                        MessageBox.Show(wiAzDo.Id + " is not valid (no tasks within tasks allowed)");
                    }
                }
            }
        }
Example #3
0
        private void btnGetWorkItems_Click(object sender, EventArgs e)
        {
            var templates = ReadTemplatesXML();

            // TODO: Get workitems directly from AzDo
            // Use the templates as a filter (AreaPath)

            List <CsvReadData> workItemsCsvData = BulkInsertCsvReader.ReadCsvTemplatesFile(txtWorkItemsExportFile.Text);

            // TODO: Get workitems directly from AzDo

            // List<int> workItems = new() { 65954, 69976, 99999 };

            //foreach (var wi in workItems)
            //{
            //	var wiData = WorkitemInfoHandler.GetDataForWorkItem(wi);
            //	if (wiData != null)
            //	{
            //		chkListWorkItems.Items.Add(wiData.Title, wiAzdo.IsValid);
            //	}
            //}

            foreach (CsvReadData wiData in workItemsCsvData)
            {
                int wi     = int.Parse(wiData.Id);
                var wiAzdo = WorkitemInfoHandler.GetDataForWorkItem(wi);
                if (wiAzdo != null)
                {
                    chkListWorkItems.Items.Add(wiAzdo.Title, wiAzdo.IsValid);
                }
                else
                {
                    // Not found in AzDo: still show to user !!!!

                    chkListWorkItems.Items.Add(wiData.Title, false);
                }
            }
        }